aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_nir_lower_io.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-06-23 13:11:55 -0700
committerEric Anholt <[email protected]>2015-12-08 09:49:54 -0800
commita97b40dca4949b5b8b3320e76768e54f430c9e78 (patch)
tree00546daf21314047f9dfe50be265174cc8bbdd89 /src/gallium/drivers/vc4/vc4_nir_lower_io.c
parentedc3305de7d749338ad88a949cedfc290a796fe5 (diff)
vc4: Add support for multisample framebuffer operations.
This includes GL_SAMPLE_COVERAGE, GL_SAMPLE_ALPHA_TO_ONE, and GL_SAMPLE_ALPHA_TO_COVAGE. I haven't implemented a dithering function yet, and gallium doesn't give me a good chance to do so for GL_SAMPLE_COVERAGE.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_nir_lower_io.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_nir_lower_io.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_io.c b/src/gallium/drivers/vc4/vc4_nir_lower_io.c
index 1afe52a63f4..72a514756fd 100644
--- a/src/gallium/drivers/vc4/vc4_nir_lower_io.c
+++ b/src/gallium/drivers/vc4/vc4_nir_lower_io.c
@@ -226,7 +226,9 @@ vc4_nir_lower_fs_input(struct vc4_compile *c, nir_builder *b,
{
b->cursor = nir_before_instr(&intr->instr);
- if (intr->const_index[0] == VC4_NIR_TLB_COLOR_READ_INPUT) {
+ if (intr->const_index[0] >= VC4_NIR_TLB_COLOR_READ_INPUT &&
+ intr->const_index[0] < (VC4_NIR_TLB_COLOR_READ_INPUT +
+ VC4_MAX_SAMPLES)) {
/* This doesn't need any lowering. */
return;
}