Repository navigation
Conversation
When `rdna2spirv.py --mesh-compute` translates a mesh shader, its SPIR-V module uses the `GLCompute` execution model (`VK_SHADER_STAGE_COMPUTE_BIT`) while its `index.json` entry keeps `"stage": "ms"` and records a `"mesh_compute"` layout object. `vk_pipeline_check` previously treated every `"stage": "ms"` entry as a native `VK_EXT_mesh_shader` graphics shader: - On GPUs without `VK_EXT_mesh_shader` (such as NVIDIA Pascal), every `--mesh-compute` entry was skipped with `no VK_EXT_mesh_shader`, its `lds_bytes` check read an unpopulated `maxMeshSharedMemorySize` instead of `maxComputeSharedMemorySize`, and `--compute-only` (`--stage cs`) ignored it. - On GPUs with `VK_EXT_mesh_shader` (such as Intel Windows, where `make_game.py` enables `--mesh-compute` automatically), `vk_pipeline_check` passed the `GLCompute` module as `VK_SHADER_STAGE_MESH_BIT_EXT` to `vkCreateGraphicsPipelines`. Parse `"mesh_compute"` in `vk_pipeline_check` (rejecting non-object/non-null values and non-`"ms"` stages during index parsing) and route `--mesh-compute` entries through `vkCreateComputePipelines`, `maxComputeSharedMemorySize`, `VK_SHADER_STAGE_COMPUTE_BIT` subgroup-size checks, and the `--stage cs` filter, while continuing to report their counts under the `"ms"` corpus stage. Claim: ubiquitarianism#14 (comment) AI-assisted: yes (Antigravity)
|
[KEEP]
|
|
Tested
AI-assisted; synthetic fixtures only, no game data. |
|
On gfx906 (Vega 20, RADV Mesa 26.0.8, fixed subgroup 64, no Both the 152-byte push-constant form and the 128-byte + set-1 UBO form compiled. The checker accepted 65,536 bytes of compute workgroup memory and rejected 65,537. The targeted AI-assisted. |
Claimed in the coordination issue as:
VK-PIPELINE-CHECK-MESH-COMPUTE(#14 (comment))What and why
When
tools/rdna2spirv.py --mesh-computetranslates a mesh shader, the emitted SPIR-V module is aGLComputecompute shader (VK_SHADER_STAGE_COMPUTE_BIT), while itsindex.jsonentry preserves"stage": "ms"and records"mesh_compute": {...}.Previously,
runtime/test/vk_pipeline_check.cpptreated every"stage": "ms"entry as a nativeVK_EXT_mesh_shadergraphics stage:VK_EXT_mesh_shader(such as NVIDIA Pascal, AMD RDNA1/Vega/Polaris, Intel Gen9, and MoltenVK), all--mesh-computeentries were skipped withSKIPPED <name> (no VK_EXT_mesh_shader), theirlds_bytescheck readmesh_props.maxMeshSharedMemorySize(0) instead ofprops.limits.maxComputeSharedMemorySize, their required subgroup size was checked againstVK_SHADER_STAGE_MESH_BIT_EXTinstead ofVK_SHADER_STAGE_COMPUTE_BIT, and--stage cs(--compute-only) left them out.VK_EXT_mesh_shaderwhere--mesh-computeis enabled (for example Intel's Windows Vulkan driver, wheremake_game.pyturns--mesh-computeon automatically),vk_pipeline_checkpassed theGLComputemodule asVK_SHADER_STAGE_MESH_BIT_EXTtovkCreateGraphicsPipelines.Changes
runtime/test/vk_pipeline_check.cpp:"mesh_compute"onShaderMeta(accepting{...}ornull, and failing malformed index parsing before Vulkan loads if"mesh_compute"is neither an object nornullor appears on a stage other than"ms").--mesh-computeentries throughvkCreateComputePipelines(VK_SHADER_STAGE_COMPUTE_BIT),maxComputeSharedMemorySize,VK_SHADER_STAGE_COMPUTE_BITsubgroup-size checks, and--stage cs(--compute-only), while keeping their summary and--isolatecounts under"ms"and leaving native"ms"entries on theVK_EXT_mesh_shadergraphics path.runtime/test/check_vk_pipeline_cli.cmake: add CPU-only malformed-index checks for non-object"mesh_compute"values and"mesh_compute"on non-"ms"stages.runtime/test/check_vk_pipeline_mesh_compute.py&runtime/CMakeLists.txt: add end-to-endvk_pipeline_checkcoverage (registered in CTest asvk_pipeline_check_mesh_computewithSKIP_RETURN_CODE 77) for 152-byte (PhysicalStorageBufferAddresses2x32-bit pointer withoutshaderInt64) and--pc-tail-ubo(128-byte + set-1 UBO)--mesh-computemodules,--compute-only/--graphics-onlyfiltering, native"ms"control entries,maxComputeSharedMemorySizerejection,--isolateaggregation, andspirv-valvalidation.docs/pipeline_check.md: document--mesh-computehandling invk_pipeline_check.Tested
ms_tritranslated withLEONIDA_MESH_COMPUTE=1):vk_pipeline_checkskippedms_triwithSKIPPED ms_tri (no VK_EXT_mesh_shader)(ms pipelines: 0 ok, 0 failed, 1 skipped) under--stage alland checked0 shadersunder--compute-only.ms_triwithLEONIDA_MESH_COMPUTE=1):ms: 1 modules ok, 0 failedandms pipelines: 1 ok, 0 failed, 0 skippedunder both--stage alland--compute-only.ctest --test-dir runtime/build -R "^(vk_pipeline_check_cli|vk_pipeline_check_mesh_compute)$"— 2/2 passed across all 3 runs (spirv-val --target-env vulkan1.2included).vk_pipeline_check_stack,pipeline_cache_seed,runtime/test/check_vk_pipeline_mesh_compute.py,tests/test_vk_pipeline_check_index.py,tests/test_vk_pipeline_check_isolate.py,tests/test_ctest_registration.py,tests/test_docs_links.py,tests/test_docs_table_rows.py— all passed.python -I scripts/check_no_game_data.py-> exit 0.GPUs tested: NVIDIA GeForce GTX 1050 Ti (Pascal, 4 GB), driver 582.28, Vulkan 1.4.312, Windows 10 Pro 10.0.19045 (
VK_LOADER_LAYERS_DISABLE=~implicit~;VK_LAYER_KHRONOS_validationis not installed on this host; GPU withoutVK_EXT_mesh_shader, native mesh-shader GPU path exercised via stage-filter control).AI-assisted: yes (Antigravity)
Checklist
mainand merges cleanly.CONTRIBUTING.md), including in logs or reports quoted here.docs/design.md, with how it was confirmed. (Not applicable: no translator rule changed;docs/pipeline_check.mdupdated.)