st/mesa: fix clearing of 1D array textures
st_gl_texture_dims_to_pipe_dims isn't usable in this case since its API doesn't match the usage so fix up the dimensions manually. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3646 Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10523>
This commit is contained in:
@@ -3290,6 +3290,14 @@ st_ClearTexSubImage(struct gl_context *ctx,
|
||||
|
||||
u_box_3d(xoffset, yoffset, zoffset + texImage->Face,
|
||||
width, height, depth, &box);
|
||||
|
||||
if (pt->target == PIPE_TEXTURE_1D_ARRAY) {
|
||||
box.z = box.y;
|
||||
box.depth = box.height;
|
||||
box.y = 0;
|
||||
box.height = 1;
|
||||
}
|
||||
|
||||
if (texObj->Immutable) {
|
||||
/* The texture object has to be consistent (no "loose", per-image
|
||||
* gallium resources). If this texture is a view into another
|
||||
|
||||
Reference in New Issue
Block a user