From df5d1ef2b590e60cf082506ce2898266ba9d3ad4 Mon Sep 17 00:00:00 2001 From: George Ouzounoudis Date: Fri, 14 Apr 2023 15:14:37 +0300 Subject: [PATCH] nouveau/codegen: Fix compact patch varyings in case of NIR The code path was not implemented and an assert was reached. Reviewed-by: M Henning Reviewed-by: Karol Herbst Part-of: --- src/nouveau/codegen/nv50_ir_from_nir.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/nouveau/codegen/nv50_ir_from_nir.cpp b/src/nouveau/codegen/nv50_ir_from_nir.cpp index 113e08f..c044ce4 100644 --- a/src/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/nouveau/codegen/nv50_ir_from_nir.cpp @@ -997,7 +997,6 @@ bool Converter::assignSlots() { } if (var->data.compact) { - assert(!var->data.patch); assert(!(nir->info.outputs_read & 1ull << slot)); if (nir_is_arrayed_io(var, nir->info.stage)) { assert(glsl_type_is_array(type->fields.array)); @@ -1015,6 +1014,7 @@ bool Converter::assignSlots() { if (comps & 0x0f) { nv50_ir_varying *v = &info_out->in[vary]; + v->patch = var->data.patch; v->sn = name; v->si = index; v->mask |= comps & 0x0f; @@ -1023,6 +1023,7 @@ bool Converter::assignSlots() { } if (comps & 0xf0) { nv50_ir_varying *v = &info_out->in[vary + 1]; + v->patch = var->data.patch; v->sn = name; v->si = index + 1; v->mask |= (comps & 0xf0) >> 4; @@ -1110,7 +1111,6 @@ bool Converter::assignSlots() { } if (var->data.compact) { - assert(!var->data.patch); assert(!(nir->info.outputs_read & 1ull << slot)); if (nir_is_arrayed_io(var, nir->info.stage)) { assert(glsl_type_is_array(type->fields.array)); @@ -1128,6 +1128,7 @@ bool Converter::assignSlots() { if (comps & 0x0f) { nv50_ir_varying *v = &info_out->out[vary]; + v->patch = var->data.patch; v->sn = name; v->si = index; v->mask |= comps & 0x0f; @@ -1136,6 +1137,7 @@ bool Converter::assignSlots() { } if (comps & 0xf0) { nv50_ir_varying *v = &info_out->out[vary + 1]; + v->patch = var->data.patch; v->sn = name; v->si = index + 1; v->mask |= (comps & 0xf0) >> 4; -- 2.7.4