mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
some fixes for compressed cube maps (bug 11986)
This commit is contained in:
parent
95e84a09ce
commit
53cf87be1b
2 changed files with 6 additions and 5 deletions
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.5.2
|
||||
* Version: 7.1
|
||||
*
|
||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -957,7 +957,8 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
|
|||
GLint components, size;
|
||||
GLchan *dst;
|
||||
|
||||
assert(texObj->Target == GL_TEXTURE_2D);
|
||||
assert(texObj->Target == GL_TEXTURE_2D ||
|
||||
texObj->Target == GL_TEXTURE_CUBE_MAP_ARB);
|
||||
|
||||
if (srcImage->_BaseFormat == GL_RGB) {
|
||||
convertFormat = &_mesa_texformat_rgb;
|
||||
|
|
|
|||
|
|
@ -1998,7 +1998,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
|
|||
}
|
||||
|
||||
if (is_compressed_format(ctx, internalFormat)) {
|
||||
if (target != GL_TEXTURE_2D) {
|
||||
if (!target_can_be_compressed(ctx, target)) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glCopyTexImage%d(target)", dimensions);
|
||||
return GL_TRUE;
|
||||
|
|
@ -2181,7 +2181,7 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
|
|||
}
|
||||
|
||||
if (teximage->IsCompressed) {
|
||||
if (target != GL_TEXTURE_2D) {
|
||||
if (!target_can_be_compressed(ctx, target)) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glCopyTexSubImage%d(target)", dimensions);
|
||||
return GL_TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue