mesa/st/texture: match width+height for texture downloads of cube textures

some drivers require this

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25914>
This commit is contained in:
Mike Blumenkrantz
2023-10-26 12:36:14 -04:00
committed by Marge Bot
parent df74ea7717
commit ee1039877c
+5
View File
@@ -169,6 +169,11 @@ create_dst_texture(struct gl_context *ctx,
struct pipe_screen *screen = st->screen;
struct pipe_resource dst_templ;
if (pipe_target == PIPE_TEXTURE_CUBE || pipe_target == PIPE_TEXTURE_CUBE_ARRAY) {
width = MAX2(width, height);
height = MAX2(width, height);
}
/* create the destination texture of size (width X height X depth) */
memset(&dst_templ, 0, sizeof(dst_templ));
dst_templ.target = pipe_target;