aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-08 09:26:34 +0100
committermarha <marha@users.sourceforge.net>2011-12-08 09:26:34 +0100
commit5b178ff5a5f0b6e481cf9fd9749eb7ef9581c987 (patch)
treea52e6d965bcb5f44858efaf1ab42c7f0a81a573a /mesalib/src/mesa/main/teximage.c
parent528f5bd58a139174170c4130c67dca30193c9057 (diff)
downloadvcxsrv-5b178ff5a5f0b6e481cf9fd9749eb7ef9581c987.tar.gz
vcxsrv-5b178ff5a5f0b6e481cf9fd9749eb7ef9581c987.tar.bz2
vcxsrv-5b178ff5a5f0b6e481cf9fd9749eb7ef9581c987.zip
git update glproto libX11 libxcb mesa xserver 8 dec 2011
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r--mesalib/src/mesa/main/teximage.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index 99905de3a..8a002b675 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -1636,7 +1636,8 @@ texture_error_check( struct gl_context *ctx,
/* additional checks for depth textures */
if (_mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_COMPONENT) {
- /* Only 1D, 2D, rect and array textures supported, not 3D or cubes */
+ /* Only 1D, 2D, rect, array and cube textures supported, not 3D
+ * Cubemaps are only supported for GL version > 3.0 or with EXT_gpu_shader4 */
if (target != GL_TEXTURE_1D &&
target != GL_PROXY_TEXTURE_1D &&
target != GL_TEXTURE_2D &&
@@ -1646,7 +1647,9 @@ texture_error_check( struct gl_context *ctx,
target != GL_TEXTURE_2D_ARRAY &&
target != GL_PROXY_TEXTURE_2D_ARRAY &&
target != GL_TEXTURE_RECTANGLE_ARB &&
- target != GL_PROXY_TEXTURE_RECTANGLE_ARB) {
+ target != GL_PROXY_TEXTURE_RECTANGLE_ARB &&
+ !((_mesa_is_cube_face(target) || target == GL_PROXY_TEXTURE_CUBE_MAP) &&
+ (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_gpu_shader4))) {
if (!isProxy)
_mesa_error(ctx, GL_INVALID_ENUM,
"glTexImage(target/internalFormat)");