mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 22:18:13 +02:00
st/mesa: don't affect original st_CompressedTexSubImage parameters
The fallback path is still possible here so let keep them as is. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3952 Fixes:4b02f165("st/mesa: implement PBO upload for glCompressedTex(Sub)Image") Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8258> (cherry picked from commit5ae7d40648)
This commit is contained in:
parent
773d683a89
commit
f121623020
2 changed files with 4 additions and 4 deletions
|
|
@ -1372,7 +1372,7 @@
|
|||
"description": "st/mesa: don't affect original st_CompressedTexSubImage parameters",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "4b02f165375ccff65e117651a9a75920a1b4e502"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1881,14 +1881,14 @@ st_CompressedTexSubImage(struct gl_context *ctx, GLuint dims,
|
|||
? 0 : texImage->TexObject->MinLevel + texImage->Level;
|
||||
unsigned max_layer = util_max_layer(texture, level);
|
||||
|
||||
z += texImage->Face + texImage->TexObject->MinLayer;
|
||||
GLint layer = z + texImage->Face + texImage->TexObject->MinLayer;
|
||||
|
||||
struct pipe_surface templ;
|
||||
memset(&templ, 0, sizeof(templ));
|
||||
templ.format = copy_format;
|
||||
templ.u.tex.level = level;
|
||||
templ.u.tex.first_layer = MIN2(z, max_layer);
|
||||
templ.u.tex.last_layer = MIN2(z + d - 1, max_layer);
|
||||
templ.u.tex.first_layer = MIN2(layer, max_layer);
|
||||
templ.u.tex.last_layer = MIN2(layer + d - 1, max_layer);
|
||||
|
||||
surface = pipe->create_surface(pipe, texture, &templ);
|
||||
if (!surface)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue