mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
virgl: adjust strides when mapping temp-resources
When we're mapping temp-resources, we clip the resource to the transfer-box, which means the stride might not be correct any more. So let's update the stride from the temp-resource, and recompute the layer-stride. This fixes crashes when running dEQP with --deqp-gl-config-name=rgba8888d24s8ms4 Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Fixes:a8987b88ff"virgl: add driver for virtio-gpu 3D (v2)" Reviewed-by: Dave Airlie <airlied@redhat.com> (cherry picked from commitfa5e9f1f73)
This commit is contained in:
parent
33f5a21c1f
commit
cf54d5f47c
1 changed files with 2 additions and 0 deletions
|
|
@ -177,6 +177,8 @@ static void *virgl_texture_transfer_map(struct pipe_context *ctx,
|
|||
/* we want to do a resolve blit into the temporary */
|
||||
hw_res = trans->resolve_tmp->hw_res;
|
||||
offset = 0;
|
||||
trans->base.stride = ((struct virgl_texture*)trans->resolve_tmp)->stride[level];
|
||||
trans->base.layer_stride = trans->base.stride * nblocksy;
|
||||
} else {
|
||||
offset = vrend_get_tex_image_offset(vtex, level, box->z);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue