summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-01-22 14:41:25 +1100
committerTimothy Arceri <[email protected]>2018-01-23 09:11:22 +1100
commit6bf1c93fe07603b3bcc9de88ce92cec61954bb4a (patch)
tree45c23bf756be4b3f39c9ff189a869dd232c26a10
parent882af004d886a08c95622a16f98e17f1b28f85db (diff)
radeonsi/nir: fix fs output index
Fixes the following piglit tests: arb_blend_func_extended-fbo-extended-blend arb_blend_func_extended-fbo-extended-blend-explicit arb_blend_func_extended-fbo-extended-blend-explicit_gles3 arb_blend_func_extended-fbo-extended-blend-pattern arb_blend_func_extended-fbo-extended-blend-pattern_gles2 arb_blend_func_extended-fbo-extended-blend-pattern_gles3 arb_blend_func_extended-fbo-extended-blend_gles3 ext_framebuffer_multisample/alpha-to-coverage-dual-src-blend ext_framebuffer_multisample/alpha-to-one-dual-src-blend Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 97b647434b6..8784117833e 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -317,6 +317,11 @@ void si_nir_scan_shader(const struct nir_shader *nir,
if (nir->info.stage == MESA_SHADER_FRAGMENT) {
tgsi_get_gl_frag_result_semantic(variable->data.location,
&semantic_name, &semantic_index);
+
+ /* Adjust for dual source blending */
+ if (variable->data.index > 0) {
+ semantic_index++;
+ }
} else {
tgsi_get_gl_varying_semantic(variable->data.location, true,
&semantic_name, &semantic_index);