llvmpipe: add multisample bit to fragment shader key.
authorDave Airlie <airlied@redhat.com>
Tue, 10 Mar 2020 22:11:31 +0000 (08:11 +1000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 6 May 2020 06:20:37 +0000 (06:20 +0000)
The fragment shader needs to be regenerated when multisample changes.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

src/gallium/drivers/llvmpipe/lp_state_fs.c
src/gallium/drivers/llvmpipe/lp_state_fs.h

index 6c34ab98453a74148b6df747953bbcf62953ab57..b6bc8c3a7c05ad833ffa7a12ac12df480be74593 100644 (file)
@@ -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;
    }
index 4800498f2b65a1abbeb7a2020900ba5fc5d10fc9..7fe59629821f0d3839a871716a97c187c6b4e45a 100644 (file)
@@ -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];