Add appropriate HAVE_SPIRV_CROSS ifdefs

This commit is contained in:
twinaphex 2018-02-03 17:13:36 +01:00
parent 94022f0599
commit df632814e6
3 changed files with 4 additions and 3 deletions

View File

@ -1355,6 +1355,7 @@ ifeq ($(HAVE_GLSLANG), 1)
endif
ifeq ($(HAVE_SPIRV_CROSS), 1)
DEFINES += -DHAVE_SPIRV_CROSS
INCLUDE_DIRS += -I$(DEPS_DIR)/SPIRV-Cross
OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_cross.o
OBJ += $(DEPS_DIR)/SPIRV-Cross/spirv_cfg.o

View File

@ -140,7 +140,7 @@ static void d3d11_free_shader_preset(d3d11_video_t* d3d11)
static bool d3d11_gfx_set_shader(void* data, enum rarch_shader_type type, const char* path)
{
#ifdef HAVE_SLANG
#if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS)
unsigned i;
d3d11_video_t* d3d11 = (d3d11_video_t*)data;

View File

@ -35,7 +35,7 @@
#include "../frontend/frontend_driver.h"
#include "video_shader_parse.h"
#ifdef HAVE_SLANG
#if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS)
#include "drivers_shader/slang_preprocess.h"
#endif
@ -538,7 +538,7 @@ bool video_shader_resolve_parameters(config_file_t *conf,
continue;
}
#ifdef HAVE_SLANG
#if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS)
/* First try to use the more robust slang implementation to support #includes. */
/* FIXME: The check for slang can be removed if it's sufficiently tested for
* GLSL/Cg as well, it should be the same implementation. */