freedreno/a4xx: fix independent blend
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 21 Nov 2015 05:02:36 +0000 (00:02 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 21 Nov 2015 14:08:16 +0000 (09:08 -0500)
This fixes the ext_draw_buffers2 and arb_draw_buffers_blend tests.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/freedreno/a4xx/a4xx.xml.h
src/gallium/drivers/freedreno/a4xx/fd4_blend.c

index e05b7ee0f85d754e735862413604a4ce0736a606..bd9b0a46bc19c68f130090621e94789708d22e12 100644 (file)
@@ -628,7 +628,7 @@ static inline uint32_t A4XX_RB_FS_OUTPUT_ENABLE_BLEND(uint32_t val)
 {
        return ((val) << A4XX_RB_FS_OUTPUT_ENABLE_BLEND__SHIFT) & A4XX_RB_FS_OUTPUT_ENABLE_BLEND__MASK;
 }
-#define A4XX_RB_FS_OUTPUT_FAST_CLEAR                           0x00000100
+#define A4XX_RB_FS_OUTPUT_INDEPENDENT_BLEND                    0x00000100
 #define A4XX_RB_FS_OUTPUT_SAMPLE_MASK__MASK                    0xffff0000
 #define A4XX_RB_FS_OUTPUT_SAMPLE_MASK__SHIFT                   16
 static inline uint32_t A4XX_RB_FS_OUTPUT_SAMPLE_MASK(uint32_t val)
index 98a96c131c5444837def3a7909cc7f3138cd8b38..f19702280e07f97e8364d87db9580ec06d2d8e7e 100644 (file)
@@ -137,7 +137,8 @@ fd4_blend_state_create(struct pipe_context *pctx,
                        so->rb_mrt[i].buf_info |= A4XX_RB_MRT_BUF_INFO_DITHER_MODE(DITHER_ALWAYS);
        }
 
-       so->rb_fs_output = A4XX_RB_FS_OUTPUT_ENABLE_BLEND(mrt_blend);
+       so->rb_fs_output = A4XX_RB_FS_OUTPUT_ENABLE_BLEND(mrt_blend) |
+               COND(cso->independent_blend_enable, A4XX_RB_FS_OUTPUT_INDEPENDENT_BLEND);
 
        return so;
 }