summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authorEduardo Lima Mitev <[email protected]>2014-11-20 14:02:46 +0100
committerIago Toral Quiroga <[email protected]>2014-12-09 11:40:00 +0100
commit78942787170615c9333810cf3a4819a13c9eb8e8 (patch)
treef2310194a8d2a4a4bda8a6cd1dcffb7ebcf4f36c /src/mesa/main/fbobject.c
parent242ad326552b10a31667eba0be5677a4d8397dc4 (diff)
mesa: Enables GL_RGB and GL_RGBA unsized internal formats for OpenGL ES 3.0
GL_RGB and GL_RGBA are valid internal formats on a GLES3 profile. See "Table 1. Unsized Internal Formats" at https://www.khronos.org/opengles/sdk/docs/man3/html/glTexImage2D.xhtml. Fixes 2 dEQP tests: - dEQP-GLES3.functional.state_query.internal_format.rgb_samples - dEQP-GLES3.functional.state_query.internal_format.rgba_samples Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r--src/mesa/main/fbobject.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index f5c11c460a9..4c3c157a47e 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1430,6 +1430,9 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
case GL_RGB8:
return GL_RGB;
case GL_RGB:
+ if (_mesa_is_gles3(ctx))
+ return GL_RGB;
+ /* fallthrough */
case GL_R3_G3_B2:
case GL_RGB4:
case GL_RGB5:
@@ -1444,6 +1447,9 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
case GL_RGBA8:
return GL_RGBA;
case GL_RGBA:
+ if (_mesa_is_gles3(ctx))
+ return GL_RGBA;
+ /* fallthrough */
case GL_RGBA2:
case GL_RGBA12:
case GL_RGBA16: