summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_state.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index fba2d35b8f9..050c8f44550 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -288,7 +288,11 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
dstRGB == PIPE_BLENDFACTOR_ZERO) &&
(dstA == PIPE_BLENDFACTOR_SRC_COLOR ||
dstA == PIPE_BLENDFACTOR_SRC_ALPHA ||
- dstA == PIPE_BLENDFACTOR_ZERO)) {
+ dstA == PIPE_BLENDFACTOR_ZERO) &&
+ (srcRGB != PIPE_BLENDFACTOR_DST_COLOR &&
+ srcRGB != PIPE_BLENDFACTOR_DST_ALPHA &&
+ srcRGB != PIPE_BLENDFACTOR_INV_DST_COLOR &&
+ srcRGB != PIPE_BLENDFACTOR_INV_DST_ALPHA)) {
blend_control |= R500_SRC_ALPHA_0_NO_READ;
}
@@ -297,7 +301,11 @@ static void* r300_create_blend_state(struct pipe_context* pipe,
dstRGB == PIPE_BLENDFACTOR_ZERO) &&
(dstA == PIPE_BLENDFACTOR_INV_SRC_COLOR ||
dstA == PIPE_BLENDFACTOR_INV_SRC_ALPHA ||
- dstA == PIPE_BLENDFACTOR_ZERO)) {
+ dstA == PIPE_BLENDFACTOR_ZERO) &&
+ (srcRGB != PIPE_BLENDFACTOR_DST_COLOR &&
+ srcRGB != PIPE_BLENDFACTOR_DST_ALPHA &&
+ srcRGB != PIPE_BLENDFACTOR_INV_DST_COLOR &&
+ srcRGB != PIPE_BLENDFACTOR_INV_DST_ALPHA)) {
blend_control |= R500_SRC_ALPHA_1_NO_READ;
}
}