Permalink
Browse files

SPIRV-Cross should build on Android now, so remove another platform c…

…heck.
  • Loading branch information...
hrydgard committed Dec 7, 2017
1 parent 99b34c7 commit b895f944ffdb98cb0b504c6d22999e17a0f057c4
Showing with 3 additions and 11 deletions.
  1. +2 −11 GPU/Common/ShaderTranslation.cpp
  2. +1 −0 ext/CMakeLists.txt
@@ -34,19 +34,16 @@
#include "thin3d/thin3d.h"
#include "gfx_es2/gpu_features.h"
#if !defined(ANDROID)
#include "ext/SPIRV-Cross/spirv.hpp"
#include "ext/SPIRV-Cross/spirv_common.hpp"
#include "ext/SPIRV-Cross/spirv_cross.hpp"
#include "ext/SPIRV-Cross/spirv_glsl.hpp"
#ifdef _WIN32
#include "ext/SPIRV-Cross/spirv_hlsl.hpp"
#endif
#endif
extern void init_resources(TBuiltInResource &Resources);
#if !defined(ANDROID)
static EShLanguage GetLanguage(const Draw::ShaderStage stage) {
switch (stage) {
case Draw::ShaderStage::VERTEX: return EShLangVertex;
@@ -58,16 +55,15 @@ static EShLanguage GetLanguage(const Draw::ShaderStage stage) {
default: return EShLangVertex;
}
}
#endif
void ShaderTranslationInit() {
// TODO: We have TLS issues on UWP
#if !PPSSPP_PLATFORM(UWP) && !defined(ANDROID)
#if !PPSSPP_PLATFORM(UWP)
glslang::InitializeProcess();
#endif
}
void ShaderTranslationShutdown() {
#if !PPSSPP_PLATFORM(UWP) && !defined(ANDROID)
#if !PPSSPP_PLATFORM(UWP)
glslang::FinalizeProcess();
#endif
}
@@ -201,10 +197,6 @@ bool TranslateShader(std::string *dest, ShaderLanguage destLang, TranslatedShade
*errorMessage = "";
}
#if defined(ANDROID)
return false;
#else
#if PPSSPP_PLATFORM(UWP)
return false;
#endif
@@ -331,5 +323,4 @@ bool TranslateShader(std::string *dest, ShaderLanguage destLang, TranslatedShade
default:
return false;
}
#endif
}
@@ -6,6 +6,7 @@ if(NOT USING_GLES2)
endif()
set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "let's not build binaries we don't need" FORCE)
set(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS ON CACHE BOOL "let's not use exceptions" FORCE)
add_subdirectory(glslang)
add_subdirectory(snappy)

0 comments on commit b895f94

Please sign in to comment.