st/mesa: don't use the PBO GetTexImage compute shader for 64K textures

I uses uint16_t for width/height.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
This commit is contained in:
Marek Olšák 2025-11-21 17:56:43 -05:00 committed by Marge Bot
parent 72a14518ae
commit bd839d4bfc

View file

@ -1304,11 +1304,12 @@ st_GetTexSubImage_shader(struct gl_context * ctx,
return false;
view_target = get_target_from_texture(src);
/* I don't know why this works
* only for the texture rects
* but that's how it is
*/
if ((src->target != PIPE_TEXTURE_RECT &&
/* 64K x 64K aren't supported by the shader (pbo_data::width/height have 16 bits) */
if (width >= UINT16_MAX || height >= UINT16_MAX ||
/* I don't know why this works only for the texture rects
* but that's how it is. */
(src->target != PIPE_TEXTURE_RECT &&
/* this would need multiple samplerviews */
((util_format_is_depth_and_stencil(src_format) && util_format_is_depth_and_stencil(dst_format)) ||
/* these format just doesn't work and science can't explain why */