diff options
author | Dave Airlie <[email protected]> | 2015-04-08 10:59:20 +1000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-04-22 16:12:22 +0100 |
commit | b2a6b01082e45fb32c607cfc64cd780185be62e3 (patch) | |
tree | 00e3b3636797f7c1e90f3ed98aae02fd86c942c8 /src/mesa | |
parent | abdae1c4d1af084aca56c89a20db85c867ce412d (diff) |
st/mesa: convert sub image for cube map arrays to 2d arrays for upload
Since we can subimage upload a number of cube map array layers,
that aren't a complete cube map array, we should specify things
as a 2D array and blit from that.
Suggested by Ilia Mirkin as an alternate fix for texsubimage
cube map array issues.
seems to work just as well.
Cc: [email protected]
Reviewed-by: Marek Olšák <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit 5ed79312ed99f3b141c35569b9767f82f5ba0a93)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index abc68c0e1b3..889eb6a8d1d 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -741,6 +741,11 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims, if (gl_target == GL_TEXTURE_CUBE_MAP) { gl_target = GL_TEXTURE_2D; } + /* TexSubImage can specify subsets of cube map array faces + * so we need to upload via 2D array instead */ + if (gl_target == GL_TEXTURE_CUBE_MAP_ARRAY) { + gl_target = GL_TEXTURE_2D_ARRAY; + } /* Initialize the source texture description. */ memset(&src_templ, 0, sizeof(src_templ)); |