Repository navigation
Conversation
Replace chained vector ternaries on the ELEMENT_BYTES specialization constant with if/else statements in gpu_tiler_prt.comp, gpu_tiler_prt_3d.comp and gpu_tiler_standard64_3d.inc. With glslang -Os, those vector ternaries lowered to OpSpecConstantOp Select returning uvec4, which crashes AMDVLK (amdvlk64.dll, AMD proprietary driver 26.11.2 / 2.0.353 on RX 6800) inside vkCreateComputePipelines when specializing the 3D/PRT tiler pipelines. Add kyty_shim_tiler_shaders to check all embedded tiler SPIR-V modules with spirv-val and reject vector OpSpecConstantOp Select, plus kyty_shim_tiler_shaders_gpu to compile all 90 specialized tiler pipelines and verify GPU tiling and detiling for Standard64KB3D, Prt64KB and Prt64KB3D across all five element sizes against TileGetBlockOffset.
|
The GPU test waits for the queue to go idle, but it never makes the compute shader’s writes visible to the host before reading the mapped output. Host-coherent memory removes the need to invalidate the mapping; it does not replace the memory dependency. Add a compute shader write → host read barrier after the dispatch so both Also, the |
|
Addressed both in 2cc6301292:
Re-ran |
|
Thanks. The updated diff makes the shader writes visible to the host before readback and captures the validator diagnostics before formatting the error. That addresses both earlier findings. One synchronization gap remains: detile reads |
|
Added the compute-write -> compute-read (and host-write) dependency in 7e321baa91:
Re-ran |
|
The updated barrier covers both host readback and the detile dispatch’s shader read, so the remaining synchronization finding is resolved. Thanks for rerunning with synchronization validation enabled and reporting no errors. |
What
Replace chained
uvec4ternary expressions on theELEMENT_BYTESspecialization constant withif / else if / elsestatements in three tiler shaders:core/kyty/graphics/host_gpu/shaders/gpu_tiler_prt.compcore/kyty/graphics/host_gpu/shaders/gpu_tiler_prt_3d.compcore/kyty/graphics/host_gpu/shaders/gpu_tiler_standard64_3d.incWith
glslang -V --target-env vulkan1.3 -Os, those chained vector ternaries lowered toOpSpecConstantOp %v4uint Select, which crashes AMD's Windows Vulkan driver (amdvlk64.dll+0x22240ac,0xc0000005) insidevkCreateComputePipelineswhenTileManager::CreatePipelinespecializes the 64 KB 3D or PRT tiler pipelines (see #341). An audit of all other shaders incore/kyty/graphics/host_gpu/shaders/found no other vectorOpSpecConstantOp Selectinstructions.Add
kyty_shim_tiler_shaders(CPU, also runs under Linux ASan/TSan) to validate all 13 embedded tiler SPIR-V modules withspirv-valand reject vectorOpSpecConstantOp Select, andkyty_shim_tiler_shaders_gpu(added toGPU_TESTSin.github/workflows/anykyty.yml) to compile all 90 specialized tiler compute pipelines and verify GPUTileandDetileoutput forStandard64KB3D,Prt64KB, andPrt64KB3Dacross all five element sizes (1, 2, 4, 8, 16bytes) bit-for-bit against CPUTileGetBlockOffset.Tested
kyty_shim_tiler_shaders: failed as expected (FAILED: standard64_3d: contains vector OpSpecConstantOp Select).kyty_shim_tiler_shaders_gpu: crashed as expected (***Exception: SegFaultinsideamdvlk64.dll).ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layer:ctest --test-dir build -R '^kyty_shim_(tiler_shaders(|_gpu)|tiled_layout(|_stop))$' -V: 4/4 passed (kyty_shim_tiled_layout0.06 s,kyty_shim_tiled_layout_stop0.06 s,kyty_shim_tiler_shaders0.11 s,kyty_shim_tiler_shaders_gpu0.48 s).Insert instance layer "VK_LAYER_KHRONOS_validation"(C:\VulkanSDK\1.4.363.0\Bin\VkLayer_khronos_validation.dll), nowas not found, and 0VUID-validation errors.py -3 tools/check_conventions.py --base origin/AnyKytypassed;py -3 tools/check_kyty_settings.pypassed (87/87 settings documented);py -3 tools/debt_fold.py --checkpassed.PPSA1062101.012.000) on Windows 11 / RX 6800 (with fix(kyty): place mesh per-primitive built-ins in a Block struct #328 + this shader fix) gets past the 3D title menuamdvlk64.dll+0x22240accrash into gameplay.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)