From: Karol Herbst Date: Fri, 10 Jul 2020 18:23:42 +0000 (+0200) Subject: nv50/ir/tgsi: move call to tgsi_scan_shader inside Source constructor X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=033e933348cbed141401b1025d658f5d9b1a8a53;p=mesa.git nv50/ir/tgsi: move call to tgsi_scan_shader inside Source constructor We actually need it there already, we just missed to move it. Fixes: 66ed9792edb702 ("nv50: Clear nv50_ir_prog_info of dead and codegen specific variables") Signed-off-by: Karol Herbst Part-of: --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index f0bf2932e3b..68135473024 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -1061,6 +1061,8 @@ Source::Source(struct nv50_ir_prog_info *info, nv50_ir::Program *prog) if (info->dbgFlags & NV50_IR_DEBUG_BASIC) tgsi_dump(tokens, 0); + tgsi_scan_shader(tokens, &scan); + immd.count = 0; immd.data = (uint32_t *)MALLOC(scan.immediate_count * 16); } @@ -1079,8 +1081,6 @@ bool Source::scanSource() unsigned insnCount = 0; struct tgsi_parse_context parse; - tgsi_scan_shader(tokens, &scan); - insns = (struct tgsi_full_instruction *)MALLOC(scan.num_instructions * sizeof(insns[0])); if (!insns)