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 Name Job ID Coverage
  Container+Docs
passed arm_build #4798671
aarch64

00:00:20

passed arm_test-base #4798672

00:00:09

passed x86_build-base #4798668

00:00:08

passed x86_build_old #4798670

00:00:18

passed x86_test-base #4798669

00:00:09

 
  Container 2
passed arm64_test #4798682

00:00:09

passed i386_build #4798677

00:00:09

passed kernel+rootfs_amd64 #4798673

00:00:09

passed kernel+rootfs_arm64 #4798674
aarch64

00:00:21

passed kernel+rootfs_armhf #4798675
aarch64

00:00:20

passed ppc64el_build #4798678

00:00:09

passed s390x_build #4798679

00:00:09

passed x86_build #4798676

00:00:09

passed x86_test-gl #4798680

00:00:09

passed x86_test-vk #4798681

00:00:09

 
  Meson X86 64
passed meson-android #4798687

00:01:53

passed meson-clang #4798688

00:02:13

passed meson-classic #4798686

00:02:12

passed meson-clover #4798689

00:02:08

passed meson-gallium #4798684

00:06:00

passed meson-release #4798685

00:01:54

passed meson-testing #4798683

00:02:28

passed meson-vulkan #4798690

00:01:03

 
  Scons
passed scons-win64 #4798691

00:04:22

 
  Meson Misc
passed meson-arm64 #4798693
aarch64

00:01:22

passed meson-arm64-build-test #4798694
aarch64

00:01:19

passed meson-armhf #4798692
aarch64

00:01:22

passed meson-i386 #4798695

00:01:02

passed meson-mingw32-x86_64 #4798698

00:01:20

passed meson-ppc64el #4798697
kvm

00:01:50

passed meson-s390x #4798696
kvm

00:02:47

 
  Llvmpipe
passed llvmpipe-gles2 #4798702

00:02:07

passed llvmpipe-traces #4798703

00:03:51

passed piglit-glslparser #4798700

00:04:20

passed piglit-quick_gl #4798699

00:07:33

passed piglit-quick_shader #4798701

00:07:58

 
  Softpipe
passed softpipe-gl #4798708

00:01:24

passed softpipe-gles2 #4798704

00:01:38

passed softpipe-gles3 #4798705

00:07:00

passed softpipe-gles31 1/2 #4798706

00:06:03

passed softpipe-gles31 2/2 #4798707

00:06:08

 
  Freedreno
passed arm64_a306_gles2 #4798721
google-freedreno-db410c

00:06:41

passed arm64_a306_gles3 #4798722
google-freedreno-db410c

00:05:57

passed arm64_a306_gles3_options #4798723
google-freedreno-db410c

00:04:20

passed arm64_a530_gles2 #4798724
google-freedreno-db820c

00:11:11

passed arm64_a530_gles3 #4798725
google-freedreno-db820c

00:03:37

passed arm64_a530_gles31 #4798726
google-freedreno-db820c

00:05:16

passed arm64_a630_bypass #4798713
google-freedreno-cheza

00:01:31

passed arm64_a630_gl #4798716
google-freedreno-cheza

00:02:07

passed arm64_a630_gles2 #4798709
google-freedreno-cheza

00:01:58

passed arm64_a630_gles3 #4798711
google-freedreno-cheza

00:06:09

passed arm64_a630_gles31 #4798710
google-freedreno-cheza

00:04:09

passed arm64_a630_gles31_565nozs #4798718
google-freedreno-cheza

00:01:59

passed arm64_a630_gles3_565nozs #4798717
google-freedreno-cheza

00:02:14

passed arm64_a630_gmem #4798715
google-freedreno-cheza

00:01:46

passed arm64_a630_noubo #4798712
google-freedreno-cheza

00:01:18

passed arm64_a630_traces #4798714
google-freedreno-cheza

00:04:52

passed arm64_a630_vk #4798719
google-freedreno-cheza

00:04:57

passed arm64_a630_vk_sysmem #4798720
google-freedreno-cheza

00:02:36

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

00:07:38

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

00:07:04

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

00:03:26

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

00:05:26

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

00:06:48

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

00:05:48

 
  Radv
passed radv-fossils #4798733

00:09:56

 
  Virgl
passed virgl-gl30-on-gl #4798738

00:00:20

passed virgl-gl31-on-gl #4798739

00:00:52

passed virgl-gl32-on-gl #4798740

00:00:58

passed virgl-gles2-on-gl #4798734

00:02:08

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

00:04:37

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

00:04:32

passed virgl-gles3-on-gl #4798735

00:04:19

passed virgl-traces #4798741

00:01:08

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

00:05:08

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

00:08:33

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

00:08:09

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

00:11:49