mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Buildfixes for Android
This commit is contained in:
parent
93e148fed6
commit
b8dc4d1fb8
5 changed files with 14 additions and 13 deletions
|
@ -1265,6 +1265,8 @@ set(GPU_SOURCES
|
|||
GPU/Common/ShaderUniforms.h
|
||||
GPU/Common/ShaderCommon.cpp
|
||||
GPU/Common/ShaderCommon.h
|
||||
GPU/Common/ShaderTranslation.cpp
|
||||
GPU/Common/ShaderTranslation.h
|
||||
GPU/Common/SplineCommon.cpp
|
||||
GPU/Common/SplineCommon.h
|
||||
GPU/Common/StencilCommon.cpp
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#if !defined(ANDROID)
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
|
@ -34,6 +32,8 @@
|
|||
#include "ShaderTranslation.h"
|
||||
#include "ext/glslang/SPIRV/GlslangToSpv.h"
|
||||
#include "thin3d/thin3d.h"
|
||||
|
||||
#if !defined(ANDROID)
|
||||
#include "ext/SPIRV-Cross/spirv.hpp"
|
||||
#include "ext/SPIRV-Cross/spirv_common.hpp"
|
||||
#include "ext/SPIRV-Cross/spirv_cross.hpp"
|
||||
|
@ -41,6 +41,7 @@
|
|||
#ifdef _WIN32
|
||||
#include "ext/SPIRV-Cross/spirv_hlsl.hpp"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern void init_resources(TBuiltInResource &Resources);
|
||||
|
||||
|
@ -58,12 +59,12 @@ static EShLanguage GetLanguage(const Draw::ShaderStage stage) {
|
|||
|
||||
void ShaderTranslationInit() {
|
||||
// TODO: We have TLS issues on UWP
|
||||
#if !PPSSPP_PLATFORM(UWP)
|
||||
#if !PPSSPP_PLATFORM(UWP) && !defined(ANDROID)
|
||||
glslang::InitializeProcess();
|
||||
#endif
|
||||
}
|
||||
void ShaderTranslationShutdown() {
|
||||
#if !PPSSPP_PLATFORM(UWP)
|
||||
#if !PPSSPP_PLATFORM(UWP) && !defined(ANDROID)
|
||||
glslang::FinalizeProcess();
|
||||
#endif
|
||||
}
|
||||
|
@ -189,12 +190,16 @@ bool TranslateShader(std::string *dest, ShaderLanguage destLang, TranslatedShade
|
|||
if (srcLang != GLSL_300 && srcLang != GLSL_140)
|
||||
return false;
|
||||
|
||||
if (srcLang == GLSL_140 || srcLang == GLSL_300 && destLang == GLSL_VULKAN) {
|
||||
if ((srcLang == GLSL_140 || srcLang == GLSL_300) && destLang == GLSL_VULKAN) {
|
||||
// Let's just mess about at the string level, no need to recompile.
|
||||
bool result = ConvertToVulkanGLSL(dest, destMetadata, src, stage, errorMessage);
|
||||
return result;
|
||||
}
|
||||
|
||||
#if defined(ANDROID)
|
||||
return false;
|
||||
#else
|
||||
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
return false;
|
||||
#endif
|
||||
|
@ -304,6 +309,5 @@ bool TranslateShader(std::string *dest, ShaderLanguage destLang, TranslatedShade
|
|||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
#include "GPU/Common/ShaderCommon.h"
|
||||
#include "thin3d/thin3d.h"
|
||||
|
||||
#ifndef ANDROID
|
||||
|
||||
struct TranslatedShaderMetadata {
|
||||
|
||||
};
|
||||
|
@ -31,5 +29,3 @@ void ShaderTranslationInit();
|
|||
void ShaderTranslationShutdown();
|
||||
|
||||
bool TranslateShader(std::string *dst, ShaderLanguage destLang, TranslatedShaderMetadata *destMetadata, std::string src, ShaderLanguage srcLang, Draw::ShaderStage stage, std::string *errorMessage);
|
||||
|
||||
#endif
|
|
@ -640,11 +640,9 @@ void FramebufferManagerVulkan::Resized() {
|
|||
void FramebufferManagerVulkan::CompilePostShader() {
|
||||
if (postVs_) {
|
||||
vulkan_->Delete().QueueDeleteShaderModule(postVs_);
|
||||
postVs_ = nullptr;
|
||||
}
|
||||
if (postFs_) {
|
||||
vulkan_->Delete().QueueDeleteShaderModule(postFs_);
|
||||
postFs_ = nullptr;
|
||||
}
|
||||
|
||||
const ShaderInfo *shaderInfo = nullptr;
|
||||
|
|
|
@ -223,6 +223,7 @@ EXEC_AND_LIB_FILES := \
|
|||
$(SRC)/GPU/Common/TextureCacheCommon.cpp.arm \
|
||||
$(SRC)/GPU/Common/TextureScalerCommon.cpp.arm \
|
||||
$(SRC)/GPU/Common/ShaderCommon.cpp \
|
||||
$(SRC)/GPU/Common/ShaderTranslation.cpp \
|
||||
$(SRC)/GPU/Common/StencilCommon.cpp \
|
||||
$(SRC)/GPU/Common/SplineCommon.cpp.arm \
|
||||
$(SRC)/GPU/Common/DrawEngineCommon.cpp.arm \
|
||||
|
|
Loading…
Add table
Reference in a new issue