Repository navigation
feat(shader): implement s_getreg_b32 for the MODE round mode fields - #577
Conversation
SOPK 0x12 threw in the decoder. The recompiler emits round to nearest even, which s_setreg_imm32_b32 already requires, so reads that stay within MODE bits 0..3 return 0. Other hardware registers and fields throw with the register and bits read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks. llvm-mc for gfx1013 gives One thing before it goes in. Returning 0 is right for
This fits #436's |
…treg_b32 s_setreg_b32 has no effect, so a read of the MODE round fields after it wrote another mode still reports round to nearest even, the rounding the recompiled code uses. The refused HW_ID test row is named as hardware register 4, which has no name on gfx10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, the TechnicalDebt line now says that The new push needs workflow approval again before CI runs. Ready to merge from my side once it's green. |
What
s_getreg_b32(SOPK 0x12) threwunsupported SOPK opcode 18in the decoder.The recompiler always emits round to nearest even:
s_setreg_imm32_b32throws for any other round mode. So a read that stays within MODE bits 0..3 (the f32 and f64/f16 round mode fields) returns 0. Any other hardware register or field (denormal modes,HW_ID,GPR_ALLOC, ...) throws with the register and bits it reads, rather than returning a guess.The embedded vertex-fetch SGPR tracker clears the destination of
s_getreg_b32, as it does fors_cmovk_i32.Tested
Windows 11, MinGW GCC 15.2.0 r7, NVIDIA Vulkan,
-DANYPS5_ENABLE_SPIRV_TOOLS=ON.agc_driver_scalar_getreg:hwreg(MODE, 0, 4)andhwreg(MODE, 2, 2)overwrite SGPRs preset to0x55555555with 0 on every lane.hwreg(MODE, 4, 4)andhwreg(HW_ID)are refused.ctest: 213/214 pass.agc_shader_memoryfails without this change too; fix(shader): splat the bindless table hit into a bool vector for SPIR-V 1.3 #574 fixes it.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code