Merge pull request #10582 from hrydgard/fix-uwp-build

Noticed that the UWP build has been broken for some time, fix it.
This commit is contained in:
Henrik Rydgård 2018-02-05 17:08:13 +01:00 committed by GitHub
commit a41422afbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 19 additions and 53 deletions

View File

@ -196,7 +196,7 @@ void UpdateRunLoop() {
}
void KeepScreenAwake() {
#ifdef _WIN32
#if defined(_WIN32) && !PPSSPP_PLATFORM(UWP)
SetThreadExecutionState(ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED);
#endif
}

View File

@ -17,7 +17,6 @@
#include "GPU/ge_constants.h"
#include "GPU/GPUState.h"
#include "GPU/GLES/ShaderManagerGLES.h"
#include "Common/ChunkFile.h"
#include "Core/CoreParameter.h"

View File

@ -28,7 +28,7 @@
#include "Core/Config.h"
#include "Core/System.h"
#include "DisplayLayoutEditor.h"
#include "GPU/GLES/FramebufferManagerGLES.h"
#include "GPU/Common/FramebufferCommon.h"
static const int leftColumnWidth = 200;
static const float orgRatio = 1.764706f;

View File

@ -49,8 +49,10 @@
#include "Core/System.h"
#include "GPU/GPUState.h"
#include "GPU/GPUInterface.h"
#include "GPU/GLES/FramebufferManagerGLES.h"
#include "GPU/Common/FramebufferCommon.h"
#if !PPSSPP_PLATFORM(UWP)
#include "GPU/Vulkan/DebugVisVulkan.h"
#endif
#include "Core/HLE/sceCtrl.h"
#include "Core/HLE/sceDisplay.h"
#include "Core/HLE/sceSas.h"
@ -78,9 +80,6 @@
#if defined(_WIN32) && !PPSSPP_PLATFORM(UWP)
#include "Windows/MainWindow.h"
#endif
#if !PPSSPP_PLATFORM(UWP)
#include "gfx/gl_common.h"
#endif
#ifndef MOBILE_DEVICE
static AVIDump avi;
@ -1212,9 +1211,11 @@ void EmuScreen::renderUI() {
DrawFPS(draw2d, ctx->GetBounds());
}
#if !PPSSPP_PLATFORM(UWP)
if (g_Config.iGPUBackend == (int)GPUBackend::VULKAN && g_Config.bShowAllocatorDebug) {
DrawAllocatorVis(ctx, gpu);
}
#endif
#ifdef USE_PROFILER
if (g_Config.bShowFrameProfiler && !invalid_) {

View File

@ -54,7 +54,7 @@
#include "Core/Reporting.h"
#include "android/jni/TestRunner.h"
#include "GPU/GPUInterface.h"
#include "GPU/GLES/FramebufferManagerGLES.h"
#include "GPU/Common/FramebufferCommon.h"
#if defined(_WIN32) && !PPSSPP_PLATFORM(UWP)
#pragma warning(disable:4091) // workaround bug in VS2015 headers

View File

@ -313,6 +313,7 @@
<ClInclude Include="..\..\GPU\Common\SoftwareLighting.h" />
<ClInclude Include="..\..\GPU\Common\SoftwareTransformCommon.h" />
<ClInclude Include="..\..\GPU\Common\SplineCommon.h" />
<ClInclude Include="..\..\GPU\Common\StencilCommon.h" />
<ClInclude Include="..\..\GPU\Common\TextureCacheCommon.h" />
<ClInclude Include="..\..\GPU\Common\TextureDecoder.h" />
<ClInclude Include="..\..\GPU\Common\TextureDecoderNEON.h" />
@ -365,6 +366,7 @@
<ClCompile Include="..\..\GPU\Common\ShaderUniforms.cpp" />
<ClCompile Include="..\..\GPU\Common\SoftwareTransformCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\SplineCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\StencilCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\TextureCacheCommon.cpp" />
<ClCompile Include="..\..\GPU\Common\TextureDecoder.cpp" />
<ClCompile Include="..\..\GPU\Common\TextureDecoderNEON.cpp" />

View File

@ -160,6 +160,9 @@
<ClCompile Include="..\..\GPU\Debugger\Record.cpp">
<Filter>Debugger</Filter>
</ClCompile>
<ClCompile Include="..\..\GPU\Common\StencilCommon.cpp">
<Filter>Common</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
@ -295,5 +298,8 @@
<ClInclude Include="..\..\GPU\Debugger\Record.h">
<Filter>Debugger</Filter>
</ClInclude>
<ClInclude Include="..\..\GPU\Common\StencilCommon.h">
<Filter>Common</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -338,7 +338,6 @@
<ClInclude Include="..\..\ext\native\file\path.h" />
<ClInclude Include="..\..\ext\native\file\vfs.h" />
<ClInclude Include="..\..\ext\native\file\zip_read.h" />
<ClInclude Include="..\..\ext\native\gfx\gl_lost_manager.h" />
<ClInclude Include="..\..\ext\native\gfx\texture_atlas.h" />
<ClInclude Include="..\..\ext\native\gfx_es2\draw_buffer.h" />
<ClInclude Include="..\..\ext\native\gfx_es2\draw_text.h" />
@ -1170,7 +1169,6 @@
<ClCompile Include="..\..\ext\native\file\ini_file.cpp" />
<ClCompile Include="..\..\ext\native\file\path.cpp" />
<ClCompile Include="..\..\ext\native\file\zip_read.cpp" />
<ClCompile Include="..\..\ext\native\gfx\gl_lost_manager.cpp" />
<ClCompile Include="..\..\ext\native\gfx\texture_atlas.cpp" />
<ClCompile Include="..\..\ext\native\gfx_es2\draw_buffer.cpp" />
<ClCompile Include="..\..\ext\native\gfx_es2\draw_text.cpp" />

View File

@ -451,9 +451,6 @@
<ClCompile Include="..\..\ext\native\data\compression.cpp">
<Filter>data</Filter>
</ClCompile>
<ClCompile Include="..\..\ext\native\gfx\gl_lost_manager.cpp">
<Filter>gfx</Filter>
</ClCompile>
<ClCompile Include="..\..\ext\native\base\logging.cpp">
<Filter>base</Filter>
</ClCompile>
@ -725,8 +722,5 @@
<ClInclude Include="..\..\ext\native\data\listable.h">
<Filter>data</Filter>
</ClInclude>
<ClInclude Include="..\..\ext\native\gfx\gl_lost_manager.h">
<Filter>gfx</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
#include "pch.h"
#include "pch.h"
#include "PPSSPP_UWPMain.h"
#include <cassert>
@ -108,8 +108,7 @@ PPSSPP_UWPMain::PPSSPP_UWPMain(App ^app, const std::shared_ptr<DX::DeviceResourc
bool debugLogLevel = false;
g_Config.iGPUBackend = GPU_BACKEND_DIRECT3D11;
g_Config.bSeparateCPUThread = false;
g_Config.iGPUBackend = (int)GPUBackend::DIRECT3D11;
if (debugLogLevel) {
LogManager::GetInstance()->SetAllLogLevels(LogTypes::LDEBUG);

View File

@ -7,8 +7,6 @@
#ifdef _WIN32
#include <windows.h>
#else
#include "gfx/gl_common.h"
#include "gfx_es2/gpu_features.h"
#include <sys/time.h>
#include <unistd.h>
#endif
@ -41,25 +39,6 @@ uint64_t _frequency = 0;
uint64_t _starttime = 0;
double real_time_now() {
#ifdef __ANDROID__
if (false && gl_extensions.EGL_NV_system_time) {
// This is needed to profile using PerfHUD on Tegra
if (_frequency == 0) {
_frequency = eglGetSystemTimeFrequencyNV();
_starttime = eglGetSystemTimeNV();
}
uint64_t cur = eglGetSystemTimeNV();
int64_t diff = cur - _starttime;
return (double)diff / (double)_frequency;
}
#if 0
// This clock is really "choppy" on Nexus 9!
struct timespec time;
clock_gettime(CLOCK_MONOTONIC_RAW, &time);
return time.tv_sec + time.tv_nsec / 1.0e9;
#else
static time_t start;
struct timeval tv;
gettimeofday(&tv, NULL);
@ -68,18 +47,6 @@ double real_time_now() {
}
tv.tv_sec -= start;
return (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0;
#endif
#else
static time_t start;
struct timeval tv;
gettimeofday(&tv, NULL);
if (start == 0) {
start = tv.tv_sec;
}
tv.tv_sec -= start;
return (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0;
#endif
}
#endif

View File

@ -997,7 +997,7 @@ void GLQueueRunner::PerformReadback(const GLRStep &pass) {
const GLuint format = GL_RGBA;
const GLuint type = GL_UNSIGNED_BYTE;
const int srcAlignment = 4;
int dstAlignment = DataFormatSizeInBytes(pass.readback.dstFormat);
int dstAlignment = (int)DataFormatSizeInBytes(pass.readback.dstFormat);
int pixelStride = pass.readback.srcRect.w;
// Apply the correct alignment.