From dad209400d4e5d39076d949364f598b854c7a5d7 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 12 Jul 2019 01:22:02 +0300 Subject: [PATCH] Add feature check for array texture samplers --- source/programcompiler.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/source/programcompiler.cpp b/source/programcompiler.cpp index 00d217a0..989098d7 100644 --- a/source/programcompiler.cpp +++ b/source/programcompiler.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -1954,6 +1955,26 @@ void ProgramCompiler::LegacyConverter::visit(FunctionCall &call) call.name = "shadow1D"; else if(type=="sampler2DShadow") call.name = "shadow2D"; + else if(type=="sampler1DArray") + { + check_extension(EXT_texture_array); + call.name = "texture1DArray"; + } + else if(type=="sampler2DArray") + { + check_extension(EXT_texture_array); + call.name = "texture2DArray"; + } + else if(type=="sampler1DArrayShadow") + { + check_extension(EXT_texture_array); + call.name = "shadow1DArray"; + } + else if(type=="sampler2DArrayShadow") + { + check_extension(EXT_texture_array); + call.name = "shadow2DArray"; + } for(; i!=call.arguments.end(); ++i) (*i)->visit(*this); -- 2.45.2