zink: simplify logic to call zink_set_primitive_emulation_keys

The logic had grown to check every primitive indivdually, instead just
check wehether `rast_prim` has changed

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
This commit is contained in:
antonino 2023-03-23 13:34:45 +01:00 committed by Marge Bot
parent 15b3d77b40
commit 34faab07da

View file

@ -467,11 +467,9 @@ zink_draw(struct pipe_context *pctx,
bool points_changed =
(ctx->gfx_pipeline_state.rast_prim == PIPE_PRIM_POINTS) !=
(rast_prim == PIPE_PRIM_POINTS);
prim_changed = points_changed;
prim_changed |=
(ctx->gfx_pipeline_state.rast_prim == PIPE_PRIM_LINES) !=
(rast_prim == PIPE_PRIM_LINES);
prim_changed = ctx->gfx_pipeline_state.rast_prim != rast_prim;
static bool rect_warned = false;
if (DYNAMIC_STATE >= ZINK_DYNAMIC_STATE3 && rast_prim == PIPE_PRIM_LINES && !rect_warned &&
(VkLineRasterizationModeEXT)rast_state->hw_state.line_mode == VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT) {
@ -481,10 +479,6 @@ zink_draw(struct pipe_context *pctx,
warn_missing_feature(rect_warned, "rectangularLines");
}
prim_changed |=
(ctx->gfx_pipeline_state.rast_prim == PIPE_PRIM_TRIANGLES) !=
(rast_prim == PIPE_PRIM_TRIANGLES);
ctx->gfx_pipeline_state.rast_prim = rast_prim;
rast_prim_changed = true;