Repository navigation
shader_meta: keep carry-dependent scalar results unknown - #5883
tahffo68hk-hash wants to merge 1 commit into
Conversation
|
I checked the tracker history before testing. The open #5031 covers this exact SCC case, including the fabricated literal sampler word. Hiiva claimed it at 07:38 UTC in the second item of this tracker comment, before the 12:25 UTC claim here. Both heads remove the same three-line zero fold in There is already a retail corpus comparison on #5031 for the earlier base. Your interpreter check showing the actual nonzero words with SCC set would be relevant to that thread. AI-assisted. |
|
Closing as superseded by #5031 (SHADER-879), which has the earlier claim and covers the same SCC-dependent zero fold. I missed the claim in the rotated coordination thread during deduplication. This branch and the Windows synthetic results remain available: 28 metadata tests, 9 pointer census tests, and CPU execution confirming 0x1 / 0xffffffff with SCC set. The separate #5862 pointer-census regression is documented on that PR. AI-assisted. 关闭此 PR,由先认领的 #5031(SHADER-879)继续处理同一个依赖 SCC 的零值折叠。我去重时漏查了轮换协调帖里的旧认领。保留分支和 Windows 合成验证结果,包括 28 项元数据测试、9 项指针统计测试,以及 SCC 置位时 CPU 执行得到 0x1 / 0xffffffff 的证据。独立的 #5862 指针统计回归已记录在对应 PR。AI 辅助。 |
What and why
A sampler word built by
s_addc_u32ors_subb_u32with two explicit zero operands could be listed as zero inliteral_samplers. With SCC set, the CPU-executed translated instructions instead produce0x00000001and0xffffffffrespectively. The runtime uses the reported literal words when registering samplers.Root cause and fix
shader_metafolded zero operands to zero without tracking SCC. Leave the value unknown for metadata purposes, while keeping the existing symbolic pointer-origin handling. An explicits_mov_b32of zero still yields a known sampler word.Tests and limitations
test_shader_meta.pytests and all 9test_ptr_truncation_census.pytests passed.git diff --checkpassed.Coordination: #5781 (comment)
Related: #5862 (independent operand caching in the same module) and #5102 (independent VGPR state invalidation).
AI-assisted.
问题与影响
两个显式操作数都是零时,
s_addc_u32或s_subb_u32生成的采样器字可能在literal_samplers中被标为零。SCC 置位时,CPU 执行翻译后的两条指令分别得到0x00000001和0xffffffff。运行时使用元数据中记录的字面量注册采样器。根因与修复
shader_meta未追踪 SCC,却将两个零操作数折叠为零。现在元数据将该数值保留为未知,同时沿用现有的指针来源分析。显式用s_mov_b32写零时,仍可识别该采样器字。测试和局限
test_shader_meta.py的 28 项和test_ptr_truncation_census.py的 9 项测试全部通过。git diff --check通过。协调:#5781 (comment)
相关:#5862(同模块内独立的操作数缓存)和 #5102(独立的 VGPR 状态清理)。
AI 辅助。