sharpemu/tests/SharpEmu.Libs.Tests/Gpu
kuba 0368b76d6c [ShaderCompiler] Fix the SOPK immediate width and S_ADDK_I32's SCC
Two things were wrong in the SOPK forms, in both the SPIR-V and the MSL
backend.

S_CMPK_*_U32 compares against SIMM16 zero-extended; only the signed compares
sign-extend it. Both translators sign-extended it for every compare, so
"s_cmpk_le_u32 s4, 0xffff" was true for any value at all. NGG geometry
programs use exactly that test on the packed vertex and primitive count, so
they took their no-primitive path and exported a single null primitive, which
left Unreal's volume passes empty. The register S_CMPK names is also only
read, yet user-data liveness recorded it as a definition, so a compare on a
user-data register left that register unloaded; it now counts as a use, as
does the register of the SOPK accumulations.

S_ADDK_I32 is defined as D.i = D.i + signext(SIMM16) with SCC set on signed
overflow, the same SCC rule as S_ADD_I32, which both backends already
implement. Neither wrote SCC for the SOPK form, so a following
S_CBRANCH_SCC0/1 or S_CSELECT read whatever the previous instruction had left
there. S_MOVK_I32 and S_MULK_I32 correctly leave SCC alone.
2026-09-29 23:19:26 +02:00
..
Buffers Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
GpuCommands Fix for DS,Little Nightmares, Little Nightmares III and Astro Bot shader (#913) 2026-09-27 20:43:07 +03:00
Images [GPU] performance: negative interval filter 2026-09-28 04:37:46 +03:00
Metal Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
Pipelines Fix for DS,Little Nightmares, Little Nightmares III and Astro Bot shader (#913) 2026-09-27 20:43:07 +03:00
Rendering Fix for DS,Little Nightmares, Little Nightmares III and Astro Bot shader (#913) 2026-09-27 20:43:07 +03:00
Scheduling Alpha Rebuild Progress (#887) 2026-09-20 04:09:27 +03:00
Vulkan [ShaderCompiler] Fix the SOPK immediate width and S_ADDK_I32's SCC 2026-09-29 23:19:26 +02:00