aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2020-03-11 08:11:31 +1000
committerMarge Bot <[email protected]>2020-05-06 06:20:37 +0000
commit67ec1760eecbcb5c52992d9098a7e220f22c7d22 (patch)
treef28b3ccabbc505ee563e6c32b571e3711ababd5e
parentf5463576b94fa51a55e180c71dfbc249c2a3cc6b (diff)
llvmpipe: add multisample bit to fragment shader key.
The fragment shader needs to be regenerated when multisample changes. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c4
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 6c34ab98453..b6bc8c3a7c0 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -2760,6 +2760,9 @@ dump_fs_variant_key(struct lp_fragment_shader_variant_key *key)
if (key->flatshade) {
debug_printf("flatshade = 1\n");
}
+ if (key->multisample) {
+ debug_printf("multisample = 1\n");
+ }
for (i = 0; i < key->nr_cbufs; ++i) {
debug_printf("cbuf_format[%u] = %s\n", i, util_format_name(key->cbuf_format[i]));
}
@@ -3369,6 +3372,7 @@ make_variant_key(struct llvmpipe_context *lp,
/* alpha.ref_value is passed in jit_context */
key->flatshade = lp->rasterizer->flatshade;
+ key->multisample = lp->rasterizer->multisample;
if (lp->active_occlusion_queries && !lp->queries_disabled) {
key->occlusion_count = TRUE;
}
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.h b/src/gallium/drivers/llvmpipe/lp_state_fs.h
index 4800498f2b6..7fe59629821 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.h
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.h
@@ -83,6 +83,7 @@ struct lp_fragment_shader_variant_key
unsigned occlusion_count:1;
unsigned resource_1d:1;
unsigned depth_clamp:1;
+ unsigned multisample:1;
enum pipe_format zsbuf_format;
enum pipe_format cbuf_format[PIPE_MAX_COLOR_BUFS];