aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-31 10:17:14 +0200
committermarha <marha@users.sourceforge.net>2012-07-31 10:17:14 +0200
commit83da3ad0287bc51cd16ee6911fe73dc98ebe000b (patch)
tree48d48590a0b0a3770006aeda8ec2b2a45054d1f1 /mesalib/src/mesa/main/teximage.c
parent00e30605ffc7ac3cf1a091ff2c1f46cfefb780d7 (diff)
parentbd27b3d008b0abf9ae2edcb127302728808533e4 (diff)
downloadvcxsrv-83da3ad0287bc51cd16ee6911fe73dc98ebe000b.tar.gz
vcxsrv-83da3ad0287bc51cd16ee6911fe73dc98ebe000b.tar.bz2
vcxsrv-83da3ad0287bc51cd16ee6911fe73dc98ebe000b.zip
Merge remote-tracking branch 'origin/released'
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;