From d8b66fcbf9aba2ad2f69de8e45af4c3c8f2a8323 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 14 Apr 2022 16:18:10 -0400 Subject: [PATCH] zink: unconditionally set line width on rasterizer state change the pipe cap is used for gating wideline support, so this will always be 1.0 when not supported furthermore, the previous code wasn't accurately checking line width for tess shaders, breaking tests cc: mesa-stable fixes (nv): KHR-GL46.tessellation_shader.tessellation_control_to_tessellation_evaluation.gl_PatchVerticesIn Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_draw.cpp | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp index 8f91fa459ac..da2b53742e6 100644 --- a/src/gallium/drivers/zink/zink_draw.cpp +++ b/src/gallium/drivers/zink/zink_draw.cpp @@ -239,25 +239,6 @@ update_gfx_program(struct zink_context *ctx) ctx->dirty_shader_stages &= ~bits; } -static bool -line_width_needed(enum pipe_prim_type reduced_prim, - unsigned polygon_mode) -{ - switch (reduced_prim) { - case PIPE_PRIM_POINTS: - return false; - - case PIPE_PRIM_LINES: - return true; - - case PIPE_PRIM_TRIANGLES: - return polygon_mode == VK_POLYGON_MODE_LINE; - - default: - unreachable("unexpected reduced prim"); - } -} - ALWAYS_INLINE static void update_drawid(struct zink_context *ctx, unsigned draw_id) { @@ -745,12 +726,7 @@ zink_draw(struct pipe_context *pctx, unreachable("unexpected reduced prim"); } - if (line_width_needed(reduced_prim, rast_state->hw_state.polygon_mode)) { - if (screen->info.feats.features.wideLines || rast_state->line_width == 1.0f) - VKCTX(CmdSetLineWidth)(batch->state->cmdbuf, rast_state->line_width); - else - debug_printf("BUG: wide lines not supported, needs fallback!"); - } + VKCTX(CmdSetLineWidth)(batch->state->cmdbuf, rast_state->line_width); if (depth_bias) VKCTX(CmdSetDepthBias)(batch->state->cmdbuf, rast_state->offset_units, rast_state->offset_clamp, rast_state->offset_scale); else