From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- configure.ac | 6 +++--- libs/vkd3d-shader/spirv.c | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac index d00630b92054..820783a3b4fa 100644 --- a/configure.ac +++ b/configure.ac @@ -48,11 +48,11 @@ 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/1.0/spirv.h spirv/1.0/GLSL.std.450.h]) +AC_CHECK_HEADERS([pthread.h vulkan/vulkan.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_1_0_spirv_h" != "xyes"], [AC_MSG_ERROR([spirv.h not found.])]) -AS_IF([test "x$ac_cv_header_spirv_1_0_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"], [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.])])
dnl Check for libraries m4_ifdef([PKG_PROG_PKG_CONFIG], [PKG_PROG_PKG_CONFIG], [m4_fatal([pkg-config autoconf macros not found.])]) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 89b1187399b6..8a1fdf40dae6 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -21,8 +21,8 @@
#include <stdarg.h> #include <stdio.h> -#include "spirv/1.0/spirv.h" -#include "spirv/1.0/GLSL.std.450.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 */ @@ -87,6 +87,7 @@ static void vkd3d_spirv_validate(const struct vkd3d_shader_code *spirv) {}
#endif /* HAVE_SPIRV_TOOLS */
+#define VKD3D_SPIRV_VERSION 0x00010000 #define VKD3D_SPIRV_GENERATOR_ID 18 #define VKD3D_SPIRV_GENERATOR_VERSION 0 #define VKD3D_SPIRV_GENERATOR_MAGIC ((VKD3D_SPIRV_GENERATOR_ID << 16) | VKD3D_SPIRV_GENERATOR_VERSION) @@ -1543,7 +1544,7 @@ static bool vkd3d_spirv_compile_module(struct vkd3d_spirv_builder *builder, vkd3d_spirv_stream_init(&stream);
vkd3d_spirv_build_word(&stream, SpvMagicNumber); - vkd3d_spirv_build_word(&stream, SpvVersion); + vkd3d_spirv_build_word(&stream, VKD3D_SPIRV_VERSION); vkd3d_spirv_build_word(&stream, VKD3D_SPIRV_GENERATOR_MAGIC); vkd3d_spirv_build_word(&stream, builder->current_id); /* bound */ vkd3d_spirv_build_word(&stream, 0); /* schema, reserved */