Mesa (main): aux/cso: set flatshade_first onto vbuf when binding rasterizer
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 11 23:01:37 UTC 2021
Module: Mesa
Branch: main
Commit: a042211bcbb6af82b49c8fd5a52bb85b57c2ebad
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a042211bcbb6af82b49c8fd5a52bb85b57c2ebad
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Fri May 21 06:50:01 2021 -0400
aux/cso: set flatshade_first onto vbuf when binding rasterizer
ensure this value is always updated
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10964>
---
src/gallium/auxiliary/cso_cache/cso_context.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 8ab3d46858c..cc5e7a29771 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -574,6 +574,8 @@ enum pipe_error cso_set_rasterizer(struct cso_context *ctx,
if (ctx->rasterizer != handle) {
ctx->rasterizer = handle;
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);
}
return PIPE_OK;
@@ -593,6 +595,8 @@ cso_restore_rasterizer(struct cso_context *ctx)
if (ctx->rasterizer != ctx->rasterizer_saved) {
ctx->rasterizer = ctx->rasterizer_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->rasterizer_saved = NULL;
More information about the mesa-commit
mailing list