summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_state_fs.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-07-21 10:37:36 -0600
committerBrian Paul <[email protected]>2017-07-25 15:40:24 -0600
commit91735e2d4a25df0685e5f4c8f0a064f9d58c6b8e (patch)
treefe7bc1ef952fbc3067faa836287c27da54e7697d /src/gallium/drivers/svga/svga_state_fs.c
parent71d3b69b239c2e2eb8b154229c5defc013b7c7b5 (diff)
svga: implement MSAA alpha_to_one feature
The device doesn't directly support this feature so we implement it with additional shader code which sets the color output(s) w component to 1.0 (or max_int or max_uint). Fixes 16 Piglit ext_framebuffer_multisample/*alpha-to-one* tests. v2: only support unorm/float buffers, not int/uint, per Roland. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_state_fs.c')
-rw-r--r--src/gallium/drivers/svga/svga_state_fs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c
index bf452163049..5e568993fed 100644
--- a/src/gallium/drivers/svga/svga_state_fs.c
+++ b/src/gallium/drivers/svga/svga_state_fs.c
@@ -25,6 +25,7 @@
#include "util/u_inlines.h"
#include "pipe/p_defines.h"
+#include "util/u_format.h"
#include "util/u_math.h"
#include "util/u_memory.h"
#include "util/u_bitmask.h"
@@ -234,6 +235,8 @@ make_fs_key(const struct svga_context *svga,
*/
key->fs.white_fragments = svga->curr.blend->need_white_fragments;
+ key->fs.alpha_to_one = svga->curr.blend->alpha_to_one;
+
#ifdef DEBUG
/*
* We expect a consistent set of samplers and sampler views.