From b558fb259e37bae2e4f3e2ec9d54842e4526b739 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Wed, 28 Aug 2024 10:03:07 -0700 Subject: [PATCH] d3d12: Don't use a vertex re-ordering GS for line primitives Part-of: (cherry picked from commit dac44e02f72d645418a1c6059342a60b508c6eb8) --- .pick_status.json | 2 +- src/gallium/drivers/d3d12/d3d12_compiler.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 7e4f9fd01c1..53e6229dd28 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -464,7 +464,7 @@ "description": "d3d12: Don't use a vertex re-ordering GS for line primitives", "nominated": false, "nomination_type": 3, - "resolution": 4, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/d3d12/d3d12_compiler.cpp b/src/gallium/drivers/d3d12/d3d12_compiler.cpp index 4147ee88136..934f72cfe55 100644 --- a/src/gallium/drivers/d3d12/d3d12_compiler.cpp +++ b/src/gallium/drivers/d3d12/d3d12_compiler.cpp @@ -470,6 +470,8 @@ needs_vertex_reordering(struct d3d12_selection_context *sel_ctx, const struct pi return false; /* TODO add support for line primitives */ + if (u_reduced_prim((mesa_prim)dinfo->mode) == MESA_PRIM_LINES) + return false; /* When flat shading a triangle and provoking vertex is not the first one, we use load_at_vertex. If not available for this adapter, or if it's a triangle strip, we need to reorder the vertices */ @@ -657,7 +659,7 @@ validate_geometry_shader_variant(struct d3d12_selection_context *sel_ctx) } else if (sel_ctx->needs_point_sprite_lowering) { key.passthrough = true; } else if (sel_ctx->needs_vertex_reordering) { - /* TODO support cases where flat shading (pv != 0) and xfb are enabled */ + /* TODO support cases where flat shading (pv != 0) and xfb are enabled, or lines */ key.provoking_vertex = sel_ctx->provoking_vertex; key.alternate_tri = sel_ctx->alternate_tri; }