.llvmpipe-test:
  extends:
    - .llvmpipe-rules
  variables:
    LIBGL_ALWAYS_SOFTWARE: "true"
    GALLIUM_DRIVER: "llvmpipe"
    FLAKES_CHANNEL: "#mesa-swrast-ci"

llvmpipe-piglit-cl:
  extends:
    - .test-cl
    - .piglit-test
    - .llvmpipe-test
    - .llvmpipe-cl-rules
  variables:
    LP_CL: 1
    LP_NUM_THREADS: 1
    PIGLIT_PROFILES: cl
    PIGLIT_RESULTS: "llvmpipe-cl"
    PIGLIT_TESTS: >
      -x bswap -x phatk -x clz-optimizations
  script:
    - install/piglit/run_cl.sh

llvmpipe-piglit-quick_gl:
  extends:
    - .test-gl
    - .piglit-test
    - .llvmpipe-test
  variables:
    GALLIVM_PERF: "no_quad_lod"
    LP_NUM_THREADS: 0
    PIGLIT_OPTIONS: >
      --process-isolation false
    # Can't run gl-2.0-edgeflag* because of assertion failures on loading from
    # disk cache which flake depending on which one runs first
    PIGLIT_TESTS: >
      -x gl-2.0-edgeflag
      -x egl_ext_device_
      -x egl_ext_platform_device
      -x ext_timer_query@time-elapsed
      -x glx-multithread-clearbuffer
      -x glx-multithread-shader-compile
      -x max-texture-size
      -x maxsize
    PIGLIT_PROFILES: quick_gl
    PIGLIT_RESULTS: "llvmpipe-quick_gl"

llvmpipe-piglit-glslparser:
  extends:
    - .test-gl
    - .piglit-test
    - .llvmpipe-test
  variables:
    LP_NUM_THREADS: 0
    PIGLIT_PROFILES: glslparser
    PIGLIT_RESULTS: "llvmpipe-glslparser"

llvmpipe-piglit-quick_shader:
  extends:
    - .test-gl
    - .piglit-test
    - .llvmpipe-test
  variables:
    LP_NUM_THREADS: 1
    PIGLIT_PROFILES: quick_shader
    PIGLIT_RESULTS: "llvmpipe-quick_shader"

llvmpipe-traces:
  extends:
    - .test-gl
    - .piglit-traces-test
    - .llvmpipe-test
  variables:
    EGL_PLATFORM: "surfaceless"
    PIGLIT_REPLAY_DESCRIPTION_FILE: "${CI_PROJECT_DIR}/install/traces-llvmpipe.yml"
    PIGLIT_REPLAY_DEVICE_NAME: "gl-vmware-llvmpipe"
    PIGLIT_RESULTS: "llvmpipe-replay"

.llvmpipe-deqp-test:
  variables:
    GALLIVM_PERF: "nopt"
    # Don't use threads inside llvmpipe, we've already got all cores
    # busy at the deqp-runner level.
    LP_NUM_THREADS: 0
    GPU_VERSION: llvmpipe
  extends:
    - .test-gl
    - .deqp-test
    - .llvmpipe-test

llvmpipe-deqp:
  variables:
    DEQP_SUITE: llvmpipe
  parallel: 2
  extends: .llvmpipe-deqp-test

llvmpipe-deqp-asan:
  variables:
    DEQP_SUITE: llvmpipe-asan
    GPU_VERSION: llvmpipe-asan
    DEQP_FRACTION: 10
  extends: .llvmpipe-deqp-test
  needs:
    - debian/x86_test-gl
    - debian-testing-asan

llvmpipe-egl:
  variables:
    DEQP_VER: egl
  extends:
    - .llvmpipe-deqp-test
  script:
    - xvfb-run --server-args='-noreset' ./install/deqp-runner.sh
