Mesa (master): nir/lower_fragcolor: Fix driver_location assignment
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 23 17:50:09 UTC 2021
Module: Mesa
Branch: master
Commit: 73eb497b86a319d7d2aff9178cb07dd6b9d65df7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=73eb497b86a319d7d2aff9178cb07dd6b9d65df7
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Thu Apr 22 11:23:39 2021 -0400
nir/lower_fragcolor: Fix driver_location assignment
Fixes crash in
dEQP-GLES31.functional.shaders.framebuffer_fetch.basic.last_frag_data
when using this pass.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10411>
---
src/compiler/nir/nir_lower_fragcolor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/nir/nir_lower_fragcolor.c b/src/compiler/nir/nir_lower_fragcolor.c
index 8b67fcb8946..70ade5cacf7 100644
--- a/src/compiler/nir/nir_lower_fragcolor.c
+++ b/src/compiler/nir/nir_lower_fragcolor.c
@@ -88,7 +88,7 @@ lower_fragcolor_instr(nir_builder *b, nir_instr *intr, UNUSED void *data)
nir_variable *out_color = nir_variable_create(b->shader, nir_var_shader_out,
out->type, name);
out_color->data.location = FRAG_RESULT_DATA0 + i;
- out_color->data.driver_location = i;
+ out_color->data.driver_location = b->shader->num_outputs++;
out_color->data.index = out->data.index;
nir_store_var(b, out_color, frag_color, writemask);
b->shader->info.outputs_written |= BITFIELD64_BIT(FRAG_RESULT_DATA0 + i);
More information about the mesa-commit
mailing list