*/
struct gl_texture_image *
_mesa_select_tex_image(const struct gl_texture_object *texObj,
- GLenum target, GLint level)
+ GLenum target, GLint level)
{
const GLuint face = _mesa_tex_target_to_face(target);
case GL_PALETTE8_RGB5_A1_OES:
/* check level (note that level should be zero or less!) */
if (level > 0 || level < -maxLevels) {
- reason = "level";
- error = GL_INVALID_VALUE;
+ reason = "level";
+ error = GL_INVALID_VALUE;
goto error;
}
if (dimensions != 2) {
- reason = "compressed paletted textures must be 2D";
- error = GL_INVALID_OPERATION;
+ reason = "compressed paletted textures must be 2D";
+ error = GL_INVALID_OPERATION;
goto error;
}
* checked against the actual size later.
*/
expectedSize = _mesa_cpal_compressed_size(level, internalFormat,
- width, height);
+ width, height);
/* This is for the benefit of the TestProxyTexImage below. It expects
* level to be non-negative. OES_compressed_paletted_texture uses a
default:
/* check level */
if (level < 0 || level >= maxLevels) {
- reason = "level";
- error = GL_INVALID_VALUE;
+ reason = "level";
+ error = GL_INVALID_VALUE;
goto error;
}
}
if (ctx->ReadBuffer->Visual.samples > 0) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glCopyTexImage%dD(multisample FBO)",
- dimensions);
- return GL_TRUE;
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexImage%dD(multisample FBO)", dimensions);
+ return GL_TRUE;
}
}
/* From the EXT_texture_integer spec:
*
- * "INVALID_OPERATION is generated by CopyTexImage* and CopyTexSubImage*
- * if the texture internalformat is an integer format and the read color
- * buffer is not an integer format, or if the internalformat is not an
- * integer format and the read color buffer is an integer format."
+ * "INVALID_OPERATION is generated by CopyTexImage* and
+ * CopyTexSubImage* if the texture internalformat is an integer format
+ * and the read color buffer is not an integer format, or if the
+ * internalformat is not an integer format and the read color buffer
+ * is an integer format."
*/
if (_mesa_is_color_format(texImage->InternalFormat)) {
struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
if (!valid_target) {
_mesa_error(ctx, GL_INVALID_ENUM,
- "glEGLImageTargetTexture2D(target=%d)", target);
+ "glEGLImageTargetTexture2D(target=%d)", target);
return;
}
if (!image) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glEGLImageTargetTexture2D(image=%p)", image);
+ "glEGLImageTargetTexture2D(image=%p)", image);
return;
}
if (texObj->Immutable) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glEGLImageTargetTexture2D(texture is immutable)");
+ "glEGLImageTargetTexture2D(texture is immutable)");
_mesa_unlock_texture(ctx, texObj);
return;
}
* OTHER DEALINGS IN THE SOFTWARE.
*/
-/**
+/**
* \file texstate.c
*
* Texture state handling.
/**
* Convert "classic" texture environment to ARB_texture_env_combine style
* environments.
- *
+ *
* \param state texture_env_combine state vector to be filled-in.
* \param mode Classic texture environment mode (i.e., \c GL_REPLACE,
* \c GL_BLEND, \c GL_DECAL, etc.).
case GL_YCBCR_MESA:
state->SourceA[0] = GL_PREVIOUS;
break;
-
+
default:
_mesa_problem(NULL,
"Invalid texBaseFormat 0x%x in calculate_derived_texenv",
mode_rgb = (texBaseFormat == GL_ALPHA) ? GL_REPLACE : mode;
mode_a = mode;
break;
-
+
case GL_DECAL:
mode_rgb = GL_INTERPOLATE;
mode_a = GL_REPLACE;
mode);
return;
}
-
+
state->ModeRGB = (state->SourceRGB[0] != GL_PREVIOUS)
? mode_rgb : GL_REPLACE;
state->ModeA = (state->SourceA[0] != GL_PREVIOUS)
/**
* Allocate the proxy textures for the given context.
- *
+ *
* \param ctx the context to allocate proxies for.
- *
+ *
* \return GL_TRUE on success, or GL_FALSE on failure
- *
+ *
* If run out of memory part way through the allocations, clean up and return
* GL_FALSE.
*/
/**
* Update the default texture objects in the given context to reference those
- * specified in the shared state and release those referencing the old
+ * specified in the shared state and release those referencing the old
* shared state.
*/
void