The GLenum target parameter was not used in intel_copy_texsubimage, so
remove it. Also remove the GLenum internalFormat parameter. Each
caller just copied this out of the intel_texture_image that is already
passed to intel_copy_texsubimage.
Reviewed-by: Eric Anholt <eric@anholt.net>
struct gl_texture_image *texImage =
_mesa_select_tex_image(ctx, texObj, target, dstLevel);
struct gl_texture_image *texImage =
_mesa_select_tex_image(ctx, texObj, target, dstLevel);
- GLenum internalFormat = texImage->InternalFormat;
- if (intel_copy_texsubimage(intel_context(ctx), target,
+ if (intel_copy_texsubimage(intel_context(ctx),
intel_texture_image(texImage),
intel_texture_image(texImage),
dstX0, dstY0,
srcX0, srcY0,
srcX1 - srcX0, /* width */
dstX0, dstY0,
srcX0, srcY0,
srcX1 - srcX0, /* width */
int intel_compressed_num_bytes(GLuint mesaFormat);
GLboolean intel_copy_texsubimage(struct intel_context *intel,
int intel_compressed_num_bytes(GLuint mesaFormat);
GLboolean intel_copy_texsubimage(struct intel_context *intel,
struct intel_texture_image *intelImage,
struct intel_texture_image *intelImage,
GLint dstx, GLint dsty,
GLint x, GLint y,
GLsizei width, GLsizei height);
GLint dstx, GLint dsty,
GLint x, GLint y,
GLsizei width, GLsizei height);
GLboolean
intel_copy_texsubimage(struct intel_context *intel,
GLboolean
intel_copy_texsubimage(struct intel_context *intel,
struct intel_texture_image *intelImage,
struct intel_texture_image *intelImage,
GLint dstx, GLint dsty,
GLint x, GLint y, GLsizei width, GLsizei height)
{
struct gl_context *ctx = &intel->ctx;
struct intel_renderbuffer *irb;
GLint dstx, GLint dsty,
GLint x, GLint y, GLsizei width, GLsizei height)
{
struct gl_context *ctx = &intel->ctx;
struct intel_renderbuffer *irb;
+ const GLenum internalFormat = intelImage->base.InternalFormat;
bool copy_supported = false;
bool copy_supported_with_alpha_override = false;
bool copy_supported = false;
bool copy_supported_with_alpha_override = false;
_mesa_select_tex_object(ctx, texUnit, target);
struct gl_texture_image *texImage =
_mesa_select_tex_image(ctx, texObj, target, level);
_mesa_select_tex_object(ctx, texUnit, target);
struct gl_texture_image *texImage =
_mesa_select_tex_image(ctx, texObj, target, level);
- GLenum internalFormat = texImage->InternalFormat;
/* XXX need to check <border> as in above function? */
/* Need to check texture is compatible with source format.
*/
/* XXX need to check <border> as in above function? */
/* Need to check texture is compatible with source format.
*/
- if (!intel_copy_texsubimage(intel_context(ctx), target,
+ if (!intel_copy_texsubimage(intel_context(ctx),
intel_texture_image(texImage),
intel_texture_image(texImage),
- internalFormat, xoffset, 0, x, y, width, 1)) {
+ xoffset, 0, x, y, width, 1)) {
fallback_debug("%s - fallback to swrast\n", __FUNCTION__);
_mesa_meta_CopyTexSubImage1D(ctx, target, level, xoffset, x, y, width);
}
fallback_debug("%s - fallback to swrast\n", __FUNCTION__);
_mesa_meta_CopyTexSubImage1D(ctx, target, level, xoffset, x, y, width);
}
_mesa_select_tex_object(ctx, texUnit, target);
struct gl_texture_image *texImage =
_mesa_select_tex_image(ctx, texObj, target, level);
_mesa_select_tex_object(ctx, texUnit, target);
struct gl_texture_image *texImage =
_mesa_select_tex_image(ctx, texObj, target, level);
- GLenum internalFormat = texImage->InternalFormat;
/* Need to check texture is compatible with source format.
*/
/* Need to check texture is compatible with source format.
*/
- if (!intel_copy_texsubimage(intel_context(ctx), target,
+ if (!intel_copy_texsubimage(intel_context(ctx),
intel_texture_image(texImage),
intel_texture_image(texImage),
xoffset, yoffset, x, y, width, height)) {
fallback_debug("%s - fallback to swrast\n", __FUNCTION__);
_mesa_meta_CopyTexSubImage2D(ctx, target, level,
xoffset, yoffset, x, y, width, height)) {
fallback_debug("%s - fallback to swrast\n", __FUNCTION__);
_mesa_meta_CopyTexSubImage2D(ctx, target, level,