aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-31 10:00:43 +0200
committermarha <marha@users.sourceforge.net>2012-07-31 10:00:43 +0200
commitbd27b3d008b0abf9ae2edcb127302728808533e4 (patch)
treea73a74f04a31a0f44465ed82bcf58b180ca53dbd /mesalib/src/mesa/main/teximage.c
parent2ff5448bcca8cba4b62026d5493cb08aaf2838d8 (diff)
downloadvcxsrv-bd27b3d008b0abf9ae2edcb127302728808533e4.tar.gz
vcxsrv-bd27b3d008b0abf9ae2edcb127302728808533e4.tar.bz2
vcxsrv-bd27b3d008b0abf9ae2edcb127302728808533e4.zip
fontconfig libXext mesa xserver pixman git update 31 Jul 2012
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r--mesalib/src/mesa/main/teximage.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index 64b25a82d..d2746c6f3 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -47,6 +47,7 @@
#include "texstate.h"
#include "texpal.h"
#include "mtypes.h"
+#include "glformats.h"
/**
@@ -129,7 +130,7 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
/* GL_BGRA can be an internal format *only* in OpenGL ES (1.x or 2.0).
*/
- if (ctx->API != API_OPENGL) {
+ if (_mesa_is_gles(ctx)) {
switch (internalFormat) {
case GL_BGRA:
return GL_RGBA;
@@ -1764,8 +1765,8 @@ texture_error_check( struct gl_context *ctx,
/* additional checks for integer textures */
if ((ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) &&
- (_mesa_is_integer_format(format) !=
- _mesa_is_integer_format(internalFormat))) {
+ (_mesa_is_enum_format_integer(format) !=
+ _mesa_is_enum_format_integer(internalFormat))) {
if (!isProxy) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glTexImage%dD(integer/non-integer format mismatch)",
@@ -1939,7 +1940,7 @@ subtexture_error_check2( struct gl_context *ctx, GLuint dimensions,
if (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) {
/* both source and dest must be integer-valued, or neither */
if (_mesa_is_format_integer_color(destTex->TexFormat) !=
- _mesa_is_integer_format(format)) {
+ _mesa_is_enum_format_integer(format)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glTexSubImage%dD(integer/non-integer format mismatch)",
dimensions);
@@ -2042,8 +2043,8 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
if (_mesa_is_color_format(internalFormat)) {
struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
- if (_mesa_is_integer_format(rb->InternalFormat) !=
- _mesa_is_integer_format(internalFormat)) {
+ if (_mesa_is_enum_format_integer(rb->InternalFormat) !=
+ _mesa_is_enum_format_integer(internalFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexImage%dD(integer vs non-integer)", dimensions);
return GL_TRUE;