protonscr

Test failures on hardware with more aggressive dead draw call discard

vkd3dclosed
HansKristian-Work/vkd3d-proton#2281 · opened 2025-01-13 by zdobersek · updated 2025-01-21 · 5 comments · github
Zzdobersek 2025-01-13 github

Software information

vkd3d-proton test suite, specifically the following test cases:

test_primitive_restart_list_topology_stream_output
test_index_buffer_edge_case_stream_output

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

Description

Adreno hardware, for claims of efficiency, is keen to discard dead draw calls quite early. This means that in the vkd3d-proton test suite a couple of test failures appear due to expected draw calls just not occurring.

test_primitive_restart_list_topology_stream_output in d3d12_streamout.c

This test in the mid-part takes the index buffer and draws it using the triangle list topology. The second triangle ends up using index values 9, UINT32_MAX, UINT32_MAX, so the hardware ends up discarding the triangle and the test fails due to missing output.

test_index_buffer_edge_case_stream_output in d3d12_streamout.c

This test draws three triangles, of which the second and the fourth are indexed draws where the index buffer itself is null. In that case the triangle primitive is expected to be built from three zero-index vertices, but the Adreno hardware discards such triangles, so no output is generated in those two cases.

HHansKristian-Work maintainer 2025-01-13 github

but the Adreno hardware discards such triangles, so no output is generated in those two cases.

That sounds like it's noncompliant w.r.t. transfer feedback. You can add a bug_if() for that case. Would the test work if we used POINT primitive instead of triangle?

using index values 9, UINT32_MAX, UINT32_MAX

That sounds weird, because primitive restart is not a thing on list primitives in d3d12 I think?

Zzdobersek 2025-01-13 github

but the Adreno hardware discards such triangles, so no output is generated in those two cases.

That sounds like it's noncompliant w.r.t. transfer feedback. You can add a bug_if() for that case. Would the test work if we used POINT primitive instead of triangle?

Point primitive should work, but I only tested that by adjusting the primitive type inside Turnip.

using index values 9, UINT32_MAX, UINT32_MAX

That sounds weird, because primitive restart is not a thing on list primitives in d3d12 I think?

IIUC the triangle is not discarded because of the primitive restart but because the indices end up deforming triangle into a line.

HHansKristian-Work maintainer 2025-01-13 github

Ok, so degenerate primitives can be omitted from XFB. That's also non-compliant behavior :\

HHansKristian-Work maintainer 2025-01-21 github

Waived with a bug_if() for now.

HHansKristian-Work maintainer 2025-01-21 github

Should be resolved now.

Nothing extracted yet.