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:
Józef Kucia
2018-04-16 12:16:23 +02:00
committed by Alexandre Julliard
parent ccc49fe00d
commit b901d72877
2 changed files with 22 additions and 9 deletions

View File

@@ -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