From 789fa7e378c003871e660076569713324abd4b4a Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 7 Jun 2020 09:52:02 +1000 Subject: [PATCH] nvir/nir: fix fragment program output when using MRT v2: - use BITFIELD64_BIT() Signed-off-by: Ben Skeggs Reviewed-by: Karol Herbst Part-of: --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp index c058eea2354..32eac3f26d2 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp @@ -1067,7 +1067,11 @@ bool Converter::assignSlots() { case TGSI_SEMANTIC_COLOR: if (!var->data.fb_fetch_output) info->prop.fp.numColourResults++; - info->prop.fp.separateFragData = true; + + if (var->data.location == FRAG_RESULT_COLOR && + nir->info.outputs_written & BITFIELD64_BIT(var->data.location)) + info->prop.fp.separateFragData = true; + // sometimes we get FRAG_RESULT_DATAX with data.index 0 // sometimes we get FRAG_RESULT_DATA0 with data.index X index = index == 0 ? var->data.index : index; -- 2.30.2