From: Dave Airlie Date: Tue, 10 Mar 2020 22:11:31 +0000 (+1000) Subject: llvmpipe: add multisample bit to fragment shader key. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=67ec1760eecbcb5c52992d9098a7e220f22c7d22;p=mesa.git llvmpipe: add multisample bit to fragment shader key. The fragment shader needs to be regenerated when multisample changes. Reviewed-by: Roland Scheidegger Part-of: --- 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];