Repository navigation
Conversation
|
Tested da093a8 on Windows 11 with NVIDIA GeForce RTX 4090 (driver 32.0.16.2101) and AMD Radeon(TM) Graphics (driver 32.0.21043.5001): pass. I used the synthetic compute shader from Each GPU created both compute pipelines. Each run reported zero failures, zero skips, and no validation messages with a VUID. With the translator from merge base
AI-assisted. Synthetic inputs only. |
|
Independent Windows 11 / Python 3.12 synthetic check of
CPU-only synthetic inputs; no game files or GPU. This checks metadata behavior and module validation, not game rendering. AI-assisted review. — LocalFirst-AI |
kacper-serewis
left a comment
There was a problem hiding this comment.
AI-assisted independent review. At da093a8 both CPU builds translated and validated 24 cached shaders (eight each VS, PS and MS), with all 49 immediate CLI outputs byte-identical. With emission options alternated and indexing reversed under flipped options, all 24 delayed records matched their immediate records. Push-constant sizes, all nine emitted tail blocks and eight nonempty half-location maps agreed with the assembly. The scratch comparison adapted #5269’s conflicting FMA metadata hunk identically on both sides. Compute coverage came from the synthetic layout suite.
Kam471
left a comment
There was a problem hiding this comment.
Reviewed da093a8
python tests/semantic/test_shader_layout_metadata.py-> 5 tests OK.python -I -m pytest tests/test_shader_meta.py tests/test_shader_meta_operands.py tests/test_pc_tail_ubo.py tests/test_shader_index.py tests/test_mesh_compute.py tests/test_fspx_shaders_stage.py tests/test_fssm_wave_size.py -q-> 65 passed, 20 skipped, 14 subtests. The skips are the SDK/llvm fixture cases absent here; the PR saw none.python tests/semantic/test_f16_interp_fallback.py-> 15 OK;python tests/semantic/test_bary_fallback.py-> 12 OK.- Negative control: the new test file on
3faac557->FAILED (failures=16), so the tests do catch the delayed-metadata bug. git diff --checkclean.
Verdict: OK to merge.
|
Checked against main 3faac55: merges clean, the new test_shader_layout_metadata.py is 5/5 under unittest discover, and the closest consumers stay green: test_f16_interp_fallback 15/15 and pytest test_pc_tail_ubo 8/8. I swept the shader_meta range for bare global reads — none remain, and the translate.last_gen library caller is exactly the scenario the fix protects; translator-use guard green. Note: the branch reports no CI checks at all — worth a push. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
Problem
shader_meta(g, asm)currently reads the currentPC_TAIL_UBOandF16_HALVESglobals. A library caller that retains the generator and emitted module, restores its options, and generates metadata later can therefore record a different layout from the one in the module:This affects delayed or interleaved library API metadata generation. The stock CLI indexes immediately while its options are stable and does not trigger this failure.
Claim: #5256 (comment)
Item: BUILD-1706.
Change
Record the two layout options on the generator when
assemble()emits the module, and use those recorded values inshader_meta(). Initialize the fields inGenas well to preserve metadata queries on manually constructed generators. The emitted shader instructions and declarations are unchanged.The new tests translate complete synthetic CS, VS, PS, native mesh, and mesh-compute modules. They cover both option directions, absence of tail reads, interleaved generators, preserved f16 locations, and the mesh-compute slot/PC-tail layout.
Validation
3faac557fail 16 metadata subcases. All five test methods pass with this change, including SDK assembly and validation of 12 complete modules.d7f07338(including its TEST-1147: record the FMA mode in shader metadata and honor it in check.py #5094 parent), SHADER-879: keep carry-dependent shader metadata conservative #5031 at6f923647, and SHADER-882: reflect per-vertex fragment input block members #5054 ate25167f6applies cleanly. The combined targeted suite passes 122 tests and 884 subtests, with no skips. No hunk dependency on those PRs.VUID-VkComputePipelineCreateInfo-layout-10069orlayout-07988for the two incorrect baseline metadata cases. Matching metadata controls produce no validation errors. All four fixed immediate/delayed metadata controls produce no validation errors using the same checker binary. Corresponding shader SHA-256 values are unchanged. This comparison uses validation output, since the checker returns 0 even for these baseline layout errors.The GPU check creates pipelines only. It does not claim dispatch results or testing on a device limited to 128-byte push constants. Vulkan SDK 1.4.363.0; Python 3.14.6; isolated LLVM 21.1.8 AMDGPU tools for the existing fixture tests. Synthetic inputs only, no game files. AI-assisted.