Repository navigation
Conversation
|
Reviewed 90abd34: this box (arm64 Linux, no GPU, no C++/Vulkan toolchain) cannot run or compile AI-assisted review. Recommendation: Merge |
90abd34 to
33973fb
Compare
…nt contract On GPUs whose maxPushConstantsSize is under the 144 bytes every translated shader's push-constant block needs (the Vulkan minimum is 128; the AMD iGPU reports 128), the D3D12 layer refuses every pipeline with E_NOTIMPL (PipelineState::push_constants_fit; the uniform-buffer tail of ProjectLeonida#224 is not built), so every test that creates a PSO fails there. LEONIDA_PC_TAIL_UBO=1 does not help: it only changes how test/shaders/build.py translates the shader fixtures, while the layer still declares the whole 144-byte range. vktest::Device now records the chosen device's maxPushConstantsSize and offers below_shader_push_constant_contract(), the vk-side twin of rt::d3d12::device_push_constants_need_fallback (same <144 condition, usable before the D3D12 device exists). The 22 test sources behind the failing ctest entries call it after initialize() and return 77. Every one of those entries already mapped 77 to SKIP through SKIP_RETURN_CODE except xbox_native_base_draw, xbox_derived_mask_zero and xbox_derived_mask_restore (entries of d3d12_translated_draw_test added to main later), which gain the same mapping here. Verified on the AMD iGPU (radeon, maxPushConstantsSize 128): the entries of the 22 sources now skip; the rest of the d3d12 set is unchanged. On the RTX 4070 SUPER all of them still pass. AI-assisted. Co-Authored-By: Devin <noreply@cognition.ai> Co-Authored-By: SWE-2.1 Max <noreply@google.com>
33973fb to
428522e
Compare
|
Rebased onto current main ( Verification on this machine:
The state-sweep / first-light coverage PierreEbele mentioned is already split into AI-assisted verification with Devin. |
…ract d3d12_first_light_test builds translated PSOs that need 144 push-constant bytes; on a device with a smaller limit (e.g. a 128-byte iGPU) PSO creation would fail. d3d12_state_sweep_test was worse: every case's PSO fails the same way, each counts as a per-case skip, and the test could return success having compared nothing. Both now check rt::d3d12::device_push_constants_need_fallback right after the layer device exists and return 77, matching d3d12_pipeline_library_test, d3d12_msaa_draw_test and d3d12_fspx_compute_test. Co-Authored-By: Devin <noreply@cognition.ai>
Claimed in the coordination issue: #14 (comment)
Related: #1419 applies the same guard to #1341's new
d3d12_skip_compute_test(Depends on: #1341).What
On GPUs whose
maxPushConstantsSizeis under the 144 bytes every translated shader's push-constant block needs (the Vulkan minimum is 128; AMD Radeon iGPUs report 128), the D3D12 layer refuses every pipeline withE_NOTIMPL(PipelineState::push_constants_fit; the uniform-buffer tail is not built yet). Every test that creates a PSO therefore failed on such devices — 24 ctest entries on our AMD iGPU.LEONIDA_PC_TAIL_UBO=1does not help these tests: it only changes howtest/shaders/build.pytranslates the.asmfixtures, while the layer still declares the whole 144-byteVkPushConstantRange.vktest::Devicenow records the chosen device'smaxPushConstantsSizeand offersbelow_shader_push_constant_contract()— the vk-side twin ofrt::d3d12::device_push_constants_need_fallback(same<144condition, usable before the D3D12 device exists, which the helper-structured tests need).initialize()in the 22 test sources behind the 24 failing entries (all already hadSKIP_RETURN_CODE 77in CMake — no CMake change).d3d12_vulkan_device_test) and tests already guarded are untouched.Tested
LEONIDA_PC_TAIL_UBO=1, validation on): all 24 entries now***Skipped(exit 77) — e.g.d3d12_compute_test: skipped, the shaders' push-constant block needs 144 bytes and this GPU has 128; the remaining AMD failures are the 3 known pre-existing ones (d3d12_clearNaN → d3d12/vulkan: write NaN depth clears with a copy on AMD (D3D-CLEAR-NAN-DEPTH) #787,d3d12_xdxr_rt_check→ xdxr_build: take the BOX16 half sign without a shift-then-mask (AMD driver miscompile) #1210,d3d12_pipeline_library_hostenv crash).Known tradeoff (reviewer-noted):
d3d12_typeless_families/d3d12_depth_resolveskip their clears-only paths too on low-limit devices;d3d12_first_light(package-gated) andd3d12_state_sweep(silent zero-comparison pass) have the same latent gap — follow-ups noted on the coordination issue.AI-assisted (Devin).
Consolidated follow-up
This branch now also includes the two remaining push-constant-contract skips formerly opened as #1467:
d3d12_first_light_testandd3d12_state_sweep_testnow exit 77 before building PSOs on devices below the 144-byte contract, rather than failing or silently comparing nothing. The consolidation is cherry-picke8f09538f; no additional code was written.