zink: only set line-width if drawing lines
This might seem like a premature optimization, but it's going to make a bit more sense with the next commit, to prevent needlessly regressing performance. Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19438>
This commit is contained in:

committed by
Marge Bot

parent
53721827ea
commit
1859941768
@@ -680,12 +680,16 @@ zink_draw(struct pipe_context *pctx,
|
||||
}
|
||||
}
|
||||
|
||||
if ((BATCH_CHANGED || rast_state_changed || rast_prim_changed) &&
|
||||
ctx->gfx_pipeline_state.rast_prim == PIPE_PRIM_LINES) {
|
||||
VKCTX(CmdSetLineWidth)(batch->state->cmdbuf, rast_state->line_width);
|
||||
}
|
||||
|
||||
if (BATCH_CHANGED || rast_state_changed || rast_prim_changed) {
|
||||
bool depth_bias =
|
||||
ctx->gfx_pipeline_state.rast_prim == PIPE_PRIM_TRIANGLES &&
|
||||
rast_state->offset_fill;
|
||||
|
||||
VKCTX(CmdSetLineWidth)(batch->state->cmdbuf, rast_state->line_width);
|
||||
if (depth_bias) {
|
||||
if (rast_state->base.offset_units_unscaled) {
|
||||
VKCTX(CmdSetDepthBias)(batch->state->cmdbuf, rast_state->offset_units * ctx->depth_bias_scale_factor, rast_state->offset_clamp, rast_state->offset_scale);
|
||||
|
Reference in New Issue
Block a user