Module: Mesa Branch: main Commit: 2b77a658005afe018d49609fb86c2c1c39f39ebc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b77a658005afe018d49609fb86c2c1c39f39ebc
Author: SoroushIMG <[email protected]> Date: Wed Jan 4 10:05:09 2023 +0000 zink: fix disappearing smooth lines after workaround The passthrough geometery shader was using points for smooth lines. This meant the shader would always statically get 1 vertex and never emit a line. Fixes: 80285db9efe ("zink: lower smooth-lines if not supported") Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20582> --- src/gallium/drivers/zink/zink_program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c index 898ca6c617e..7fc0ddbbebc 100644 --- a/src/gallium/drivers/zink/zink_program.c +++ b/src/gallium/drivers/zink/zink_program.c @@ -1875,8 +1875,8 @@ zink_set_primitive_emulation_keys(struct zink_context *ctx) nir_shader *nir = nir_create_passthrough_gs( &screen->nir_options, ctx->gfx_stages[prev_vertex_stage]->nir, - lower_line_stipple ? SHADER_PRIM_LINE_STRIP : SHADER_PRIM_POINTS, - lower_line_stipple ? 2 : 1); + (lower_line_stipple || lower_line_smooth) ? SHADER_PRIM_LINE_STRIP : SHADER_PRIM_POINTS, + (lower_line_stipple || lower_line_smooth) ? 2 : 1); struct zink_shader *shader = zink_shader_create(screen, nir, NULL); ctx->gfx_stages[prev_vertex_stage]->non_fs.generated_gs = shader;
