summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-11-20 19:08:12 -0500
committerIlia Mirkin <[email protected]>2016-11-22 20:27:20 -0500
commit37be598dda8671568fb24105a0cbca7d34cdd2ee (patch)
tree12f28cf31d7c150806f77a567a3aa1a2d1b426f1 /src/gallium/drivers
parent2234a4330ed3a4c8c8b756059619592c5338a379 (diff)
swr: only broadcast color0 value, not all color values
The way that dual-source blending is described for GLES2 is very odd, and we end up with a shader that both has this property set *and* has a color1 value to be used as the second source. While changing the state tracker is an option, it seems more reliable to verify that the broadcast is only done on color0. Fixes arb_blend_func_extended-fbo-extended-blend-pattern_gles2 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/swr/swr_shader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/swr_shader.cpp b/src/gallium/drivers/swr/swr_shader.cpp
index e4f9796ef19..2f7223900d3 100644
--- a/src/gallium/drivers/swr/swr_shader.cpp
+++ b/src/gallium/drivers/swr/swr_shader.cpp
@@ -645,7 +645,8 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key)
LLVMValueRef out =
LLVMBuildLoad(gallivm->builder, outputs[attrib][channel], "");
- if (swr_fs->info.base.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS]) {
+ if (swr_fs->info.base.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS] &&
+ swr_fs->info.base.output_semantic_index[attrib] == 0) {
for (uint32_t rt = 0; rt < key.nr_cbufs; rt++) {
STORE(unwrap(out),
pPS,