Not use texture bound cache in unexpected cases 96/244396/2
authorHeeyong Song <heeyong.song@samsung.com>
Fri, 18 Sep 2020 06:14:22 +0000 (15:14 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Tue, 22 Sep 2020 01:27:56 +0000 (01:27 +0000)
Change-Id: I7866750a920a5c9da8c554088f72af501052a239

dali/internal/render/gl-resources/context.h

index 2e5a0ee..89538f0 100644 (file)
@@ -359,10 +359,19 @@ public:
   void BindTexture( int target, GLuint texture )
   {
     int16_t index = GetTextureIndexFromGlFormat(target);
-    if(index >= 0 && mBoundTextureId[ mActiveTextureUnit ][index] != texture)
+    if(index >= 0)
     {
-      mBoundTextureId[ mActiveTextureUnit ][index] = texture;
+      if(mBoundTextureId[ mActiveTextureUnit ][index] != texture)
+      {
+        mBoundTextureId[ mActiveTextureUnit ][index] = texture;
 
+        LOG_GL("BindTexture target(%d) %d\n", target, texture);
+        CHECK_GL(mGlAbstraction, mGlAbstraction.BindTexture(target, texture));
+      }
+    }
+    else
+    {
+      // Don't use cache
       LOG_GL("BindTexture target(%d) %d\n", target, texture);
       CHECK_GL(mGlAbstraction, mGlAbstraction.BindTexture(target, texture));
     }