summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2012-11-20 13:45:03 -0800
committerIan Romanick <[email protected]>2013-01-15 13:34:00 -0800
commitcbef5371f6cb0a03f62586f7c5b4ed66511daff4 (patch)
treecfa8029f854507c2bd188631ff300548bfc483eb /src
parent8907b6a8e4461f6064e32ff5419053e74274e770 (diff)
mesa: Reject texture-only formats as renderbuffer formats in ES 3
ES 3 specifies some formats as texture-only (i.e., not available for renderbuffers). See the "Required Texture Formats" section (pg 126) of the ES 3 spec. v2: Allow RED and RG float rendering in core profiles The check used to be (version > 30) || (compat profile w/extensions). Just deleting <version > 30) broke 3.0+ core profiles. Fixes es3conform's color_buffer_unsupported_format test. Signed-off-by: Matt Turner <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/fbobject.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index bb8ee2d8d78..a525877a336 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1111,7 +1111,7 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
case GL_RGB16:
return _mesa_is_desktop_gl(ctx) ? GL_RGB : 0;
case GL_SRGB8_EXT:
- return _mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx) ? GL_RGB : 0;
+ return _mesa_is_desktop_gl(ctx) ? GL_RGB : 0;
case GL_RGBA4:
case GL_RGB5_A1:
case GL_RGBA8:
@@ -1198,25 +1198,21 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
ctx->Extensions.ARB_framebuffer_object ? GL_ALPHA : 0;
case GL_R16F:
case GL_R32F:
- return ctx->Version >= 30
- || (ctx->API == API_OPENGL_COMPAT &&
+ return (_mesa_is_desktop_gl(ctx) &&
ctx->Extensions.ARB_texture_rg &&
ctx->Extensions.ARB_texture_float) ? GL_RED : 0;
case GL_RG16F:
case GL_RG32F:
- return ctx->Version >= 30
- || (ctx->API == API_OPENGL_COMPAT &&
+ return (_mesa_is_desktop_gl(ctx) &&
ctx->Extensions.ARB_texture_rg &&
ctx->Extensions.ARB_texture_float) ? GL_RG : 0;
case GL_RGB16F:
case GL_RGB32F:
return (_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_float)
- || _mesa_is_gles3(ctx)
? GL_RGB : 0;
case GL_RGBA16F:
case GL_RGBA32F:
return (_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_float)
- || _mesa_is_gles3(ctx)
? GL_RGBA : 0;
case GL_ALPHA16F_ARB:
case GL_ALPHA32F_ARB:
@@ -1241,10 +1237,10 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
case GL_RGB9_E5:
return (_mesa_is_desktop_gl(ctx)
&& ctx->Extensions.EXT_texture_shared_exponent)
- || _mesa_is_gles3(ctx) ? GL_RGB : 0;
+ ? GL_RGB : 0;
case GL_R11F_G11F_B10F:
return (_mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_packed_float)
- || _mesa_is_gles3(ctx) ? GL_RGB : 0;
+ ? GL_RGB : 0;
case GL_RGBA8UI_EXT:
case GL_RGBA16UI_EXT: