summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorantonino <antonino.maniscalco@collabora.com>2023-02-03 15:43:09 +0100
committerMarge Bot <emma+marge@anholt.net>2023-03-29 19:18:40 +0000
commit0cb81ac38c20edf40c4aa0edcff4633d0bb6b767 (patch)
tree49cd6e50609a5503c541b0fdd48276ffd1125719 /src/gallium/drivers
parent3b5fb8b0607e1e8e0916ab8f6acaf01f061e94f8 (diff)
zink: force line strip out when emulating stipple
Fixes a bug where, whenever a primtiive that has more than 2 vertices is rendered with line stipple, the edge between the first and last vertex will have stretched out stipple. This happens because interpolation will occur between two non consecutive stipple counters for the last edge (which is between the last and first vertices). Forcing `nir_create_passthrough_gs` to generate a line strip avoids this because the last vertex will be duplicated and will have the correct stipple counter for each edge. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/zink/zink_program.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c
index 4046473ddf0..d1f41844a32 100644
--- a/src/gallium/drivers/zink/zink_program.c
+++ b/src/gallium/drivers/zink/zink_program.c
@@ -2254,7 +2254,7 @@ zink_set_primitive_emulation_keys(struct zink_context *ctx)
ctx->gfx_stages[prev_vertex_stage]->nir,
ctx->gfx_pipeline_state.gfx_prim_mode,
lower_edge_flags,
- false);
+ lower_line_stipple);
struct zink_shader *shader = zink_shader_create(screen, nir, NULL);
ctx->gfx_stages[prev_vertex_stage]->non_fs.generated_gs[ctx->gfx_pipeline_state.gfx_prim_mode] = shader;