mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
shaderc_glsl: Fix error when mixing SamplerArray and flat keyword
Use of the `flat` keyword will have `glslopt_optimize` run with glsl version 130. In this mode, it will change calls of `texture2DArray` to the more general `textureArray`. However, this call results in an error when reading the compiled shader: ``` bgfx/src/renderer_gl.cpp:5904: BGFX Failed to compile shader. 0: 0(45) : error C1503: undefined variable "textureArray" ``` Defining this call to be `texture` avoids this error.
This commit is contained in:
committed by
Бранимир Караџић
parent
9d09b965f5
commit
d7e3f03780
@@ -5660,6 +5660,7 @@ namespace bgfx { namespace gl
|
||||
else
|
||||
{
|
||||
bx::write(&writer, "#define texture2DArrayLodEXT texture2DArrayLod\n");
|
||||
bx::write(&writer, "#define textureArray texture\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user