diff options
author | Eric Anholt <[email protected]> | 2013-06-03 15:12:49 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-06-17 15:26:20 -0700 |
commit | b65b1c3148ad7ebaaca422bc572dead0864dcd6a (patch) | |
tree | 8812998b539c593f38d2f71b1a296a5882132832 /src/mesa/drivers/dri/radeon | |
parent | 9e8400f4c95bde1f955c7977066583b507159a10 (diff) |
mesa: Hide weirdness of 1D_ARRAY textures from Driver.CopyTexSubImage().
Intel had brokenness here, and I'd like to continue moving Mesa toward
hiding 1D_ARRAY's ridiculousness inside of the core, like we did with
MapTextureImage. Fixes copyteximage 1D_ARRAY on intel.
There's still an impedance mismatch in meta when falling back to read and
texsubimage, since texsubimage expects coordinates into 1D_ARRAY as
(width, slice, 0) instead of (width, 0, slice).
v2: Fix offset of scanline reads from the source. (Thanks Brian!), replace
dd.h comment with Paul's text and replace early exit with an assert.
Reviewed-by: Brian Paul <[email protected]> (v1)
Reviewed-by: Kenneth Graunke <[email protected]> (v1)
Reviewed-by: Paul Berry <[email protected]> (v1)
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_tex_copy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c index a6c406b2bff..675eb78ec5c 100644 --- a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c +++ b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c @@ -136,7 +136,7 @@ do_copy_texsubimage(struct gl_context *ctx, void radeonCopyTexSubImage(struct gl_context *ctx, GLuint dims, struct gl_texture_image *texImage, - GLint xoffset, GLint yoffset, GLint zoffset, + GLint xoffset, GLint yoffset, GLint slice, struct gl_renderbuffer *rb, GLint x, GLint y, GLsizei width, GLsizei height) @@ -144,7 +144,7 @@ radeonCopyTexSubImage(struct gl_context *ctx, GLuint dims, radeonContextPtr radeon = RADEON_CONTEXT(ctx); radeon_prepare_render(radeon); - if (dims != 2 || !do_copy_texsubimage(ctx, + if (slice != 0 || !do_copy_texsubimage(ctx, radeon_tex_obj(texImage->TexObject), (radeon_texture_image *)texImage, xoffset, yoffset, @@ -154,7 +154,7 @@ radeonCopyTexSubImage(struct gl_context *ctx, GLuint dims, "Falling back to sw for glCopyTexSubImage2D\n"); _mesa_meta_CopyTexSubImage(ctx, dims, texImage, - xoffset, yoffset, zoffset, + xoffset, yoffset, slice, rb, x, y, width, height); } } |