Page MenuHome

Grease pencil object outline shader fails to compile on radeonsi
Confirmed, NormalPublicBUG

Description

System Information
Operating system: arch linux
Graphics card: RX 460 (radeonsi)
llvm 11.0.0-4, and master compiled today
mesa 20.2.3-1, and master compiled today

Blender Version
Broken: 2.83.9, 2.91.0, 2.92 daily build
Worked: 2.80

Short description of error
selecting a grease pencil object tanks performance and the outline fails to render.
I assume it's the grease pencil outline shader, as it does not render, and other object selection outlines seem to render fine with no slowdown.
I don't know for sure if it's an issue with blender, could also be an LLVM/mesa bug.

blender 2.80 downloaded from blender.org does not have the issue, I'm assuming it's bundled with it's own older LLVM.

these are the relevant lines from startup:

LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr1 = V_CNDMASK_B32_e32 32768, killed $vgpr2, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
radeonsi: can't compile a main shader part
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
radeonsi: can't compile a main shader part

and then this prints at least once per frame with a grease pencil object selected in object mode:

LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader

Exact steps for others to reproduce the error

  1. start blender (e.g. git-master) in a termimal

$ blender-tip

Read prefs: ... .config/blender/2.92/config/userpref.blend
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr1 = V_CNDMASK_B32_e32 32768, killed $vgpr2, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
radeonsi: can't compile a main shader part
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
radeonsi: can't compile a main shader part
  1. delete cube
  2. add grease pencil → monkey
Info: Deleted 1 object(s)

LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
....

Event Timeline

Robert Guetzkow (rjg) changed the task status from Needs Triage to Needs Information from User.Dec 7 2020, 10:12 AM

This appears to be the same issue as in T82461. You mention that the official build of 2.80 works fine. Are the versions of 2.83.9, 2.91.0 and 2.92.0 that don't work also official builds, have you build them yourself or are they a package provided by Arch?

retrotails added a comment.EditedDec 7 2020, 10:53 AM

2.83.9 and 2.92.0 were official builds, 2.91.0 provided by arch.
worth mentioning, I have no issues importing numpy.
also, this issue does not seem to appear on newer AMD cards, at least my vega 56.

Robert Guetzkow (rjg) changed the task status from Needs Information from User to Needs Triage.Dec 8 2020, 12:00 AM

these are the relevant lines from startup:
...
and then this prints at least once per frame with a grease pencil object selected in object mode

LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader

I can confirm the same terminal output with older AMD cards, the current Mesa 20.3.0 release / LLVM 11.0.0
(Ubuntu 20.04, kisak-mesa PPA)

Running Blender with: AMD_DEBUG=mono blender avoids at least the massive spamming in the output and prints the error only a few times.
(See https://gitlab.freedesktop.org/mesa/mesa/blob/master/src/gallium/drivers/radeonsi/si_pipe.c#L74)

found bundled python: /opt/blender/blender-2.91.0-linux64/2.91/python

LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr2 = V_CNDMASK_B32_e32 32768, killed $vgpr2, implicit killed $vcc, implicit $exec

LLVM failed to compile shader
EE ../src/gallium/drivers/radeonsi/si_state_shaders.c:2091 si_build_shader_variant - Failed to build shader variant (type=0)

LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec

LLVM failed to compile shader
EE ../src/gallium/drivers/radeonsi/si_state_shaders.c:2091 si_build_shader_variant - Failed to build shader variant (type=0)

Running Blender with: AMD_DEBUG=mono blender avoids at least the massive spamming in the output and prints the error only a few times.

thank you for this, the outline still doesn't render, but the performance becomes usable again.

this error also showing up in T83587 is interesting as they report having a much newer GPU, so I went back to my vega 56 system and updated it (it has not been updated in a while) and it now has this issue. so it's likely all recent AMD cards on linux.

I notice that this report is missing the steps for others to reproduce the error.
Although the description already indicates what the steps are, it is important to be specific so that we can test the problem on other hardware.

I notice that this report is missing the steps for others to reproduce the error.

  1. start blender (e.g. git-master) in a termimal

$ blender-tip

Read prefs: ... .config/blender/2.92/config/userpref.blend
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr1 = V_CNDMASK_B32_e32 32768, killed $vgpr2, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
radeonsi: can't compile a main shader part
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
radeonsi: can't compile a main shader part
  1. delete cube
  2. add grease pencil → monkey
Info: Deleted 1 object(s)

LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr3 = V_CNDMASK_B32_e32 32768, killed $vgpr3, implicit killed $vcc, implicit $exec
....

same error in T84998

Blender Version
Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-01-26 11:41, hash: rB74633c0456b6

Might be polaris only. I saw the messages last week (when debugging polaris issues), but not on my current configuration.

Current platform:
Operating system: Linux-5.4.0-62-generic-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: AMD Radeon RX 5700 (NAVI10, DRM 3.35.0, 5.4.0-62-generic, LLVM 11.0.0) X.Org 4.6 (Core Profile) Mesa 20.2.6

Will see if I can replace the GPU.

Might be polaris only. I saw the messages last week (when debugging polaris issues), but not on my current configuration.

Not able to reproduce on:

Operating system: Linux-5.4.0-62-generic-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: AMD Radeon RX 5700 (NAVI10, DRM 3.35.0, 5.4.0-62-generic, LLVM 11.0.0) X.Org 4.6 (Core Profile) Mesa 20.2.6

Able to reproduce on:

Operating system: Linux-5.4.0-62-generic-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: AMD Radeon (TM) RX 480 Graphics (POLARIS10, DRM 3.35.0, 5.4.0-62-generic, LLVM 11.0.0) X.Org 4.6 (Core Profile) Mesa 20.2.6

So seems to be related to polaris.

This feels like a driver bug so not sure what our influence is to solve this. I am going to point down the shader that triggers these issues and see if I can work around the possible driver bug.

OVERLAY_shader_outline_prepass_gpencil_1197
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr4 = V_CNDMASK_B32_e32 32768, killed $vgpr5, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
radeonsi: can't compile a main shader part

OVERLAY_shader_wireframe_1556
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr2 = V_CNDMASK_B32_e32 32768, killed $vgpr2, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
radeonsi: can't compile a main shader part

GPENCIL_shader_antialiasing_117
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr2 = V_CNDMASK_B32_e32 32768, killed $vgpr2, implicit killed $vcc, implicit $exec
LLVM failed to compile shader

May I ask please set this task to high priority, it is so annoying to work, thanks

Might be polaris only. I saw the messages last week (when debugging polaris issues), but not on my current configuration.

it does at least also affect vega, including desktop cards and APUs.

May I ask please set this task to high priority, it is so annoying to work, thanks

setting the environment variable "AMD_DEBUG=mono blender" at least makes performance not tank, though the outline still doesn't render.

Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Wed, Feb 3, 9:39 PM
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".
Ali Najafi (shylon) added a comment.EditedFri, Feb 12, 8:30 AM

it seems the latest update from Mesa fixed this, I don't know but I reinstalled and updated Manjaro and there is no problem with Blender 2.83.12 and 2.91.2.

Blender 2.91.2 in Ubuntu 20.04.2 LTS
+ e.g. :
renderer: 'AMD Radeon HD 7700 Series (VERDE, DRM 3.38.0, 5.8.0-43-generic, LLVM 11.0.1)'
vendor: 'AMD'
version: '4.6 (Core Profile) Mesa 20.3.4 - kisak-mesa PPA'

Is still broken. I guess it could be a bug in LLVM ?

Should be fixed in rc of llvm 12. Equivalent Mesa bug report:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/4107

Blender 2.91.2 in Ubuntu 20.04.2 LTS
+ e.g. :
renderer: 'AMD Radeon HD 7700 Series (VERDE, DRM 3.38.0, 5.8.0-43-generic, LLVM 11.0.1)'
vendor: 'AMD'
version: '4.6 (Core Profile) Mesa 20.3.4 - kisak-mesa PPA'

Is still broken. I guess it could be a bug in LLVM ?

strange that I have the same LLVM and Mesa but after installing Manjaro minimal 20.2.1 and updating the problem is gone.