Repository navigation
fix(shader): print the shader hash of a SPIR-V emission failure in hex - #7610
Conversation
The SPIR-V emission failures printed the shader hash with std::to_string after "hash=0x", so the hash read as a hex number that was the decimal one. Shader 0x1173ae1000 was reported as hash=0x74955231232. Both now print it in hex, as the driver's own messages print the shader address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Tested on AMD on Linux, which this PR had not covered.
Full
|
|
Thanks @DavidAmsellem for the AMD Linux run. Added to the description. AI-assisted: yes (Claude Code) |
|
Rechecked against current |
|
Thanks @adriadam10 for the recheck and the merge. AI-assisted: yes (Claude Code) |
What
FailProgramandSpirvValueEmitContext::FailinSpirvEmitter.cppbuilt their message as"SPIR-V emission failed: hash=0x" + std::to_string(shaderHash), so the hash printed after0xwas in decimal. In #5398 the failure was quoted ashash=0x74955231232, which is shader0x1173ae1000, the address the same issue gives for it elsewhere. Both now print the hash in hex through one helper,FailureText. The rest of the message is unchanged.ExitDescriptorBindingFailureinSpirvDescriptors.cppprints the hash in decimal without0x. This PR doesn't change it, because #6947 edits that file's includes at the line the change would need.Tested
Ubuntu 24.04 (Linux 6.8), GCC 13.3, NVIDIA RTX 4070 Ti (595.99.02).
agc_spirv_failure_text(CPU only). It emits a compute program with hash 0x1173ae1000 twice: once without its compute input info (FailProgram) and once with an unloweredUnreachable(Fail(inst)). Both messages must start withSPIR-V emission failed: hash=0x1173ae1000 stage=and keep their reason.main'sSpirvEmitter.cpp: fails withgot "SPIR-V emission failed: hash=0x74955231232 stage=4 reason=compute input info is missing".Fail(inst)site reverted: fails on the second case withhash=0x74955231232 stage=4 opcode=Unreachable.spirv|shader|guarded|wave32|recompil|agc_driver_graphics$pass. No test or tool reads the old text.tools/check_conventions.py --base upstream/mainpasses.tools/pr_overlap.pylists only open pull requests that add tests tolibSceAgcDriver/CMakeLists.txt, plus some that conflict withmainand touchSpirvEmitter.cpp. None of the latter edit these two functions or the includes.agc_spirv_failure_textpasses, and fullctestpasses 1479 of 1481. The two failures happen onmaintoo:agc_pipeline_cache_file(test(agc): measure pipeline cache hits against the bytes a pipeline adds #7676), andagc_driver_guest_memory_lifetime_direct, which needs/dev/udmabufaccess.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -R '^agc_' -Vonmainf29546a and onmain+ this PR (1f9ac40, a local merge).main: 812 of 812 pass; with this PR: 813 of 813 pass. Neither log reports the layer missing. VUIDs onmain:VUID-VkImageViewCreateInfo-usage-02275×6,VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605×18,VUID-vkCmdCopyBuffer-srcBuffer-00118×2,VUID-vkCmdDispatch-magFilter-04553×2,VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285×2,VUID-vkCmdWaitEvents-srcStageMask-01158×2,VUID-vkSetEvent-event-09543×2; with this PR:VUID-VkImageViewCreateInfo-usage-02275×6,VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605×18,VUID-vkCmdCopyBuffer-srcBuffer-00118×2,VUID-vkCmdDispatch-magFilter-04553×2,VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285×2,VUID-vkCmdWaitEvents-srcStageMask-01158×2,VUID-vkSetEvent-event-09543×2. None is new with this PR. Each ofmain's is the subject of an open PR: 00118 fix(agc): give copied guest buffer regions transfer-source usage #7961, 04553 fix(shader): point-filter direct samplers paired with unsigned integer images #7707, 07285 fix(agc): copy a linked pipeline's color sample counts only when it has color attachments #7985, 01158 and 09543 fix(agc): hold a pending producer batch with a timeline semaphore #7913, 00605 fix(agc): enable independentBlend for color targets with different blend states #6782, 02275 fix(agc): restrict sampled storage texture view usage #862.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code