meson: verify that d3d12.h exists when building the d3d12 driver

Without this header-file, we can't build the driver. So let's verify
that it exists, and can be used by the C++ compiler.

This should make it a bit more clear what's wrong if someone attempts to
build this using MinGW or on Linux.

Fixes: 2ea15cd661 ("d3d12: introduce d3d12 gallium driver")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7575>
This commit is contained in:
Erik Faye-Lund
2020-11-12 15:16:46 +01:00
committed by Marge Bot
parent 314f18b22a
commit ee657df09a

View File

@@ -566,6 +566,10 @@ if with_gallium_zink
dep_vulkan = dependency('vulkan')
endif
if with_gallium_d3d12 and not cpp.check_header('d3d12.h')
error('The D3D12 driver requires d3d12.h from the Windows SDK')
endif
if with_vulkan_overlay_layer or with_aco_tests
prog_glslang = find_program('glslangValidator')
endif