Mesa (master): nir/lower_fragcolor: set outputs_written for fragdata members
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 21 19:58:14 UTC 2021
Module: Mesa
Branch: master
Commit: 3ccd0891d342cd518b929f5135ad307255ddc789
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3ccd0891d342cd518b929f5135ad307255ddc789
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Wed Apr 7 14:02:06 2021 -0400
nir/lower_fragcolor: set outputs_written for fragdata members
normal gather_info stuff
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10080>
---
src/compiler/nir/nir_lower_fragcolor.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/compiler/nir/nir_lower_fragcolor.c b/src/compiler/nir/nir_lower_fragcolor.c
index 95eaf3dff2e..1d05a3d7d72 100644
--- a/src/compiler/nir/nir_lower_fragcolor.c
+++ b/src/compiler/nir/nir_lower_fragcolor.c
@@ -72,6 +72,8 @@ lower_fragcolor_instr(nir_intrinsic_instr *instr, nir_builder *b, unsigned max_d
/* translate gl_FragColor -> gl_FragData since this is already handled */
out->data.location = FRAG_RESULT_DATA0;
nir_component_mask_t writemask = nir_intrinsic_write_mask(instr);
+ b->shader->info.outputs_written &= ~BITFIELD64_BIT(FRAG_RESULT_COLOR);
+ b->shader->info.outputs_written |= BITFIELD64_BIT(FRAG_RESULT_DATA0);
for (unsigned i = 1; i < max_draw_buffers; i++) {
char name[28];
@@ -83,6 +85,7 @@ lower_fragcolor_instr(nir_intrinsic_instr *instr, nir_builder *b, unsigned max_d
out_color->data.driver_location = i;
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);
}
return true;
}
More information about the mesa-commit
mailing list