nv50/ir/tgsi: move call to tgsi_scan_shader inside Source constructor
authorKarol Herbst <kherbst@redhat.com>
Fri, 10 Jul 2020 18:23:42 +0000 (20:23 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 10 Jul 2020 21:52:40 +0000 (21:52 +0000)
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 <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5849>

src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp

index f0bf2932e3bfadb964d4407f6244238f8d61c44d..681354730241b3615686845bbd8e9dbe809a33d9 100644 (file)
@@ -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)