diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/common/meta.c | 13 | ||||
-rw-r--r-- | src/mesa/drivers/common/meta.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_copy.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_tex_copy.c | 6 |
4 files changed, 18 insertions, 10 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index ce5b87b0be1..f7dd06aebf0 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -3851,9 +3851,16 @@ _mesa_meta_CopyTexSubImage(struct gl_context *ctx, GLuint dims, */ _mesa_meta_begin(ctx, MESA_META_PIXEL_STORE); - ctx->Driver.TexSubImage(ctx, dims, texImage, - xoffset, yoffset, zoffset, width, height, 1, - format, type, buf, &ctx->Unpack); + if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) { + assert(yoffset == 0); + ctx->Driver.TexSubImage(ctx, dims, texImage, + xoffset, zoffset, 0, width, 1, 1, + format, type, buf, &ctx->Unpack); + } else { + ctx->Driver.TexSubImage(ctx, dims, texImage, + xoffset, yoffset, zoffset, width, height, 1, + format, type, buf, &ctx->Unpack); + } _mesa_meta_end(ctx); diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h index a3617f4fad8..53d7b8ab5a8 100644 --- a/src/mesa/drivers/common/meta.h +++ b/src/mesa/drivers/common/meta.h @@ -116,7 +116,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, extern void _mesa_meta_CopyTexSubImage(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); diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c index d8e65baad5b..3ab66d97b54 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_copy.c +++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c @@ -135,13 +135,14 @@ intel_copy_texsubimage(struct intel_context *intel, static void intelCopyTexSubImage(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) { struct intel_context *intel = intel_context(ctx); - if (dims != 3) { + + if (slice == 0) { #ifndef I915 /* Try BLORP first. It can handle almost everything. */ if (brw_blorp_copytexsubimage(intel, rb, texImage, x, y, @@ -160,7 +161,7 @@ intelCopyTexSubImage(struct gl_context *ctx, GLuint dims, /* Finally, fall back to meta. This will likely be slow. */ perf_debug("%s - fallback to swrast\n", __FUNCTION__); _mesa_meta_CopyTexSubImage(ctx, dims, texImage, - xoffset, yoffset, zoffset, + xoffset, yoffset, slice, rb, x, y, width, height); } 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); } } |