Skip to content

Linux shaders: translate the meshlet-culling compute pipelines - #28

Open
gmankab wants to merge 2 commits into
spidercraft:linux-native-runtimefrom
gmankab:contrib/native-compute-init-sgprs
Open

gmankab wants to merge 2 commits into
spidercraft:linux-native-runtimefrom
gmankab:contrib/native-compute-init-sgprs

Conversation

@gmankab

@gmankab gmankab commented Nov 26, 2026

Copy link
Copy Markdown

Three meshlet-culling compute programs refuse translation on the Wine-free runtime at a branch whose condition depends on a general SGPR beyond the dispatch initialization boundary. The first commit uses the compute metadata to count initialized registers, including scratch. It supplies zero only when the register is general-purpose and the program writes it somewhere. Register lowering · Follow-up guard

Those three programs then reach a two-dimensional texture gather with an explicit mip level. The second commit reads the footprint at the selected level in gather order and preserves the supported transparent-black border behavior. The lowering accepts the immediate sampler and whole-mip forms covered by the port.

On the integration build, the same set of 1,296 locally captured containers went from 650 to 657 validated compute programs. All previously validated vertex, pixel, and compute programs still validated. The exact PR head built on linux-native-runtime and validated all three culling programs and created their D3D12 pipelines through native RADV. The register-boundary unit test also passed on the upstream branch. This measures translation and pipeline creation.

Tested-on: AMD Radeon RX 6800, Fedora Linux 45, native x86-64 and RADV
Assisted-by: gpt-6.2 sol xhigh

Based-on: Marvisak@0b35b7f

The native translator refused three meshlet-culling programs at a branch whose input depended on a general register above the compute dispatch initialization boundary. Allow zero for that apparent early read when the program also writes the register. Compute user arguments, system inputs, scratch state and reserved registers keep their existing handling.

Based-on: Marvisak#432
Based-on: Marvisak#1261
Tested-on: Fedora Linux 45, native x86-64 shader translation, 1,296 captured containers
Assisted-by: gpt-6.2 sol xhigh
Meshlet culling gathers depth from a selected level of a hierarchy. DXIL gather reads the first level of a view. Check the supported sampler and coordinate forms, calculate the footprint at the selected level and load the four texels in gather order. Preserve the black border and handle null views with no reported mip levels.

Based-on: Marvisak@0b35b7fe
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, native x86-64 and RADV, 3 hardware pipelines and 1,296 captured containers
Assisted-by: gpt-6.2 sol xhigh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant