mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-09-19 22:30:03 +00:00
For arrayed textures in GLSL < 130, require GL_EXT_texture_array and emit correct texture lookup function names
This commit is contained in:
parent
e2a37b6301
commit
2199063e3c
@ -1798,10 +1798,10 @@ string CompilerGLSL::legacy_tex_op(const std::string &op, const SPIRType &imgtyp
|
||||
switch (imgtype.image.dim)
|
||||
{
|
||||
case spv::Dim1D:
|
||||
type = "1D";
|
||||
type = (imgtype.image.arrayed && !options.es) ? "1DArray" : "1D";
|
||||
break;
|
||||
case spv::Dim2D:
|
||||
type = "2D";
|
||||
type = (imgtype.image.arrayed && !options.es) ? "2DArray" : "2D";
|
||||
break;
|
||||
case spv::Dim3D:
|
||||
type = "3D";
|
||||
@ -4479,7 +4479,11 @@ string CompilerGLSL::image_type_glsl(const SPIRType &type)
|
||||
if (type.image.ms)
|
||||
res += "MS";
|
||||
if (type.image.arrayed)
|
||||
{
|
||||
if (!options.es && options.version < 130)
|
||||
require_extension("GL_EXT_texture_array");
|
||||
res += "Array";
|
||||
}
|
||||
if (type.image.depth)
|
||||
res += "Shadow";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user