virgl: adjust strides when mapping temp-resources
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 12 Sep 2018 07:48:41 +0000 (09:48 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 14 Sep 2018 00:59:02 +0000 (10:59 +1000)
commitfa5e9f1f73f64ac089f8efd5b101a77d06d22fcd
treeeda341a9cbe0e693ff2836e4d92e7bea1c05571a
parent21b92b3464193a203e069f50c21ebec146ae0215
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: a8987b88ff1 "virgl: add driver for virtio-gpu 3D (v2)"
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/virgl/virgl_texture.c