Skip to content

Commit

Permalink
SPIRV-Cross should build on Android now, so remove another platform c…
Browse files Browse the repository at this point in the history
…heck.
  • Loading branch information
hrydgard committed Dec 8, 2017
1 parent 99b34c7 commit b895f94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
13 changes: 2 additions & 11 deletions GPU/Common/ShaderTranslation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -331,5 +323,4 @@ bool TranslateShader(std::string *dest, ShaderLanguage destLang, TranslatedShade
default:
return false;
}
#endif
}
1 change: 1 addition & 0 deletions ext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b895f94

Please sign in to comment.