protonscr

test_shader_sm66_quad_op_semantics fails on Turnip due to tiled quad scope instance formation

vkd3dclosed
HansKristian-Work/vkd3d-proton#2324 · opened 2025-01-31 by zdobersek · updated 2025-02-04 · 3 comments · github
Zzdobersek 2025-01-31 github

Software information

The test_shader_sm66_quad_op_semantics test case in the vkd3d-proton test suite. Specifically the following subtest:

{ &cs_quad_swap_2d_sm60_dxil, 2, 2, D3D_SHADER_MODEL_6_0, false }

System information

  • GPU: Adreno A750
  • Driver: Mesa Turnip, main branch
  • Wine version: wine-9.21 (Staging)
  • VKD3D-Proton version: master branch, tag v2.14.1

Log files

For performance reasons Turnip driver prefers to use tiled workgroup dispatch on newer hardware by default:

This trips up this specific vkd3d test case which assumes linear dispatch and validates the results accordingly and reports failure.

For debugging purposes, forcing linear dispatch inside the driver gets the test passing. The test also passes when modifying dxil-spirv to utilize the SPV_NV_compute_shader_derivatives extension and force linear dispatch through the DerivativeGroupLinearNV execution mode.

Ddoitsujin maintainer 2025-02-02 github

We already use DerivativeGroupLinearKHR where applicable, but I don't really know why it's explicitly disabled for quad ops pre-SM6.6.

HHansKristian-Work maintainer 2025-02-03 github

That sounds like an oversight I think ...

HHansKristian-Work maintainer 2025-02-03 github

It's possible the test is also a bit overzealous.

While existing compute Quad* operations required the same association with lane indices, no mapping of quad lanes to SV_GroupThreadID was required. This new mapping is not required for pre 6.6 shader models.

https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_Derivatives.html#2d-quads

It's possible that line is supposed to apply to 1D too pre SM 6.6, making the test invalid.

Nothing extracted yet.