spirv: Use nir_const_value for spec constants
[mesa.git] / .gitlab-ci.yml
index a8a29ed495b7ac60c943669107e608fa6e8487ef..1087a734e4e7ef70f027c74d19396cbd793a1b53 100644 (file)
@@ -19,15 +19,16 @@ stages:
   - panfrost
   - radv
   - lima
+  - virgl
   - success
 
 
 # When to automatically run the CI
 .ci-run-policy:
   rules:
-    # Run pipeline by default for merge requests changing files affecting it
-    - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
-      changes: &paths
+    # If any files affecting the pipeline are changed, build/test jobs run
+    # automatically once all dependency jobs have passed
+    - changes: &all_paths
       - VERSION
       - bin/**/*
       # GitLab CI
@@ -45,16 +46,7 @@ stages:
       - include/**/*
       - src/**/*
       when: on_success
-    # Run pipeline by default in the main project if files affecting it were
-    # changed
-    - if: '$CI_PROJECT_PATH == "mesa/mesa"'
-      changes:
-        *paths
-      when: on_success
-    # Allow triggering jobs manually on branches of forked projects
-    - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
-      when: manual
-    # Otherwise, most jobs won't run
+    # Otherwise, build/test jobs won't run
     - when: never
   retry:
     max: 2
@@ -70,7 +62,7 @@ success:
     - merge_requests
   except:
     changes:
-      *paths
+      *all_paths
   variables:
     GIT_STRATEGY: none
   script:
@@ -108,6 +100,26 @@ success:
   stage: container
   extends:
     - .ci-run-policy
+  rules:
+    # Run pipeline by default if it was triggered by Marge Bot, is for a
+    # merge request, and any files affecting it were changed
+    - if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
+      changes:
+        *all_paths
+      when: on_success
+    # Run pipeline by default in the main project if any files affecting it were
+    # changed
+    - if: '$CI_PROJECT_PATH == "mesa/mesa"'
+      changes:
+        *all_paths
+      when: on_success
+    # Allow triggering jobs manually for MRs or branches of forked projects if
+    # any files affecting the pipeline were changed
+    - changes:
+        *all_paths
+      when: manual
+    # Otherwise, container jobs won't run
+    - when: never
   variables:
     FDO_DISTRIBUTION_VERSION: buster-slim
     FDO_REPO_SUFFIX: "debian/$CI_JOB_NAME"
@@ -121,7 +133,7 @@ x86_build:
     - .fdo.container-build@debian
     - .container
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_build "2020-03-13"
+    FDO_DISTRIBUTION_TAG: &x86_build "2020-03-18-jflags"
 
 .use-x86_build:
   variables:
@@ -134,19 +146,19 @@ x86_build:
 x86_test-gl:
   extends: x86_build
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-03-13"
+    FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-04-21"
 
 # Debian 10 based x86 test image for VK
 x86_test-vk:
   extends: x86_build
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-03-27"
+    FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-04-09"
 
 # Debian 9 based x86 build image (old LLVM)
 x86_build_old:
   extends: x86_build
   variables:
-    FDO_DISTRIBUTION_TAG: &x86_build_old "2019-09-18"
+    FDO_DISTRIBUTION_TAG: &x86_build_old "2019-03-18-jflags"
     FDO_DISTRIBUTION_VERSION: stretch-slim
 
 .use-x86_build_old:
@@ -162,7 +174,7 @@ arm_build:
     - .fdo.container-build@debian@arm64v8
     - .container
   variables:
-    FDO_DISTRIBUTION_TAG: &arm_build "2020-03-24"
+    FDO_DISTRIBUTION_TAG: &arm_build "2020-04-01-jflags"
 
 .use-arm_build:
   variables:
@@ -175,7 +187,7 @@ arm_build:
 arm_test:
   extends: arm_build
   variables:
-    FDO_DISTRIBUTION_TAG: &arm_test "2020-01-30"
+    FDO_DISTRIBUTION_TAG: &arm_test "2020-03-18-jflags"
 
 .use-arm_test:
   variables:
@@ -259,6 +271,7 @@ windows_build_vs2019:
     - windows
     - docker
     - "1809"
+    - mesa
   cache:
     key: ${CI_JOB_NAME}
     paths:
@@ -297,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: >
@@ -426,7 +439,7 @@ meson-clang:
     CC: "ccache clang-9"
     CXX: "ccache clang++-9"
 
-.meson-windows-vs2019:
+meson-windows-vs2019:
   extends:
     - .build-windows
     - .use-windows_build_vs2019
@@ -701,6 +714,42 @@ 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
+
+virgl-gles31:
+  variables:
+    DEQP_VER: gles31
+    CI_NODE_INDEX: 1
+    CI_NODE_TOTAL: 10
+    DEQP_OPTIONS: "--deqp-log-images=disable"
+    DEQP_RUNNER_OPTIONS: "--compact-display false --timeout 120"
+    MESA_GLES_VERSION_OVERRIDE: "3.1"
+    MESA_GLSL_VERSION_OVERRIDE: "310"
+  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
@@ -708,14 +757,11 @@ softpipe-gles31:
 # to).
 .test-manual:
   rules:
-    # Never test in the main project.
-    - if: '$CI_PROJECT_PATH == "mesa/mesa"'
-      when: never
-    # Never test in merge requests.
-    - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
-      when: never
-    # Otherwise, allow testing manually for personal branches.
-    - when: manual
+    - if: '$CI_PROJECT_PATH != "mesa/mesa" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME'
+      changes:
+        *all_paths
+      when: manual
+    - when: never
 
 arm64_a630_gles2:
   extends:
@@ -885,3 +931,14 @@ radv-polaris10-traces:
     DEVICE_NAME: "vk-amd-polaris10"
   tags:
     - polaris10
+
+virgl-traces:
+  extends:
+    - .traces-test-gl
+    - .virgl-rules
+  variables:
+    LIBGL_ALWAYS_SOFTWARE: "true"
+    GALLIUM_DRIVER: "virpipe"
+    DEVICE_NAME: "gl-virgl"
+    MESA_GLES_VERSION_OVERRIDE: "3.1"
+    MESA_GLSL_VERSION_OVERRIDE: "310"