Skip to content

Shaders: pass only spatial coordinates to DXIL calculateLOD - #103

Open
VastyViz wants to merge 1 commit into
Zettrox:mainfrom
VastyViz:shaders/calculate-lod-spatial-coords
Open

VastyViz wants to merge 1 commit into
Zettrox:mainfrom
VastyViz:shaders/calculate-lod-spatial-coords

Conversation

@VastyViz

Copy link
Copy Markdown

image_get_lod on array textures (1D_ARRAY and 2D_ARRAY) filled cs up to coords, passing the array slice into DXIL calculateLOD.f32. DXIL requires unused coordinate slots beyond the texture's spatial dimensions to be undef, causing the validator to reject affected pixel shaders with 'out of bound coord must be undef.'

Only load and pass the spatial coordinates when lowering op 81 (calculateLOD), leaving remaining slots undef. Add a synthetic pixel shader regression test covering 1D, 2D, 3D, 1D_ARRAY, and 2D_ARRAY validated with dxil.dll and compiled on D3D12 hardware and WARP.

image_get_lod on array textures (1D_ARRAY and 2D_ARRAY) filled cs up to
coords, passing the array slice into DXIL calculateLOD.f32. DXIL requires
unused coordinate slots beyond the texture's spatial dimensions to be
undef, causing the validator to reject affected pixel shaders with
'out of bound coord must be undef.'

Only load and pass the spatial coordinates when lowering op 81
(calculateLOD), leaving remaining slots undef. Add a synthetic pixel
shader regression test covering 1D, 2D, 3D, 1D_ARRAY, and 2D_ARRAY
validated with dxil.dll and compiled on D3D12 hardware and WARP.
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