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?
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.
Ok, so degenerate primitives can be omitted from XFB. That's also non-compliant behavior :\
Waived with a bug_if() for now.
Should be resolved now.
Nothing extracted yet.
Software information
vkd3d-proton test suite, specifically the following test cases:
System information
wine-9.21 (Staging)v2.14.1Description
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_outputind3d12_streamout.cThis 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_outputind3d12_streamout.cThis 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.