AMD GCN OpenGL Register Spilling robustness on Compute Shaders
What's the robustness I should expect when a Compute Shader spills registers (whether SGPR or VGPR) on AMD Mesa OpenGL?
I'm writing a Compute Shader and whenever the generated output spills a little (the least I got it to spill was 20 SGPR, still optimizing...) when I run the shader I get continuous race conditions.
The Compute Shader is an ETC1 compressor, and its output should always be deterministic given the same inputs. However whenever it spills, I can see some pixels randomly becoming garbage with every run.
This is noticeable even when running with a single 4x4x4 threadgroup, as there are 4 blocks of pixels which constantly flicker.
I'm running on: OpenGL renderer string: Radeon RX 560 Series (POLARIS11, DRM 3.33.0, 5.3.0-53-generic, LLVM 9.0.0) OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.0-devel (git-d55573aa)
If you tell me this is a Mesa bug someone is willing to look into, I will immediately tidy up the CS (I have uncommitted changes) to make it an easy repro.
Cheers Matias