Module: Mesa
Branch: main
Commit: 936dd81ed96d9e8eddaeeb6169277d445a8f7f45
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=936dd81ed96d9e8eddaeeb6169277d445a8f7f45

Author: Sil Vilerino <[email protected]>
Date:   Mon Nov 27 16:49:45 2023 -0500

ci: Build d3d12 gallium driver in debian-x86_32

Adding d3d12 to this ci build will prevent issues such
as #6708 or fixes like !26363 from happening again in the future.

Reviewed-by: Jesse Natalie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26447>

---

 .gitlab-ci/build/gitlab-ci.yml                |  2 +-
 .gitlab-ci/container/build-directx-headers.sh | 15 +++++++++++++++
 .gitlab-ci/container/cross_build.sh           |  2 ++
 .gitlab-ci/container/debian/x86_64_build.sh   |  7 +------
 .gitlab-ci/image-tags.yml                     |  2 +-
 meson.build                                   |  2 ++
 src/gallium/drivers/d3d12/d3d12_compiler.h    |  2 ++
 7 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/.gitlab-ci/build/gitlab-ci.yml b/.gitlab-ci/build/gitlab-ci.yml
index d6c3f3ed995..64324e64911 100644
--- a/.gitlab-ci/build/gitlab-ci.yml
+++ b/.gitlab-ci/build/gitlab-ci.yml
@@ -614,7 +614,7 @@ debian-x86_32:
     BUILDTYPE: debug
     CROSS: i386
     VULKAN_DRIVERS: intel,amd,swrast,virtio
-    GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,swrast,virgl,zink,crocus"
+    GALLIUM_DRIVERS: 
"iris,nouveau,r300,r600,radeonsi,swrast,virgl,zink,crocus,d3d12"
     LLVM_VERSION: 15
     EXTRA_OPTION: >
       -D vulkan-layers=device-select,overlay
diff --git a/.gitlab-ci/container/build-directx-headers.sh 
b/.gitlab-ci/container/build-directx-headers.sh
new file mode 100644
index 00000000000..e2225e6fb48
--- /dev/null
+++ b/.gitlab-ci/container/build-directx-headers.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+# shellcheck disable=SC2086 # we want word splitting
+
+# When changing this file, you need to bump the following
+# .gitlab-ci/image-tags.yml tags:
+# DEBIAN_BUILD_TAG
+
+set -ex
+
+git clone https://github.com/microsoft/DirectX-Headers -b v1.711.3-preview 
--depth 1
+pushd DirectX-Headers
+meson setup build --backend=ninja --buildtype=release -Dbuild-test=false 
$EXTRA_MESON_ARGS
+meson install -C build
+popd
+rm -rf DirectX-Headers
diff --git a/.gitlab-ci/container/cross_build.sh 
b/.gitlab-ci/container/cross_build.sh
index 483488f93cb..425fa2a9e8c 100644
--- a/.gitlab-ci/container/cross_build.sh
+++ b/.gitlab-ci/container/cross_build.sh
@@ -76,6 +76,8 @@ export EXTRA_MESON_ARGS="--cross-file=/cross_file-${arch}.txt 
-D libdir=lib/${MU
 
 . .gitlab-ci/container/build-wayland.sh
 
+. .gitlab-ci/container/build-directx-headers.sh
+
 apt-get purge -y "${EPHEMERAL[@]}"
 
 . .gitlab-ci/container/container_post_build.sh
diff --git a/.gitlab-ci/container/debian/x86_64_build.sh 
b/.gitlab-ci/container/debian/x86_64_build.sh
index 3cc9e48c512..d8c43e2146b 100644
--- a/.gitlab-ci/container/debian/x86_64_build.sh
+++ b/.gitlab-ci/container/debian/x86_64_build.sh
@@ -83,12 +83,7 @@ rm -rf $XORGMACROS_VERSION
 
 . .gitlab-ci/container/build-shader-db.sh
 
-git clone https://github.com/microsoft/DirectX-Headers -b v1.711.3-preview 
--depth 1
-pushd DirectX-Headers
-meson setup build --backend=ninja --buildtype=release -Dbuild-test=false
-meson install -C build
-popd
-rm -rf DirectX-Headers
+. .gitlab-ci/container/build-directx-headers.sh
 
 python3 -m pip install --break-system-packages -r 
.gitlab-ci/lava/requirements.txt
 
diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml
index c3978cfb972..8ef8cd96a4e 100644
--- a/.gitlab-ci/image-tags.yml
+++ b/.gitlab-ci/image-tags.yml
@@ -10,7 +10,7 @@ variables:
    DEBIAN_BASE_TAG: "2023-11-18-deqp-runner"
 
    DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build"
-   DEBIAN_BUILD_TAG: "2023-11-20-meson"
+   DEBIAN_BUILD_TAG: "2023-12-01-debian-x86_32-d3d12_2"
 
    DEBIAN_X86_64_TEST_BASE_IMAGE: "debian/x86_64_test-base"
 
diff --git a/meson.build b/meson.build
index e92ac428fbb..dc47214331d 100644
--- a/meson.build
+++ b/meson.build
@@ -1048,6 +1048,7 @@ else
     '-fno-trapping-math',
     '-Qunused-arguments',
     '-fno-common',
+    '-Wno-unknown-pragmas',
     # Clang
     '-Wno-microsoft-enum-value',
     '-Wno-unused-function',
@@ -1067,6 +1068,7 @@ else
     # to the memory before the constructor as "dead stores".
     # For now we disable this optimization.
     '-flifetime-dse=1',
+    '-Wno-unknown-pragmas',
     # Clang
     '-Wno-microsoft-enum-value',
   ]
diff --git a/src/gallium/drivers/d3d12/d3d12_compiler.h 
b/src/gallium/drivers/d3d12/d3d12_compiler.h
index ce229a25728..82194d9439c 100644
--- a/src/gallium/drivers/d3d12/d3d12_compiler.h
+++ b/src/gallium/drivers/d3d12/d3d12_compiler.h
@@ -24,6 +24,8 @@
 #ifndef D3D12_COMPILER_H
 #define D3D12_COMPILER_H
 
+#include "d3d12_common.h"
+
 #include "dxil_nir_lower_int_samplers.h"
 
 #include "pipe/p_defines.h"

Reply via email to