virgl: fix stride + layer_stride inconsistency

With blob resources, stride doesn't necesarily have to
equal width * bpp.  The use case for this a minigbm blob
resource with blob mem BLOB_MEM_HOST3D_GUEST imported into
guest Mesa.  In addition, for BLOB_MEM_HOST we can repurpose
the transfer ioctls to also flush caches if need be, so this
seems a good time to fix this issue.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <!4821>
78 jobs for !4821 with resource-blob in 14 minutes and 48 seconds (queued for 6 seconds)
detached
Status Job ID Name Coverage
  Container+Docs
passed #4798671
aarch64
arm_build

00:00:20

passed #4798672
arm_test-base

00:00:09

passed #4798668
x86_build-base

00:00:08

passed #4798670
x86_build_old

00:00:18

passed #4798669
x86_test-base

00:00:09

 
  Container 2
passed #4798682
arm64_test

00:00:09

passed #4798677
i386_build

00:00:09

passed #4798673
kernel+rootfs_amd64

00:00:09

passed #4798674
aarch64
kernel+rootfs_arm64

00:00:21

passed #4798675
aarch64
kernel+rootfs_armhf

00:00:20

passed #4798678
ppc64el_build

00:00:09

passed #4798679
s390x_build

00:00:09

passed #4798676
x86_build

00:00:09

passed #4798680
x86_test-gl

00:00:09

passed #4798681
x86_test-vk

00:00:09

 
  Meson X86 64
passed #4798687
meson-android

00:01:53

passed #4798688
meson-clang

00:02:13

passed #4798686
meson-classic

00:02:12

passed #4798689
meson-clover

00:02:08

passed #4798684
meson-gallium

00:06:00

passed #4798685
meson-release

00:01:54

passed #4798683
meson-testing

00:02:28

passed #4798690
meson-vulkan

00:01:03

 
  Scons
passed #4798691
scons-win64

00:04:22

 
  Meson Misc
passed #4798693
aarch64
meson-arm64

00:01:22

passed #4798694
aarch64
meson-arm64-build-test

00:01:19

passed #4798692
aarch64
meson-armhf

00:01:22

passed #4798695
meson-i386

00:01:02

passed #4798698
meson-mingw32-x86_64

00:01:20

passed #4798697
kvm
meson-ppc64el

00:01:50

passed #4798696
kvm
meson-s390x

00:02:47

 
  Llvmpipe
passed #4798702
llvmpipe-gles2

00:02:07

passed #4798703
llvmpipe-traces

00:03:51

passed #4798700
piglit-glslparser

00:04:20

passed #4798699
piglit-quick_gl

00:07:33

passed #4798701
piglit-quick_shader

00:07:58

 
  Softpipe
passed #4798708
softpipe-gl

00:01:24

passed #4798704
softpipe-gles2

00:01:38

passed #4798705
softpipe-gles3

00:07:00

passed #4798706
softpipe-gles31 1/2

00:06:03

passed #4798707
softpipe-gles31 2/2

00:06:08

 
  Freedreno
passed #4798721
google-freedreno-db410c
arm64_a306_gles2

00:06:41

passed #4798722
google-freedreno-db410c
arm64_a306_gles3

00:05:57

passed #4798723
google-freedreno-db410c
arm64_a306_gles3_options

00:04:20

passed #4798724
google-freedreno-db820c
arm64_a530_gles2

00:11:11

passed #4798725
google-freedreno-db820c
arm64_a530_gles3

00:03:37

passed #4798726
google-freedreno-db820c
arm64_a530_gles31

00:05:16

passed #4798713
google-freedreno-cheza
arm64_a630_bypass

00:01:31

passed #4798716
google-freedreno-cheza
arm64_a630_gl

00:02:07

passed #4798709
google-freedreno-cheza
arm64_a630_gles2

00:01:58

passed #4798711
google-freedreno-cheza
arm64_a630_gles3

00:06:09

passed #4798710
google-freedreno-cheza
arm64_a630_gles31

00:04:09

passed #4798718
google-freedreno-cheza
arm64_a630_gles31_565nozs

00:01:59

passed #4798717
google-freedreno-cheza
arm64_a630_gles3_565nozs

00:02:14

passed #4798715
google-freedreno-cheza
arm64_a630_gmem

00:01:46

passed #4798712
google-freedreno-cheza
arm64_a630_noubo

00:01:18

passed #4798714
google-freedreno-cheza
arm64_a630_traces

00:04:52

passed #4798719
google-freedreno-cheza
arm64_a630_vk

00:04:57

passed #4798720
google-freedreno-cheza
arm64_a630_vk_sysmem

00:02:36

 
  Panfrost
passed #4798727
mesa-ci-aarch64-lava-collabora
panfrost-t720-gles2:arm64

00:07:38

passed #4798728
mesa-ci-aarch64-lava-collabora
panfrost-t760-gles2:armhf

00:07:04

passed #4798729
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles2:arm64

00:03:26

passed #4798730
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 1/2

00:05:26

passed #4798731
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 2/2

00:06:48

passed #4798732
mesa-ci-aarch64-lava-collabora
panfrost-t860-traces:arm64

00:05:48

 
  Radv
passed #4798733
radv-fossils

00:09:56

 
  Virgl
passed #4798738
virgl-gl30-on-gl

00:00:20

passed #4798739
virgl-gl31-on-gl

00:00:52

passed #4798740
virgl-gl32-on-gl

00:00:58

passed #4798734
virgl-gles2-on-gl

00:02:08

passed #4798736
virgl-gles31-on-gl 1/2

00:04:37

passed #4798737
virgl-gles31-on-gl 2/2

00:04:32

passed #4798735
virgl-gles3-on-gl

00:04:19

passed #4798741
virgl-traces

00:01:08

 
  Radeonsi
passed #4798742
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles2:amd64

00:05:08

passed #4798744
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles31:amd64

00:08:33

passed #4798743
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles3:amd64

00:08:09

passed #4798745
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-traces:amd64

00:11:49