summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_ir.cpp2
-rw-r--r--src/mesa/state_tracker/st_glsl_to_nir.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_ir.cpp b/src/mesa/state_tracker/st_glsl_to_ir.cpp
index 25e16fa058c..4d2a45728a9 100644
--- a/src/mesa/state_tracker/st_glsl_to_ir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_ir.cpp
@@ -167,7 +167,7 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
validate_ir_tree(ir);
}
- build_program_resource_list(ctx, prog);
+ build_program_resource_list(ctx, prog, use_nir);
if (use_nir)
return st_link_nir(ctx, prog);
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index c252babb711..425af0cfb5d 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -699,7 +699,7 @@ st_link_nir(struct gl_context *ctx,
if (!gl_nir_link(ctx, shader_program, &opts))
return GL_FALSE;
- nir_build_program_resource_list(ctx, shader_program);
+ nir_build_program_resource_list(ctx, shader_program, true);
for (unsigned i = 0; i < num_shaders; i++) {
struct gl_linked_shader *shader = linked_shader[i];
@@ -721,6 +721,9 @@ st_link_nir(struct gl_context *ctx,
linked_shader[i + 1]->Program->nir);
}
+ if (!shader_program->data->spirv)
+ nir_build_program_resource_list(ctx, shader_program, false);
+
for (unsigned i = 0; i < num_shaders; i++) {
struct gl_linked_shader *shader = linked_shader[i];
nir_shader *nir = shader->Program->nir;