From ee1039877c14b9671e08342585bd0e2f4a6decb6 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 26 Oct 2023 12:36:14 -0400 Subject: [PATCH] mesa/st/texture: match width+height for texture downloads of cube textures some drivers require this cc: mesa-stable Part-of: --- src/mesa/state_tracker/st_cb_texture.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index f0d0b576152..3b75d012301 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -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;