summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/common/meta_blit.c2
-rw-r--r--src/mesa/drivers/common/meta_generate_mipmap.c6
-rw-r--r--src/mesa/main/copyimage.c2
-rw-r--r--src/mesa/main/fbobject.c2
-rw-r--r--src/mesa/main/genmipmap.c2
-rw-r--r--src/mesa/main/mipmap.c6
-rw-r--r--src/mesa/main/texgetimage.c8
-rw-r--r--src/mesa/main/teximage.c24
-rw-r--r--src/mesa/main/teximage.h3
-rw-r--r--src/mesa/main/texparam.c2
-rw-r--r--src/mesa/main/textureview.c5
-rw-r--r--src/mesa/main/vdpau.c2
12 files changed, 30 insertions, 34 deletions
diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
index 01cb532..079b8e1 100644
--- a/src/mesa/drivers/common/meta_blit.c
+++ b/src/mesa/drivers/common/meta_blit.c
@@ -701,7 +701,7 @@ blitframebuffer_texture(struct gl_context *ctx,
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;
diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c
index 8ffd8da..eedbb8e 100644
--- a/src/mesa/drivers/common/meta_generate_mipmap.c
+++ b/src/mesa/drivers/common/meta_generate_mipmap.c
@@ -71,7 +71,7 @@ fallback_required(struct gl_context *ctx, GLenum target,
}
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");
@@ -265,7 +265,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
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 */
@@ -304,7 +304,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
*/
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);
diff --git a/src/mesa/main/copyimage.c b/src/mesa/main/copyimage.c
index df7d7c2..455929d 100644
--- a/src/mesa/main/copyimage.c
+++ b/src/mesa/main/copyimage.c
@@ -152,7 +152,7 @@ prepare_target(struct gl_context *ctx, GLuint name, GLenum *target, int level,
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);
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 4c3c157..43b0886 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -2967,7 +2967,7 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
}
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,
diff --git a/src/mesa/main/genmipmap.c b/src/mesa/main/genmipmap.c
index 9d111ca..a883332 100644
--- a/src/mesa/main/genmipmap.c
+++ b/src/mesa/main/genmipmap.c
@@ -104,7 +104,7 @@ _mesa_GenerateMipmap(GLenum target)
_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,
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index fdaa682..3ea04e90 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -1901,7 +1901,7 @@ generate_mipmap_uncompressed(struct gl_context *ctx, GLenum target,
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;
@@ -2096,7 +2096,7 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target,
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;
@@ -2193,7 +2193,7 @@ _mesa_generate_mipmap(struct gl_context *ctx, GLenum target,
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;
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index cb5f793..4338d09 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -828,7 +828,7 @@ getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level,
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;
@@ -930,7 +930,7 @@ _mesa_GetnTexImageARB( GLenum target, GLint level, GLenum format,
}
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;
@@ -992,7 +992,7 @@ getcompressedteximage_error_check(struct gl_context *ctx, GLenum target,
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 */
@@ -1069,7 +1069,7 @@ _mesa_GetnCompressedTexImageARB(GLenum target, GLint level, GLsizei bufSize,
}
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;
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 7766904..916a389 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -815,7 +815,6 @@ _mesa_get_current_tex_object(struct gl_context *ctx, GLenum target)
* 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.
@@ -823,8 +822,7 @@ _mesa_get_current_tex_object(struct gl_context *ctx, GLenum target)
* \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);
@@ -851,7 +849,7 @@ _mesa_get_tex_image(struct gl_context *ctx, struct gl_texture_object *texObj,
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) {
@@ -2488,7 +2486,7 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
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,
@@ -2838,7 +2836,7 @@ copytexsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
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,
@@ -3042,7 +3040,7 @@ _mesa_choose_texture_format(struct gl_context *ctx,
/* 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.
*/
@@ -3501,7 +3499,7 @@ texsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
_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. */
@@ -3844,7 +3842,7 @@ copytexsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
_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) {
@@ -4031,7 +4029,7 @@ get_tex_images_for_clear(struct gl_context *ctx,
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);
@@ -4042,7 +4040,7 @@ get_tex_images_for_clear(struct gl_context *ctx,
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);
@@ -4263,7 +4261,7 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dims,
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);
@@ -4354,7 +4352,7 @@ compressed_tex_sub_image(GLuint dims, GLenum target, GLint level,
_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) {
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index caca971..0456050 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -104,8 +104,7 @@ _mesa_get_current_tex_object(struct gl_context *ctx, GLenum target);
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);
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index e40fb24..66893b8 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -1054,7 +1054,7 @@ get_tex_level_parameter_image(struct gl_context *ctx,
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.
*
diff --git a/src/mesa/main/textureview.c b/src/mesa/main/textureview.c
index 6e86a9a..cd87a27 100644
--- a/src/mesa/main/textureview.c
+++ b/src/mesa/main/textureview.c
@@ -355,7 +355,7 @@ _mesa_set_texture_view_state(struct gl_context *ctx,
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.
@@ -527,8 +527,7 @@ _mesa_TextureView(GLuint texture, GLenum target, GLuint origtexture,
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;
diff --git a/src/mesa/main/vdpau.c b/src/mesa/main/vdpau.c
index e1c3e00..fd7561c 100644
--- a/src/mesa/main/vdpau.c
+++ b/src/mesa/main/vdpau.c
@@ -422,7 +422,7 @@ _mesa_VDPAUUnmapSurfacesNV(GLsizei numSurfaces, const GLintptr *surfaces)
_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,