Commit 6bf1c93f authored by Timothy Arceri's avatar Timothy Arceri

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: default avatarNicolai Hähnle <nicolai.haehnle@amd.com>
parent 882af004
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment