mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-12 07:28:18 +02:00
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: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 5ed79312ed)
This commit is contained in:
parent
abdae1c4d1
commit
b2a6b01082
1 changed files with 5 additions and 0 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue