From 14288bcffcd270aa4d409aceeb04e737166a4fa1 Mon Sep 17 00:00:00 2001 From: seungho baek Date: Fri, 16 Jun 2023 17:40:18 +0900 Subject: [PATCH] [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 --- dali/internal/graphics/gles-impl/gles-context.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 -- 2.7.4