Module: Mesa Branch: master Commit: 033e933348cbed141401b1025d658f5d9b1a8a53 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=033e933348cbed141401b1025d658f5d9b1a8a53
Author: Karol Herbst <[email protected]> Date: Fri Jul 10 20:23:42 2020 +0200 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5849> --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
