[Mesa-dev] [PATCH 19/24] mesa/program: Link SPIR-V shaders using the SPIR-V code-path
Eduardo Lima Mitev
elima at igalia.com
Wed Nov 15 13:22:22 UTC 2017
---
src/mesa/program/ir_to_mesa.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index ddc1705097d..5bbb55e1407 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -36,6 +36,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"
@@ -3091,9 +3092,13 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
"SPIR_V_BINARY_ARB state");
}
}
+ prog->data->spirv = spirv;
if (prog->data->LinkStatus) {
- link_shaders(ctx, prog);
+ if (!spirv)
+ link_shaders(ctx, prog);
+ else
+ _mesa_spirv_link_shaders(ctx, prog);
}
if (prog->data->LinkStatus) {
--
2.11.0
More information about the mesa-dev
mailing list