Fix invalid texture use 83/256083/1
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 11 Mar 2021 01:36:05 +0000 (10:36 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 29 Mar 2021 06:55:34 +0000 (15:55 +0900)
Change-Id: I0b3222e30a4ff154ad332664cb5e5c3d6f7ecb84

dali/internal/graphics/gles-impl/gles-context.cpp
dali/internal/graphics/gles-impl/gles-context.h

index 174d51a..eef1268 100644 (file)
@@ -158,6 +158,8 @@ void Context::Flush(bool reset, const GLES::DrawCallDescriptor& drawCall)
       break;
     }
   }
+
+  ClearState();
 }
 
 void Context::BindTextures(const std::vector<Graphics::TextureBinding>& bindings)
@@ -401,4 +403,9 @@ void Context::ResolveStandaloneUniforms()
   }
 }
 
+void Context::ClearState()
+{
+  mImpl->mCurrentTextureBindings.clear();
+}
+
 } // namespace Dali::Graphics::GLES
index 734bdaa..cc4e243 100644 (file)
@@ -122,6 +122,12 @@ public:
   void ResolveStandaloneUniforms();
 
 private:
+  /**
+   * @brief Clear current state
+   */
+  void ClearState();
+
+private:
   struct Impl;
   std::unique_ptr<Impl> mImpl;
 };