mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
build: Improve SPIR-V headers detection.
Allows building with Vulkan SDK. Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ccc49fe00d
commit
b901d72877
12
configure.ac
12
configure.ac
@ -48,11 +48,17 @@ VKD3D_CHECK_MINGW32_PROG([CROSSCC32], [CROSSTARGET32], [no])
|
||||
VKD3D_CHECK_MINGW64_PROG([CROSSCC64], [CROSSTARGET64], [no])
|
||||
|
||||
dnl Check for headers
|
||||
AC_CHECK_HEADERS([pthread.h vulkan/vulkan.h spirv/unified1/spirv.h spirv/unified1/GLSL.std.450.h])
|
||||
AC_CHECK_HEADERS([pthread.h vulkan/vulkan.h \
|
||||
vulkan/spirv.h vulkan/GLSL.std.450.h \
|
||||
spirv/unified1/spirv.h spirv/unified1/GLSL.std.450.h])
|
||||
AS_IF([test "x$ac_cv_header_pthread_h" != "xyes"], [AC_MSG_ERROR([pthread.h not found.])])
|
||||
AS_IF([test "x$ac_cv_header_vulkan_vulkan_h" != "xyes"], [AC_MSG_ERROR([vulkan.h not found.])])
|
||||
AS_IF([test "x$ac_cv_header_spirv_unified1_spirv_h" != "xyes"], [AC_MSG_ERROR([spirv.h not found.])])
|
||||
AS_IF([test "x$ac_cv_header_spirv_unified1_GLSL_std_450_h" != "xyes"], [AC_MSG_ERROR([GLSL.std.450.h not found.])])
|
||||
AS_IF([test "x$ac_cv_header_spirv_unified1_spirv_h" != "xyes" \
|
||||
-a "x$ac_cv_header_vulkan_spirv_h" != "xyes"],
|
||||
[AC_MSG_ERROR([spirv.h not found.])])
|
||||
AS_IF([test "x$ac_cv_header_spirv_unified1_GLSL_std_450_h" != "xyes" \
|
||||
-a "x$ac_cv_header_vulkan_GLSL_std_450_h" != "xyes"],
|
||||
[AC_MSG_ERROR([GLSL.std.450.h not found.])])
|
||||
|
||||
dnl Check for libraries
|
||||
m4_ifdef([PKG_PROG_PKG_CONFIG], [PKG_PROG_PKG_CONFIG], [m4_fatal([pkg-config autoconf macros not found.])])
|
||||
|
@ -21,13 +21,20 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include "spirv/unified1/spirv.h"
|
||||
#include "spirv/unified1/GLSL.std.450.h"
|
||||
#ifdef HAVE_SPIRV_TOOLS
|
||||
# include "spirv-tools/libspirv.h"
|
||||
#endif /* HAVE_SPIRV_TOOLS */
|
||||
|
||||
#ifdef HAVE_SPIRV_UNIFIED1_SPIRV_H
|
||||
# include "spirv/unified1/spirv.h"
|
||||
#else
|
||||
# include "vulkan/spirv.h"
|
||||
#endif /* HAVE_SPIRV_UNIFIED1_SPIRV_H */
|
||||
#ifdef HAVE_SPIRV_UNIFIED1_GLSL_STD_450_H
|
||||
# include "spirv/unified1/GLSL.std.450.h"
|
||||
#else
|
||||
# include "vulkan/GLSL.std.450.h"
|
||||
#endif /* HAVE_SPIRV_UNIFIED1_GLSL_STD_450_H */
|
||||
|
||||
#ifdef HAVE_SPIRV_TOOLS
|
||||
# include "spirv-tools/libspirv.h"
|
||||
|
||||
static void vkd3d_spirv_dump(const struct vkd3d_shader_code *spirv)
|
||||
{
|
||||
@ -85,7 +92,7 @@ static void vkd3d_spirv_validate(const struct vkd3d_shader_code *spirv)
|
||||
static void vkd3d_spirv_dump(const struct vkd3d_shader_code *spirv) {}
|
||||
static void vkd3d_spirv_validate(const struct vkd3d_shader_code *spirv) {}
|
||||
|
||||
#endif /* HAVE_SPIRV_TOOLS */
|
||||
#endif /* HAVE_SPIRV_TOOLS */
|
||||
|
||||
#define VKD3D_SPIRV_VERSION 0x00010000
|
||||
#define VKD3D_SPIRV_GENERATOR_ID 18
|
||||
|
Loading…
Reference in New Issue
Block a user