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;