mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 11:20:20 +01:00
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 <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15960>
This commit is contained in:
parent
9409756ee3
commit
d8b66fcbf9
1 changed files with 1 additions and 25 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue