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:
Sandy Carter
2019-09-24 17:09:18 +02:00
committed by Бранимир Караџић
parent 9d09b965f5
commit d7e3f03780

View File

@@ -5660,6 +5660,7 @@ namespace bgfx { namespace gl
else
{
bx::write(&writer, "#define texture2DArrayLodEXT texture2DArrayLod\n");
bx::write(&writer, "#define textureArray texture\n");
}
}