zink: stop flagging pipeline dirty for line width changes
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 11 May 2021 20:04:35 +0000 (16:04 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 20 Jul 2021 00:25:31 +0000 (00:25 +0000)
this is a dynamic state, it's already out of the pipeline hash

also don't store to ctx

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964>

src/gallium/drivers/zink/zink_context.h
src/gallium/drivers/zink/zink_draw.cpp
src/gallium/drivers/zink/zink_state.c

index bff7f1a..f017ea6 100644 (file)
@@ -234,7 +234,6 @@ struct zink_context {
    bool vp_state_changed;
    bool scissor_changed;
 
-   float line_width;
    float blend_constants[4];
 
    bool sample_locations_changed;
index 8d0cbb1..cfeffd7 100644 (file)
@@ -620,8 +620,8 @@ zink_draw_vbo(struct pipe_context *pctx,
       }
 
       if (line_width_needed(reduced_prim, rast_state->hw_state.polygon_mode)) {
-         if (screen->info.feats.features.wideLines || ctx->line_width == 1.0f)
-            vkCmdSetLineWidth(batch->state->cmdbuf, ctx->line_width);
+         if (screen->info.feats.features.wideLines || rast_state->line_width == 1.0f)
+            vkCmdSetLineWidth(batch->state->cmdbuf, rast_state->line_width);
          else
             debug_printf("BUG: wide lines not supported, needs fallback!");
       }
index 3953d4b..3fc7fde 100644 (file)
@@ -550,10 +550,6 @@ zink_bind_rasterizer_state(struct pipe_context *pctx, void *cso)
          ctx->gfx_pipeline_state.front_face = ctx->rast_state->front_face;
          ctx->gfx_pipeline_state.dirty |= !zink_screen(pctx->screen)->info.have_EXT_extended_dynamic_state;
       }
-      if (ctx->line_width != ctx->rast_state->line_width) {
-         ctx->line_width = ctx->rast_state->line_width;
-         ctx->gfx_pipeline_state.dirty = true;
-      }
       if (ctx->rast_state->base.point_quad_rasterization != point_quad_rasterization)
          ctx->dirty_shader_stages |= BITFIELD_BIT(PIPE_SHADER_FRAGMENT);
       if (ctx->rast_state->base.scissor != scissor)