summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-07-03 15:56:48 -0700
committerEric Anholt <[email protected]>2018-07-05 12:39:36 -0700
commit5601ab3981c8ab5872230a6a9afc236d76fa1405 (patch)
tree364fdb74da50f5ee8ab3d4ae2d99ebde83baef90
parent7b63371420526b85cdae1ff17d7b2bbeceee038d (diff)
v3d: Add support for GL_SAMPLE_ALPHA_TO_ONE.
Fixes piglit ext_framebuffer_multisample-draw-buffers-alpha-to-one
-rw-r--r--src/broadcom/compiler/nir_to_vir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c
index 8012d483a72..89e4bc9fafa 100644
--- a/src/broadcom/compiler/nir_to_vir.c
+++ b/src/broadcom/compiler/nir_to_vir.c
@@ -1030,6 +1030,9 @@ emit_frag_end(struct v3d_compile *c)
b = color[0];
}
+ if (c->fs_key->sample_alpha_to_one)
+ a = vir_uniform_f(c, 1.0);
+
if (c->fs_key->f32_color_rb & (1 << rt)) {
inst = vir_MOV_dest(c, vir_reg(QFILE_TLBU, 0), r);
inst->src[vir_get_implicit_uniform_src(inst)] =