if (target == GL_TEXTURE_2D) {
const struct gl_texture_image *texImage
- = _mesa_select_tex_image(ctx, texObj, target, srcLevel);
+ = _mesa_select_tex_image(texObj, target, srcLevel);
s0 = srcX0 / (float) texImage->Width;
s1 = srcX1 / (float) texImage->Width;
t0 = srcY0 / (float) texImage->Height;
}
srcLevel = texObj->BaseLevel;
- baseImage = _mesa_select_tex_image(ctx, texObj, target, srcLevel);
+ baseImage = _mesa_select_tex_image(texObj, target, srcLevel);
if (!baseImage) {
_mesa_perf_debug(ctx, MESA_DEBUG_SEVERITY_HIGH,
"glGenerateMipmap() couldn't find base teximage\n");
GLsizei srcWidth, srcHeight, srcDepth;
GLsizei dstWidth, dstHeight, dstDepth;
- srcImage = _mesa_select_tex_image(ctx, texObj, faceTarget, srcLevel);
+ srcImage = _mesa_select_tex_image(texObj, faceTarget, srcLevel);
assert(srcImage->Border == 0);
/* src size */
*/
break;
}
- dstImage = _mesa_select_tex_image(ctx, texObj, faceTarget, dstLevel);
+ dstImage = _mesa_select_tex_image(texObj, faceTarget, dstLevel);
/* limit minification to src level */
_mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, srcLevel);
return false;
}
- *tex_image = _mesa_select_tex_image(ctx, *tex_obj, *target, level);
+ *tex_image = _mesa_select_tex_image(*tex_obj, *target, level);
if (!*tex_image) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glCopyImageSubData(%sLevel = %u)", dbg_prefix, level);
}
else if (att->Texture) {
const struct gl_texture_image *texImage =
- _mesa_select_tex_image(ctx, att->Texture, att->Texture->Target,
+ _mesa_select_tex_image(att->Texture, att->Texture->Target,
att->TextureLevel);
if (texImage) {
*params = get_component_bits(pname, texImage->_BaseFormat,
_mesa_lock_texture(ctx, texObj);
- srcImage = _mesa_select_tex_image(ctx, texObj, target, texObj->BaseLevel);
+ srcImage = _mesa_select_tex_image(texObj, target, texObj->BaseLevel);
if (!srcImage) {
_mesa_unlock_texture(ctx, texObj);
_mesa_error(ctx, GL_INVALID_OPERATION,
GLboolean success = GL_TRUE;
/* get src image parameters */
- srcImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ srcImage = _mesa_select_tex_image(texObj, target, level);
ASSERT(srcImage);
srcWidth = srcImage->Width;
srcHeight = srcImage->Height;
GLuint i;
/* get src image parameters */
- srcImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ srcImage = _mesa_select_tex_image(texObj, target, level);
ASSERT(srcImage);
srcWidth = srcImage->Width;
srcHeight = srcImage->Height;
GLint maxLevel;
ASSERT(texObj);
- srcImage = _mesa_select_tex_image(ctx, texObj, target, texObj->BaseLevel);
+ srcImage = _mesa_select_tex_image(texObj, target, texObj->BaseLevel);
ASSERT(srcImage);
maxLevel = _mesa_max_texture_levels(ctx, texObj->Target) - 1;
return GL_TRUE;
}
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texImage = _mesa_select_tex_image(texObj, target, level);
if (!texImage) {
/* non-existant texture image */
return GL_TRUE;
}
texObj = _mesa_get_current_tex_object(ctx, target);
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texImage = _mesa_select_tex_image(texObj, target, level);
if (_mesa_is_zero_size_texture(texImage))
return;
return GL_TRUE;
}
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texImage = _mesa_select_tex_image(texObj, target, level);
if (!texImage) {
/* probably invalid mipmap level */
}
texObj = _mesa_get_current_tex_object(ctx, target);
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texImage = _mesa_select_tex_image(texObj, target, level);
if (_mesa_is_zero_size_texture(texImage))
return;
* target and mipmap level. The target and level parameters should
* have already been error-checked.
*
- * \param ctx GL context.
* \param texObj texture unit.
* \param target texture target.
* \param level image level.
* \return pointer to the texture image structure, or NULL on failure.
*/
struct gl_texture_image *
-_mesa_select_tex_image(struct gl_context *ctx,
- const struct gl_texture_object *texObj,
+_mesa_select_tex_image(const struct gl_texture_object *texObj,
GLenum target, GLint level)
{
const GLuint face = _mesa_tex_target_to_face(target);
if (!texObj)
return NULL;
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texImage = _mesa_select_tex_image(texObj, target, level);
if (!texImage) {
texImage = ctx->Driver.NewTextureImage(ctx);
if (!texImage) {
return GL_TRUE;
}
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texImage = _mesa_select_tex_image(texObj, target, level);
if (!texImage) {
/* non-existant texture level */
_mesa_error(ctx, GL_INVALID_OPERATION,
return GL_TRUE;
}
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texImage = _mesa_select_tex_image(texObj, target, level);
if (!texImage) {
/* destination image does not exist */
_mesa_error(ctx, GL_INVALID_OPERATION,
/* see if we've already chosen a format for the previous level */
if (level > 0) {
struct gl_texture_image *prevImage =
- _mesa_select_tex_image(ctx, texObj, target, level - 1);
+ _mesa_select_tex_image(texObj, target, level - 1);
/* See if the prev level is defined and has an internal format which
* matches the new internal format.
*/
_mesa_lock_texture(ctx, texObj);
{
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texImage = _mesa_select_tex_image(texObj, target, level);
if (width > 0 && height > 0 && depth > 0) {
/* If we have a border, offset=-1 is legal. Bias by border width. */
_mesa_lock_texture(ctx, texObj);
{
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texImage = _mesa_select_tex_image(texObj, target, level);
/* If we have a border, offset=-1 is legal. Bias by border width. */
switch (dims) {
for (i = 0; i < MAX_FACES; i++) {
target = GL_TEXTURE_CUBE_MAP_POSITIVE_X + i;
- texImages[i] = _mesa_select_tex_image(ctx, texObj, target, level);
+ texImages[i] = _mesa_select_tex_image(texObj, target, level);
if (texImages[i] == NULL) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(invalid level)", function);
return MAX_FACES;
}
- texImages[0] = _mesa_select_tex_image(ctx, texObj, texObj->Target, level);
+ texImages[0] = _mesa_select_tex_image(texObj, texObj->Target, level);
if (texImages[0] == NULL) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(invalid level)", function);
return GL_TRUE;
}
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texImage = _mesa_select_tex_image(texObj, target, level);
if (!texImage) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glCompressedTexSubImage%uD(invalid texture image)", dims);
_mesa_lock_texture(ctx, texObj);
{
- texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texImage = _mesa_select_tex_image(texObj, target, level);
assert(texImage);
if (width > 0 && height > 0 && depth > 0) {
extern struct gl_texture_image *
-_mesa_select_tex_image(struct gl_context *ctx,
- const struct gl_texture_object *texObj,
+_mesa_select_tex_image(const struct gl_texture_object *texObj,
GLenum target, GLint level);
struct gl_texture_image dummy_image;
mesa_format texFormat;
- img = _mesa_select_tex_image(ctx, texObj, target, level);
+ img = _mesa_select_tex_image(texObj, target, level);
if (!img || img->TexFormat == MESA_FORMAT_NONE) {
/* In case of undefined texture image return the default values.
*
struct gl_texture_image *texImage;
/* Get a reference to what will become this View's base level */
- texImage = _mesa_select_tex_image(ctx, texObj, target, 0);
+ texImage = _mesa_select_tex_image(texObj, target, 0);
/* When an immutable texture is created via glTexStorage or glTexImageMultisample,
* TEXTURE_IMMUTABLE_FORMAT becomes TRUE.
faceTarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X + minlayer;
/* Get a reference to what will become this View's base level */
- origTexImage = _mesa_select_tex_image(ctx, origTexObj,
- faceTarget, minlevel);
+ origTexImage = _mesa_select_tex_image(origTexObj, faceTarget, minlevel);
width = origTexImage->Width;
height = origTexImage->Height;
depth = origTexImage->Depth;
_mesa_lock_texture(ctx, tex);
- image = _mesa_select_tex_image(ctx, tex, surf->target, 0);
+ image = _mesa_select_tex_image(tex, surf->target, 0);
ctx->Driver.VDPAUUnmapSurface(ctx, surf->target, surf->access,
surf->output, tex, image,