radeonsi: keep serialized NIR instead of nir_shader in si_shader_selector
[mesa.git] / src / gallium / drivers / radeonsi / si_shader_tgsi_setup.c
index 91e9bd3dd68d93b17f8cd9c24dcb4a53a5326f0e..cb965cc8eb3f3f8ff8122c1b69af9982b99ee56e 100644 (file)
@@ -1029,7 +1029,8 @@ void si_llvm_context_init(struct si_shader_context *ctx,
 /* Set the context to a certain TGSI shader. Can be called repeatedly
  * to change the shader. */
 void si_llvm_context_set_ir(struct si_shader_context *ctx,
-                           struct si_shader *shader)
+                           struct si_shader *shader,
+                           struct nir_shader *nir)
 {
        struct si_shader_selector *sel = shader->selector;
        const struct tgsi_shader_info *info = &sel->info;
@@ -1058,7 +1059,7 @@ void si_llvm_context_set_ir(struct si_shader_context *ctx,
        ctx->num_samplers = util_last_bit(info->samplers_declared);
        ctx->num_images = util_last_bit(info->images_declared);
 
-       if (sel->nir)
+       if (nir)
                return;
 
        if (info->array_max[TGSI_FILE_TEMPORARY] > 0) {