summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-04-18 16:57:53 -0700
committerEric Anholt <[email protected]>2016-04-22 11:27:11 -0700
commit3fecaf0d0cb762b23930aaecc67c8934f1b59881 (patch)
tree893eb1ba2c19b57c812d7dc61cd42e0cebbed21a /src
parent1410403e1e6cd948b087ebb19f6865f054d14877 (diff)
vc4: Only do MSAA FB operations if the FB is MSAA.
I noticed this as a problem with ET:QW traces emitting coverage code when the framebuffer was supposed to be single sampled.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 02cae2d4648..4235d265d87 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -2194,11 +2194,14 @@ vc4_update_compiled_fs(struct vc4_context *vc4, uint8_t prim_mode)
} else {
key->logicop_func = PIPE_LOGICOP_COPY;
}
- key->msaa = vc4->rasterizer->base.multisample;
- key->sample_coverage = (vc4->rasterizer->base.multisample &&
- vc4->sample_mask != (1 << VC4_MAX_SAMPLES) - 1);
- key->sample_alpha_to_coverage = vc4->blend->alpha_to_coverage;
- key->sample_alpha_to_one = vc4->blend->alpha_to_one;
+ if (vc4->msaa) {
+ key->msaa = vc4->rasterizer->base.multisample;
+ key->sample_coverage = (vc4->rasterizer->base.multisample &&
+ vc4->sample_mask != (1 << VC4_MAX_SAMPLES) - 1);
+ key->sample_alpha_to_coverage = vc4->blend->alpha_to_coverage;
+ key->sample_alpha_to_one = vc4->blend->alpha_to_one;
+ }
+
if (vc4->framebuffer.cbufs[0])
key->color_format = vc4->framebuffer.cbufs[0]->format;