OSDN Git Service

Treat rebinding the same image as a noop.
authorGreg Hartman <ghartman@google.com>
Tue, 7 Jul 2015 20:05:05 +0000 (13:05 -0700)
committerGreg Hartman <ghartman@google.com>
Wed, 8 Jul 2015 18:43:29 +0000 (18:43 +0000)
Bug 22321923

Change-Id: Ib32137a0ac940ab40d375e928e3334b50387c5d5
Reviewed-on: https://swiftshader-review.googlesource.com/3667
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Greg Hartman <ghartman@google.com>
src/OpenGL/libGLESv2/Texture.cpp

index 6c218fc..9551503 100644 (file)
@@ -777,6 +777,11 @@ void Texture2D::copySubImage(GLenum target, GLint level, GLint xoffset, GLint yo
 \r
 void Texture2D::setImage(egl::Image *sharedImage)\r
 {\r
+       if (sharedImage == image[0])\r
+       {\r
+               return;\r
+       }\r
+\r
        sharedImage->addRef();\r
 \r
     if(image[0])\r