diff options
author | marha <marha@users.sourceforge.net> | 2012-12-17 11:51:13 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-12-17 11:51:13 +0100 |
commit | 840c8745518b92303d40f6834e9c616587242231 (patch) | |
tree | 097a30453fb59b6a88708c3f576e824e8f237c52 /mesalib/src/mesa/main/teximage.c | |
parent | b395c3c85251d4e8761704d8e3a3c9f9fa5b45cc (diff) | |
download | vcxsrv-840c8745518b92303d40f6834e9c616587242231.tar.gz vcxsrv-840c8745518b92303d40f6834e9c616587242231.tar.bz2 vcxsrv-840c8745518b92303d40f6834e9c616587242231.zip |
libXft pixman mesa git update 17 dec 2012
libXft: 835cd2a6cb4aa8f89e6e7dead66483643a6e7ee8
pixman: 526dc06e5694172abf979c03a5cf530207fe2d27
mesa: 1358f3a905448f6fb546aba951e317f743a83c76
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r-- | mesalib/src/mesa/main/teximage.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index 83b7e1488..7a0d944fd 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -791,9 +791,9 @@ _mesa_select_tex_object(struct gl_context *ctx, case GL_PROXY_TEXTURE_2D_ARRAY_EXT: return arrayTex ? ctx->Texture.ProxyTex[TEXTURE_2D_ARRAY_INDEX] : NULL; case GL_TEXTURE_BUFFER: - return _mesa_is_desktop_gl(ctx) - && ctx->Extensions.ARB_texture_buffer_object - ? texUnit->CurrentTex[TEXTURE_BUFFER_INDEX] : NULL; + return ctx->API == API_OPENGL_CORE && + ctx->Extensions.ARB_texture_buffer_object ? + texUnit->CurrentTex[TEXTURE_BUFFER_INDEX] : NULL; case GL_TEXTURE_EXTERNAL_OES: return ctx->Extensions.OES_EGL_image_external ? texUnit->CurrentTex[TEXTURE_EXTERNAL_INDEX] : NULL; @@ -994,9 +994,8 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target) return ctx->Extensions.ARB_texture_cube_map_array ? ctx->Const.MaxCubeTextureLevels : 0; case GL_TEXTURE_BUFFER: - return _mesa_is_desktop_gl(ctx) - && ctx->Extensions.ARB_texture_buffer_object - ? 1 : 0; + return ctx->API == API_OPENGL_CORE && + ctx->Extensions.ARB_texture_buffer_object ? 1 : 0; case GL_TEXTURE_EXTERNAL_OES: /* fall-through */ default: @@ -3849,6 +3848,13 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat) case GL_R32UI: return MESA_FORMAT_R_UINT32; + case GL_RGB32F: + return MESA_FORMAT_RGB_FLOAT32; + case GL_RGB32UI: + return MESA_FORMAT_RGB_UINT32; + case GL_RGB32I: + return MESA_FORMAT_RGB_INT32; + default: return MESA_FORMAT_NONE; } @@ -3880,6 +3886,12 @@ validate_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat) if (base_format == GL_R || base_format == GL_RG) return MESA_FORMAT_NONE; } + + if (!ctx->Extensions.ARB_texture_buffer_object_rgb32) { + GLenum base_format = _mesa_get_format_base_format(format); + if (base_format == GL_RGB) + return MESA_FORMAT_NONE; + } return format; } @@ -3895,8 +3907,8 @@ _mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - if (!(ctx->Extensions.ARB_texture_buffer_object - && _mesa_is_desktop_gl(ctx))) { + if (!(ctx->API == API_OPENGL_CORE && + ctx->Extensions.ARB_texture_buffer_object)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glTexBuffer"); return; } |