Mesa (master): gitlab-ci: Test virgl driver

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 20 14:07:33 UTC 2020


Module: Mesa
Branch: master
Commit: ad3ef6d0fc01fead5b72c6376387ecf5c48bfef4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ad3ef6d0fc01fead5b72c6376387ecf5c48bfef4

Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date:   Wed Apr  1 09:17:25 2020 +0200

gitlab-ci: Test virgl driver

Add virglrenderer to the container and use the vtest transport to test
the Gallium driver. On the "host", llvmpipe is used.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4433>

---

 .gitlab-ci.yml                      |  30 ++++++++-
 .gitlab-ci/build-virglrenderer.sh   |  20 ++++++
 .gitlab-ci/container/x86_test-gl.sh |  10 ++-
 .gitlab-ci/deqp-runner.sh           |  16 ++++-
 .gitlab-ci/deqp-virgl-fails.txt     | 120 ++++++++++++++++++++++++++++++++++++
 .gitlab-ci/test-source-dep.yml      |  15 +++++
 6 files changed, 207 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c2b73bca927..7cb88ddbe84 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,6 +19,7 @@ stages:
   - panfrost
   - radv
   - lima
+  - virgl
   - success
 
 
@@ -145,7 +146,7 @@ x86_build:
 x86_test-gl:
   extends: x86_build
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-03-18-jflags"
+    FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-04-20"
 
 # Debian 10 based x86 test image for VK
 x86_test-vk:
@@ -309,7 +310,7 @@ meson-testing:
       -D platforms=x11,drm,surfaceless
     GALLIUM_ST: >
       -D dri3=true
-    GALLIUM_DRIVERS: "swrast"
+    GALLIUM_DRIVERS: "swrast,virgl"
     VULKAN_DRIVERS: amd
     BUILDTYPE: "debugoptimized"
     EXTRA_OPTION: >
@@ -713,6 +714,31 @@ softpipe-gles31:
     DEQP_VER: gles31
   extends: softpipe-gles2
 
+virgl-gles2:
+  variables:
+    DEQP_VER: gles2
+    DEQP_PARALLEL: 4
+    NIR_VALIDATE: 0
+    DEQP_NO_SAVE_RESULTS: 1
+    DEQP_RUNNER_OPTIONS: "--compact-display false"
+    # Don't use threads inside llvmpipe, we've already got all 4 cores
+    # busy with DEQP_PARALLEL.
+    LP_NUM_THREADS: 0
+    DEQP_EXPECTED_FAILS: deqp-virgl-fails.txt
+    LIBGL_ALWAYS_SOFTWARE: "true"
+    GALLIUM_DRIVER: "virpipe"
+  extends:
+    - .deqp-test-gl
+    - .virgl-rules
+
+virgl-gles3:
+  variables:
+    DEQP_VER: gles3
+    CI_NODE_INDEX: 1
+    CI_NODE_TOTAL: 3
+    DEQP_RUNNER_OPTIONS: "--compact-display false --timeout 120"
+  extends: virgl-gles2
+
 # Rules for tests that should not be present in MRs or the main
 # project's pipeline (don't block marge or report red on
 # mesa/mesamaster) but should be present on pipelines in personal
diff --git a/.gitlab-ci/build-virglrenderer.sh b/.gitlab-ci/build-virglrenderer.sh
new file mode 100644
index 00000000000..935038e7e83
--- /dev/null
+++ b/.gitlab-ci/build-virglrenderer.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+set -ex
+
+mkdir -p /epoxy
+pushd /epoxy
+wget -qO- https://github.com/anholt/libepoxy/releases/download/1.5.4/libepoxy-1.5.4.tar.xz | tar -xJ --strip-components=1
+meson build/ $EXTRA_MESON_ARGS
+ninja -C build install
+popd
+rm -rf /epoxy
+
+VIRGLRENDERER_VERSION=33cfd72346878a71f27f2f11ac41f9e347a34369
+git clone https://gitlab.freedesktop.org/virgl/virglrenderer.git --single-branch --no-checkout /virglrenderer
+pushd /virglrenderer
+git checkout "$VIRGLRENDERER_VERSION"
+meson build/ $EXTRA_MESON_ARGS
+ninja -C build install
+popd
+rm -rf /virglrenderer
diff --git a/.gitlab-ci/container/x86_test-gl.sh b/.gitlab-ci/container/x86_test-gl.sh
index ea76876c281..1114059053a 100644
--- a/.gitlab-ci/container/x86_test-gl.sh
+++ b/.gitlab-ci/container/x86_test-gl.sh
@@ -72,12 +72,18 @@ apt-get install -y --no-remove \
       qt5-default \
       qt5-qmake \
       waffle-utils \
+      wget \
       xauth \
       xvfb \
+      xz-utils \
       zlib1g
 
 . .gitlab-ci/container/container_pre_build.sh
 
+############### Build virglrenderer
+
+. .gitlab-ci/build-virglrenderer.sh
+
 ############### Build piglit
 
 . .gitlab-ci/build-piglit.sh
@@ -124,6 +130,8 @@ apt-get purge -y \
       patch \
       pkg-config \
       python3-distutils \
-      python3.7-dev
+      python3.7-dev \
+      wget \
+      xz-utils
 
 apt-get autoremove -y --purge
diff --git a/.gitlab-ci/deqp-runner.sh b/.gitlab-ci/deqp-runner.sh
index 1dda8e942d5..015e8b3d0bf 100755
--- a/.gitlab-ci/deqp-runner.sh
+++ b/.gitlab-ci/deqp-runner.sh
@@ -194,7 +194,8 @@ check_renderer() {
     # If you're having trouble loading your driver, uncommenting this may help
     # debug.
     # export EGL_LOG_LEVEL=debug
-    $DEQP $DEQP_OPTIONS --deqp-case=dEQP-GLES2.info.\* --deqp-log-filename=$RESULTS/deqp-info.qpa
+    VERSION=`echo $DEQP_VER | tr '[a-z]' '[A-Z]'`
+    $DEQP $DEQP_OPTIONS --deqp-case=dEQP-$VERSION.info.\* --deqp-log-filename=$RESULTS/deqp-info.qpa
     parse_renderer
 }
 
@@ -205,6 +206,19 @@ quiet() {
     set -x
 }
 
+if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
+    # deqp is to use virpipe, and virgl_test_server llvmpipe
+    export GALLIUM_DRIVER="$GALLIUM_DRIVER"
+
+    GALLIUM_DRIVER=llvmpipe \
+    GALLIVM_PERF="nopt,no_filter_hacks" \
+    VTEST_USE_EGL_SURFACELESS=1 \
+    VTEST_USE_GLES=1 \
+    virgl_test_server >$RESULTS/vtest-log.txt 2>&1 &
+
+    sleep 1
+fi
+
 if [ $DEQP_VER != vk ]; then
     quiet check_renderer
 fi
diff --git a/.gitlab-ci/deqp-virgl-fails.txt b/.gitlab-ci/deqp-virgl-fails.txt
new file mode 100644
index 00000000000..f5e2d6b0144
--- /dev/null
+++ b/.gitlab-ci/deqp-virgl-fails.txt
@@ -0,0 +1,120 @@
+dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_center
+dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_corner
+dEQP-GLES2.functional.clipping.point.wide_point_clip
+dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_center
+dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner
+dEQP-GLES2.functional.clipping.triangle_vertex.clip_two.clip_neg_y_neg_z_and_neg_x_neg_y_pos_z
+dEQP-GLES2.functional.clipping.triangle_vertex.clip_two.clip_pos_y_pos_z_and_neg_x_neg_y_neg_z
+dEQP-GLES2.functional.draw.random.10
+dEQP-GLES2.functional.draw.random.42
+dEQP-GLES2.functional.fbo.render.color_clear.rbo_rgba4
+dEQP-GLES2.functional.fbo.render.color_clear.rbo_rgba4_depth_component16
+dEQP-GLES2.functional.fbo.render.color_clear.rbo_rgba4_stencil_index8
+dEQP-GLES2.functional.fbo.render.depth.rbo_rgba4_depth_component16
+dEQP-GLES2.functional.fbo.render.recreate_colorbuffer.no_rebind_rbo_rgba4
+dEQP-GLES2.functional.fbo.render.recreate_colorbuffer.no_rebind_rbo_rgba4_stencil_index8
+dEQP-GLES2.functional.fbo.render.recreate_colorbuffer.rebind_rbo_rgba4
+dEQP-GLES2.functional.fbo.render.recreate_colorbuffer.rebind_rbo_rgba4_stencil_index8
+dEQP-GLES2.functional.fbo.render.recreate_depthbuffer.no_rebind_rbo_rgba4_depth_component16
+dEQP-GLES2.functional.fbo.render.recreate_depthbuffer.rebind_rbo_rgba4_depth_component16
+dEQP-GLES2.functional.fbo.render.recreate_stencilbuffer.no_rebind_rbo_rgba4_stencil_index8
+dEQP-GLES2.functional.fbo.render.recreate_stencilbuffer.rebind_rbo_rgba4_stencil_index8
+dEQP-GLES2.functional.fbo.render.shared_colorbuffer.rbo_rgba4
+dEQP-GLES2.functional.fbo.render.shared_colorbuffer.rbo_rgba4_depth_component16
+dEQP-GLES2.functional.fbo.render.shared_depthbuffer.rbo_rgba4_depth_component16
+dEQP-GLES2.functional.polygon_offset.default_displacement_with_units
+dEQP-GLES2.functional.polygon_offset.fixed16_displacement_with_units
+dEQP-GLES2.functional.rasterization.interpolation.basic.line_loop_wide
+dEQP-GLES2.functional.rasterization.interpolation.basic.line_strip_wide
+dEQP-GLES2.functional.rasterization.interpolation.basic.lines_wide
+dEQP-GLES2.functional.rasterization.interpolation.projected.line_loop_wide
+dEQP-GLES2.functional.rasterization.interpolation.projected.line_strip_wide
+dEQP-GLES2.functional.rasterization.interpolation.projected.lines_wide
+dEQP-GLES2.functional.rasterization.limits.points
+dEQP-GLES3.functional.clipping.line.wide_line_clip_viewport_corner
+dEQP-GLES3.functional.clipping.point.wide_point_clip_viewport_center
+dEQP-GLES3.functional.clipping.triangle_vertex.clip_two.clip_neg_y_neg_z_and_neg_x_neg_y_pos_z
+dEQP-GLES3.functional.clipping.triangle_vertex.clip_two.clip_pos_y_pos_z_and_neg_x_neg_y_neg_z
+dEQP-GLES3.functional.draw.random.124
+dEQP-GLES3.functional.draw.random.174
+dEQP-GLES3.functional.draw.random.31
+dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag
+dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_dst_x
+dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_src_dst_y
+dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_x
+dEQP-GLES3.functional.fbo.depth.depth_test_clamp.depth_component16
+dEQP-GLES3.functional.fbo.invalidate.sub.unbind_blit_msaa_color
+dEQP-GLES3.functional.fbo.invalidate.sub.unbind_blit_msaa_depth_stencil
+dEQP-GLES3.functional.fbo.invalidate.whole.unbind_blit_msaa_depth
+dEQP-GLES3.functional.fbo.msaa.2_samples.depth_component16
+dEQP-GLES3.functional.fbo.msaa.2_samples.r16f
+dEQP-GLES3.functional.fbo.msaa.2_samples.rgb565
+dEQP-GLES3.functional.fbo.msaa.2_samples.rgba4
+dEQP-GLES3.functional.fbo.msaa.2_samples.rgba8
+dEQP-GLES3.functional.fbo.msaa.2_samples.stencil_index8
+dEQP-GLES3.functional.fbo.msaa.4_samples.depth24_stencil8
+dEQP-GLES3.functional.fbo.msaa.4_samples.depth_component24
+dEQP-GLES3.functional.fbo.msaa.4_samples.r11f_g11f_b10f
+dEQP-GLES3.functional.fbo.msaa.4_samples.r8
+dEQP-GLES3.functional.fbo.msaa.4_samples.rgb10_a2
+dEQP-GLES3.functional.fbo.msaa.4_samples.rgb8
+dEQP-GLES3.functional.multisample.fbo_max_samples.proportionality_sample_coverage_inverted
+dEQP-GLES3.functional.multisample.fbo_max_samples.sample_coverage_invert
+dEQP-GLES3.functional.negative_api.buffer.blit_framebuffer_multisample
+dEQP-GLES3.functional.negative_api.buffer.read_pixels_fbo_format_mismatch
+dEQP-GLES3.functional.polygon_offset.default_displacement_with_units
+dEQP-GLES3.functional.polygon_offset.fixed16_render_with_units
+dEQP-GLES3.functional.polygon_offset.float32_displacement_with_units
+dEQP-GLES3.functional.rasterization.fbo.rbo_multisample_max.interpolation.lines_wide
+dEQP-GLES3.functional.rasterization.fbo.rbo_multisample_max.primitives.lines_wide
+dEQP-GLES3.functional.rasterization.fbo.rbo_singlesample.interpolation.lines_wide
+dEQP-GLES3.functional.rasterization.fbo.texture_2d.interpolation.lines_wide
+dEQP-GLES3.functional.rasterization.interpolation.basic.line_loop_wide
+dEQP-GLES3.functional.rasterization.interpolation.projected.line_loop_wide
+dEQP-GLES3.functional.shaders.derivate.dfdx.fastest.fbo_msaa4.float_highp
+dEQP-GLES3.functional.shaders.derivate.dfdx.fastest.fbo_msaa4.vec3_mediump
+dEQP-GLES3.functional.shaders.derivate.dfdx.fastest.fbo_msaa4.vec4_highp
+dEQP-GLES3.functional.shaders.derivate.dfdx.fbo_msaa2.vec2_mediump
+dEQP-GLES3.functional.shaders.derivate.dfdx.fbo_msaa2.vec3_highp
+dEQP-GLES3.functional.shaders.derivate.dfdx.fbo_msaa4.float_mediump
+dEQP-GLES3.functional.shaders.derivate.dfdx.fbo_msaa4.vec2_highp
+dEQP-GLES3.functional.shaders.derivate.dfdx.fbo_msaa4.vec4_mediump
+dEQP-GLES3.functional.shaders.derivate.dfdx.nicest.fbo_msaa4.vec2_mediump
+dEQP-GLES3.functional.shaders.derivate.dfdx.nicest.fbo_msaa4.vec3_highp
+dEQP-GLES3.functional.shaders.derivate.dfdx.texture.msaa4.vec2_mediump
+dEQP-GLES3.functional.shaders.derivate.dfdx.texture.msaa4.vec3_highp
+dEQP-GLES3.functional.shaders.derivate.dfdy.fastest.fbo_msaa4.float_mediump
+dEQP-GLES3.functional.shaders.derivate.dfdy.fastest.fbo_msaa4.vec2_highp
+dEQP-GLES3.functional.shaders.derivate.dfdy.fastest.fbo_msaa4.vec4_mediump
+dEQP-GLES3.functional.shaders.derivate.dfdy.fbo_msaa2.float_highp
+dEQP-GLES3.functional.shaders.derivate.dfdy.fbo_msaa2.vec3_mediump
+dEQP-GLES3.functional.shaders.derivate.dfdy.fbo_msaa2.vec4_highp
+dEQP-GLES3.functional.shaders.derivate.dfdy.fbo_msaa4.vec2_mediump
+dEQP-GLES3.functional.shaders.derivate.dfdy.fbo_msaa4.vec3_highp
+dEQP-GLES3.functional.shaders.derivate.dfdy.nicest.fbo_msaa4.float_highp
+dEQP-GLES3.functional.shaders.derivate.dfdy.nicest.fbo_msaa4.vec3_mediump
+dEQP-GLES3.functional.shaders.derivate.dfdy.nicest.fbo_msaa4.vec4_highp
+dEQP-GLES3.functional.shaders.derivate.dfdy.texture.msaa4.float_highp
+dEQP-GLES3.functional.shaders.derivate.dfdy.texture.msaa4.vec3_mediump
+dEQP-GLES3.functional.shaders.derivate.dfdy.texture.msaa4.vec4_highp
+dEQP-GLES3.functional.shaders.derivate.fwidth.fastest.fbo_msaa4.float_mediump
+dEQP-GLES3.functional.shaders.derivate.fwidth.fastest.fbo_msaa4.vec2_highp
+dEQP-GLES3.functional.shaders.derivate.fwidth.fastest.fbo_msaa4.vec4_mediump
+dEQP-GLES3.functional.shaders.derivate.fwidth.fbo_msaa2.float_mediump
+dEQP-GLES3.functional.shaders.derivate.fwidth.fbo_msaa2.vec2_highp
+dEQP-GLES3.functional.shaders.derivate.fwidth.fbo_msaa2.vec4_mediump
+dEQP-GLES3.functional.shaders.derivate.fwidth.fbo_msaa4.float_highp
+dEQP-GLES3.functional.shaders.derivate.fwidth.fbo_msaa4.vec3_mediump
+dEQP-GLES3.functional.shaders.derivate.fwidth.fbo_msaa4.vec4_highp
+dEQP-GLES3.functional.shaders.derivate.fwidth.nicest.fbo_msaa4.vec2_mediump
+dEQP-GLES3.functional.shaders.derivate.fwidth.nicest.fbo_msaa4.vec3_highp
+dEQP-GLES3.functional.shaders.derivate.fwidth.texture.msaa4.float_highp
+dEQP-GLES3.functional.shaders.derivate.fwidth.texture.msaa4.vec3_mediump
+dEQP-GLES3.functional.shaders.derivate.fwidth.texture.msaa4.vec4_highp
+dEQP-GLES3.functional.state_query.integers.max_samples_getinteger64
+dEQP-GLES3.functional.vertex_arrays.single_attribute.normalize.int2_10_10_10.components4_quads1
+dEQP-GLES3.functional.vertex_arrays.single_attribute.output_types.unsigned_int.components2_vec2_quads256
+dEQP-GLES3.functional.vertex_arrays.single_attribute.output_types.unsigned_int.components2_vec3_quads256
+dEQP-GLES3.functional.vertex_arrays.single_attribute.output_types.unsigned_int.components2_vec4_quads256
+dEQP-GLES3.functional.vertex_arrays.single_attribute.output_types.unsigned_int.components4_vec2_quads1
+dEQP-GLES3.functional.vertex_arrays.single_attribute.output_types.unsigned_int.components4_vec4_quads1
diff --git a/.gitlab-ci/test-source-dep.yml b/.gitlab-ci/test-source-dep.yml
index d0d3d478770..2bb824849f5 100644
--- a/.gitlab-ci/test-source-dep.yml
+++ b/.gitlab-ci/test-source-dep.yml
@@ -127,3 +127,18 @@
       - src/vulkan/**/*
       when: on_success
     - when: never
+
+.virgl-rules:
+  stage: virgl
+  rules:
+    - changes:
+        *mesa_core_file_list
+      when: on_success
+    - changes:
+        *gallium_core_file_list
+      when: on_success
+    - changes:
+      - src/gallium/drivers/virgl/**/*
+      - src/gallium/winsys/virgl/**/*
+      when: on_success
+    - when: never



More information about the mesa-commit mailing list