From 42fe8c31f18dddcd39c584853c96e0302b68d4c1 Mon Sep 17 00:00:00 2001 From: rob Date: Sun, 18 Sep 2016 13:18:33 +0900 Subject: [PATCH] Do not add layout qualifiers to variables for GLSL versions that don't support it --- spirv_glsl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp index 19187bc6..cd639891 100644 --- a/spirv_glsl.cpp +++ b/spirv_glsl.cpp @@ -804,6 +804,9 @@ bool CompilerGLSL::ssbo_is_std430_packing(const SPIRType &type) string CompilerGLSL::layout_for_variable(const SPIRVariable &var) { + if (is_legacy_es() || (!options.es && options.version < 330)) + return ""; + vector attr; auto &dec = meta[var.self].decoration;