From: seungho baek Date: Fri, 16 Jun 2023 08:40:18 +0000 (+0900) Subject: [Tizen] Fix to do not try to bind texture when there is no active texture in shader... X-Git-Tag: accepted/tizen/7.0/unified/20230825.185051^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=14288bcffcd270aa4d409aceeb04e737166a4fa1 [Tizen] Fix to do not try to bind texture when there is no active texture in shader code Change-Id: Ibd690b68015869f485b3458dc80b81486d3eca8e Signed-off-by: seungho baek --- diff --git a/dali/internal/graphics/gles-impl/gles-context.cpp b/dali/internal/graphics/gles-impl/gles-context.cpp index 56625a0..2b56974 100644 --- a/dali/internal/graphics/gles-impl/gles-context.cpp +++ b/dali/internal/graphics/gles-impl/gles-context.cpp @@ -313,6 +313,12 @@ void Context::Flush(bool reset, const GLES::DrawCallDescriptor& drawCall, GLES:: // elements. This avoids having to sort the bindings. for(const auto& binding : mImpl->mCurrentTextureBindings) { + if(currentSampler >= samplers.size()) + { + // Don't bind more textures than there are active samplers. + break; + } + auto texture = const_cast(static_cast(binding.texture)); // Texture may not have been initialized yet...(tbm_surface timing issue?) @@ -336,11 +342,6 @@ void Context::Flush(bool reset, const GLES::DrawCallDescriptor& drawCall, GLES:: ++currentSampler; currentElement = 0; } - if(currentSampler >= samplers.size()) - { - // Don't bind more textures than there are active samplers. - break; - } } // for each attribute bind vertices