zink: Initialize primitive types to an invalid value
authorKonstantin Seurer <konstantin.seurer@gmail.com>
Thu, 21 Sep 2023 17:14:20 +0000 (19:14 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 4 Oct 2023 23:20:52 +0000 (23:20 +0000)
The memory is zero initialized which corresponds to MESA_PRIM_POINTS.

Fixes: 659c39f ("zink: rework primitive rasterization type logic")
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25335>

src/gallium/drivers/zink/zink_context.c

index 37ccf44..99a5c3b 100644 (file)
@@ -5138,6 +5138,8 @@ zink_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
    ctx->fb_changed = ctx->rp_changed = true;
    ctx->sample_mask_changed = true;
    ctx->gfx_pipeline_state.gfx_prim_mode = MESA_PRIM_COUNT;
+   ctx->gfx_pipeline_state.shader_rast_prim = MESA_PRIM_COUNT;
+   ctx->gfx_pipeline_state.rast_prim = MESA_PRIM_COUNT;
 
    zink_init_draw_functions(ctx, screen);
    zink_init_grid_functions(ctx);