glsl: use nir version of check_image_resources() for nir linker
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 3 Jan 2020 04:12:59 +0000 (15:12 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 6 Jan 2020 22:53:51 +0000 (09:53 +1100)
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
src/compiler/glsl/gl_nir_linker.c
src/compiler/glsl/linker.cpp

index b3832e5629fcd7bd0fbb426ec590fd85fc9189d9..ad26507bcc639350dfc792253224540b5f7559e2 100644 (file)
@@ -623,6 +623,7 @@ check_image_resources(struct gl_context *ctx, struct gl_shader_program *prog)
 bool
 gl_nir_link_glsl(struct gl_context *ctx, struct gl_shader_program *prog)
 {
+   check_image_resources(ctx, prog);
    gl_nir_link_assign_atomic_counter_resources(ctx, prog);
    gl_nir_link_check_atomic_counter_resources(ctx, prog);
 
index cc770c4d7b188c90370e5fa9583a1b0ce9856de0..bf41337e479d52b56df4b6df547e48df443a2e01 100644 (file)
@@ -4536,9 +4536,9 @@ link_and_validate_uniforms(struct gl_context *ctx,
    link_calculate_subroutine_compat(prog);
    check_resources(ctx, prog);
    check_subroutine_resources(prog);
-   check_image_resources(ctx, prog);
 
    if (!ctx->Const.UseNIRGLSLLinker) {
+      check_image_resources(ctx, prog);
       link_assign_atomic_counter_resources(ctx, prog);
       link_check_atomic_counter_resources(ctx, prog);
    }