aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-26 10:45:42 +0100
committermarha <marha@users.sourceforge.net>2012-01-26 10:45:42 +0100
commit40bdd8b27f5c730b8d0c9a189e89fb51a5400611 (patch)
tree23d7ead2d11ebc95c1d0a5e57cdb2ee5b358110b /mesalib/src/mesa/main/fbobject.c
parentffbc36adb7ea5781a93731212226c47f1d49da5e (diff)
parenteb4c088eb71f93b9639f4ff651523d794f1433f7 (diff)
downloadvcxsrv-40bdd8b27f5c730b8d0c9a189e89fb51a5400611.tar.gz
vcxsrv-40bdd8b27f5c730b8d0c9a189e89fb51a5400611.tar.bz2
vcxsrv-40bdd8b27f5c730b8d0c9a189e89fb51a5400611.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/fbobject.c')
-rw-r--r--mesalib/src/mesa/main/fbobject.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index 2b3ac2e25..987d687b9 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -1225,7 +1225,8 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
case GL_RGBA8I_EXT:
case GL_RGBA16I_EXT:
case GL_RGBA32I_EXT:
- return ctx->Extensions.EXT_texture_integer ? GL_RGBA : 0;
+ return ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer ? GL_RGBA : 0;
case GL_RGB8UI_EXT:
case GL_RGB16UI_EXT:
@@ -1233,7 +1234,8 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
case GL_RGB8I_EXT:
case GL_RGB16I_EXT:
case GL_RGB32I_EXT:
- return ctx->Extensions.EXT_texture_integer ? GL_RGB : 0;
+ return ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer ? GL_RGB : 0;
case GL_R8UI:
case GL_R8I:
@@ -1241,8 +1243,9 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
case GL_R16I:
case GL_R32UI:
case GL_R32I:
- return ctx->Extensions.ARB_texture_rg &&
- ctx->Extensions.EXT_texture_integer ? GL_RED : 0;
+ return ctx->VersionMajor >= 3 ||
+ (ctx->Extensions.ARB_texture_rg &&
+ ctx->Extensions.EXT_texture_integer) ? GL_RED : 0;
case GL_RG8UI:
case GL_RG8I:
@@ -1250,8 +1253,9 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
case GL_RG16I:
case GL_RG32UI:
case GL_RG32I:
- return ctx->Extensions.ARB_texture_rg &&
- ctx->Extensions.EXT_texture_integer ? GL_RG : 0;
+ return ctx->VersionMajor >= 3 ||
+ (ctx->Extensions.ARB_texture_rg &&
+ ctx->Extensions.EXT_texture_integer) ? GL_RG : 0;
case GL_INTENSITY8I_EXT:
case GL_INTENSITY8UI_EXT:
@@ -1280,6 +1284,15 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
return ctx->Extensions.EXT_texture_integer &&
ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE_ALPHA : 0;
+ case GL_ALPHA8I_EXT:
+ case GL_ALPHA8UI_EXT:
+ case GL_ALPHA16I_EXT:
+ case GL_ALPHA16UI_EXT:
+ case GL_ALPHA32I_EXT:
+ case GL_ALPHA32UI_EXT:
+ return ctx->Extensions.EXT_texture_integer &&
+ ctx->Extensions.ARB_framebuffer_object ? GL_ALPHA : 0;
+
case GL_RGB10_A2UI:
return ctx->Extensions.ARB_texture_rgb10_a2ui ? GL_RGBA : 0;
default:
@@ -2392,7 +2405,7 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
"glGetFramebufferAttachmentParameterivEXT(pname)");
}
else {
- if (ctx->Extensions.EXT_framebuffer_sRGB && ctx->Const.sRGBCapable) {
+ if (ctx->Extensions.EXT_framebuffer_sRGB) {
*params = _mesa_get_format_color_encoding(att->Renderbuffer->Format);
}
else {