mesa/program: Link SPIR-V shaders using the SPIR-V code-path
authorEduardo Lima Mitev <elima@igalia.com>
Tue, 10 Oct 2017 12:01:45 +0000 (14:01 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 30 Mar 2018 07:14:56 +0000 (09:14 +0200)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/program/ir_to_mesa.cpp

index b0b322865b71db1f1d06a5103d42926579a3fb54..49ef5ea52d86ba2619643d6d1af71cd11c17b46a 100644 (file)
@@ -35,6 +35,7 @@
 #include "main/shaderapi.h"
 #include "main/shaderobj.h"
 #include "main/uniforms.h"
+#include "main/glspirv.h"
 #include "compiler/glsl/ast.h"
 #include "compiler/glsl/ir.h"
 #include "compiler/glsl/ir_expression_flattening.h"
@@ -3154,7 +3155,10 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
    }
 
    if (prog->data->LinkStatus) {
-      link_shaders(ctx, prog);
+      if (!spirv)
+         link_shaders(ctx, prog);
+      else
+         _mesa_spirv_link_shaders(ctx, prog);
    }
 
    /* If LinkStatus is LINKING_SUCCESS, then reset sampler validated to true.