Commit a042211b authored by Mike Blumenkrantz's avatar Mike Blumenkrantz 🏋 Committed by Marge Bot
Browse files

aux/cso: set flatshade_first onto vbuf when binding rasterizer



ensure this value is always updated
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Part-of: <mesa/mesa!10964>
parent f679ba56
...@@ -574,6 +574,8 @@ enum pipe_error cso_set_rasterizer(struct cso_context *ctx, ...@@ -574,6 +574,8 @@ enum pipe_error cso_set_rasterizer(struct cso_context *ctx,
if (ctx->rasterizer != handle) { if (ctx->rasterizer != handle) {
ctx->rasterizer = handle; ctx->rasterizer = handle;
ctx->flatshade_first = templ->flatshade_first; ctx->flatshade_first = templ->flatshade_first;
if (ctx->vbuf)
u_vbuf_set_flatshade_first(ctx->vbuf, ctx->flatshade_first);
ctx->pipe->bind_rasterizer_state(ctx->pipe, handle); ctx->pipe->bind_rasterizer_state(ctx->pipe, handle);
} }
return PIPE_OK; return PIPE_OK;
...@@ -593,6 +595,8 @@ cso_restore_rasterizer(struct cso_context *ctx) ...@@ -593,6 +595,8 @@ cso_restore_rasterizer(struct cso_context *ctx)
if (ctx->rasterizer != ctx->rasterizer_saved) { if (ctx->rasterizer != ctx->rasterizer_saved) {
ctx->rasterizer = ctx->rasterizer_saved; ctx->rasterizer = ctx->rasterizer_saved;
ctx->flatshade_first = ctx->flatshade_first_saved; ctx->flatshade_first = ctx->flatshade_first_saved;
if (ctx->vbuf)
u_vbuf_set_flatshade_first(ctx->vbuf, ctx->flatshade_first);
ctx->pipe->bind_rasterizer_state(ctx->pipe, ctx->rasterizer_saved); ctx->pipe->bind_rasterizer_state(ctx->pipe, ctx->rasterizer_saved);
} }
ctx->rasterizer_saved = NULL; ctx->rasterizer_saved = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment