mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 01:30:08 +01:00
vc4: Size transfer temporary mappings appropriately for full maps of 3D.
We don't really support reading/writing of 3D textures since the hardware
doesn't do 3D, but we do need to make sure that a pipe_transfer for them
has enough space to store the image. This was previously not a problem
because the state tracker only mapped a slice at a time until
fb9fe352ea. Fixes glean glsl1 tests, which
all have setup of a 3D texture at the start.
This commit is contained in:
parent
7ac08adfb4
commit
a507dcc160
1 changed files with 2 additions and 2 deletions
|
|
@ -294,9 +294,9 @@ vc4_resource_transfer_map(struct pipe_context *pctx,
|
|||
ptrans->box.height = align(ptrans->box.height, utile_h);
|
||||
|
||||
ptrans->stride = ptrans->box.width * rsc->cpp;
|
||||
ptrans->layer_stride = ptrans->stride;
|
||||
ptrans->layer_stride = ptrans->stride * ptrans->box.height;
|
||||
|
||||
trans->map = malloc(ptrans->stride * ptrans->box.height);
|
||||
trans->map = malloc(ptrans->layer_stride * ptrans->box.depth);
|
||||
if (usage & PIPE_TRANSFER_READ ||
|
||||
ptrans->box.width != orig_width ||
|
||||
ptrans->box.height != orig_height) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue