<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Reviewed-by: Tim Rowley <<a href="mailto:timothy.o.rowley@intel.com" class="">timothy.o.rowley@intel.com</a>>
<div class=""><br class="">
<div style="">
<blockquote type="cite" class="">
<div class="">On Nov 21, 2016, at 11:52 AM, Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu" class="">imirkin@alum.mit.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">The way that dual-source blending is described for GLES2 is very odd,<br class="">
and we end up with a shader that both has this property set *and* has a<br class="">
color1 value to be used as the second source. While changing the state<br class="">
tracker is an option, it seems more reliable to verify that the<br class="">
broadcast is only done on color0.<br class="">
<br class="">
Fixes arb_blend_func_extended-fbo-extended-blend-pattern_gles2<br class="">
<br class="">
Signed-off-by: Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu" class="">imirkin@alum.mit.edu</a>><br class="">
---<br class="">
src/gallium/drivers/swr/swr_shader.cpp | 3 ++-<br class="">
1 file changed, 2 insertions(+), 1 deletion(-)<br class="">
<br class="">
diff --git a/src/gallium/drivers/swr/swr_shader.cpp b/src/gallium/drivers/swr/swr_shader.cpp<br class="">
index e4f9796..2f72239 100644<br class="">
--- a/src/gallium/drivers/swr/swr_shader.cpp<br class="">
+++ b/src/gallium/drivers/swr/swr_shader.cpp<br class="">
@@ -645,7 +645,8 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key)<br class="">
<br class="">
LLVMValueRef out =<br class="">
LLVMBuildLoad(gallivm->builder, outputs[attrib][channel], "");<br class="">
- if (swr_fs->info.base.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS]) {<br class="">
+ if (swr_fs->info.base.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS] &&<br class="">
+ swr_fs->info.base.output_semantic_index[attrib] == 0) {<br class="">
for (uint32_t rt = 0; rt < key.nr_cbufs; rt++) {<br class="">
STORE(unwrap(out),<br class="">
pPS,<br class="">
-- <br class="">
2.7.3<br class="">
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>