From 082003a1572d24fa3ff9aa0e0f51bf1154445a70 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Fri, 14 Jul 2017 10:05:38 -0700 Subject: Don't use "auto locations" mode in glslang Fixes #88 The code was using `glslang::TShader::setAutoMapLocations` as a workaround for an old glslang issue, but apparently this mode has a bug where it ends up applying a `location` layout to the implicitly-created `gl_PerVertex` definition (which shouldn't be allowed). This change drops the call to `setAutoMapLocations` (and `setAutoMapBindings`) since it should no longer be required. --- tools/glslang/glslang.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tools/glslang/glslang.cpp b/tools/glslang/glslang.cpp index 98bcf14d6..2890a98ad 100644 --- a/tools/glslang/glslang.cpp +++ b/tools/glslang/glslang.cpp @@ -118,15 +118,6 @@ static int glslang_compileGLSLToSPIRV(glslang_CompileRequest* request) &request->sourcePath, 1); - // Note: this seems required to get past a bug where - // glslang complains about a declaration of `out gl_PerVertex` - // that it (seemingly) *should* allow according to the GLSL-for-Vulkan - // extension. - shader->setAutoMapLocations(true); - - // Let's auto-map the bindings too, just because we can - shader->setAutoMapBindings(true); - EShMessages messages = EShMessages(EShMsgSpvRules | EShMsgVulkanRules); if( !shader->parse(&gResources, 110, false, messages) ) -- cgit v1.2.3