summaryrefslogtreecommitdiffstats
path: root/gpu/GLES2
diff options
context:
space:
mode:
authordongseong.hwang@intel.com <dongseong.hwang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-22 22:20:44 +0000
committerdongseong.hwang@intel.com <dongseong.hwang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-22 22:27:16 +0000
commita6e3d28b21d70ba984bc810f0705b3339805c61a (patch)
tree3fc31e7a0db6b976f55ec144e3ad843853d4d1c2 /gpu/GLES2
parentcb81131b553176b309d89610f06d2b0534964d3b (diff)
downloadchromium_src-a6e3d28b21d70ba984bc810f0705b3339805c61a.zip
chromium_src-a6e3d28b21d70ba984bc810f0705b3339805c61a.tar.gz
chromium_src-a6e3d28b21d70ba984bc810f0705b3339805c61a.tar.bz2
gpu: glCopyTextureCHROMIUM() checks dest internal format incorrectly.
|internal_format| which a client passes as argument and dest internal format which is the format of current destination texture can be different. If different, glCopyTextureCHROMIUM redefines the destination texture. So we should check dest internal format using |internal_format| argument. In addition, some platforms reports error when |internal_format| is GL_ALPHA, GL_LUMINANCE or GL_LUMINANCE_ALPHA, because those formats can not attached as color attachment of FBO on some platforms. So we restrict |internal_format| to GL_RGB and GL_RGBA. TEST=GLCopyTextureCHROMIUMTest.InternalFormat, GLCopyTextureCHROMIUMTest.RedefineDestinationTexture Review URL: https://codereview.chromium.org/481913005 Cr-Commit-Position: refs/heads/master@{#291528} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291528 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/GLES2')
-rw-r--r--gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt
index fdaa7d6..ad9ca68 100644
--- a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt
+++ b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt
@@ -48,7 +48,10 @@ New Procedures and Functions
The internal format of the destination texture is converted to that
specified by <internal_format>. Must be one of the following symbolic
- constants: GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA
+ constants: GL_RGB, GL_RGBA
+ The internal format of <source_id> texture must be one of the following
+ symbolic constants: GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB,
+ GL_RGBA, GL_BGRA_EXT
When <source_id> texture doens't contain a superset of the component
required by <internal_format>, fill the components by following rules.
@@ -59,12 +62,19 @@ New Procedures and Functions
GL_LUMINANCE_ALPHA (L, L, L, A)
GL_RGB (R, G, B, 1)
GL_RGBA (R, G, B, A)
+ GL_BGRA_EXT (R, G, B, A)
The format type of the destination texture is converted to that specified
by <dest_type>.
<target> uses the same parameters as TexImage2D.
+ INVALID_OPERATION is generated if <internal_format> is not one of the valid formats
+ described above.
+
+ INVALID_OPERATION is generated if the internal format of <source_id> is not one of
+ formats from the table above.
+
INVALID_VALUE is generated if <target> is not GL_TEXTURE_2D.
INVALID_VALUE is generated if <source_id> or <dest_id> are not valid texture