From ac9c330100fb0eb5cb5cfc700c9fb7016cd72b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9=20=D0=A2=D1=83?= =?UTF-8?q?=D0=BB=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Wed, 29 Jan 2020 22:50:50 +0200 Subject: [PATCH] Fixes #2000. Restored old behavior of handling shaders with "#version 430" in them. --- src/renderer_gl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 0819cdd9a..89f3ff8c8 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -5375,7 +5375,8 @@ namespace bgfx { namespace gl if (0 != m_id) { - if (GL_COMPUTE_SHADER != m_type) + if (GL_COMPUTE_SHADER != m_type + && 0 != bx::strCmp(code, "#version 430", 12) ) // #2000 { int32_t tempLen = code.getLength() + (4<<10); char* temp = (char*)alloca(tempLen); @@ -5873,7 +5874,7 @@ namespace bgfx { namespace gl code.set(temp); } - else // GL_COMPUTE_SHADER + else if (GL_COMPUTE_SHADER == m_type) { int32_t codeLen = (int32_t)bx::strLen(code); int32_t tempLen = codeLen + (4<<10);