mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
More minor changes to make GPU and native build on UWP later
This commit is contained in:
1 parent
fcbc20f240
commit
f5fa238e22
10 files changed
+28
-20
No files matched your search
@@ -15,15 +15,17 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
|
||||
#include "gfx_es2/gpu_features.h"
|
||||
|
||||
#include "GPU/Common/ShaderId.h"
|
||||
#include "GPU/Common/ShaderCommon.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "GPU/GPUState.h"
|
||||
#include "ext/native/gfx/GLStateCache.h"
|
||||
#include "GPU/Common/DepalettizeShaderCommon.h"
|
||||
|
||||
|
||||
#define WRITE p+=sprintf
|
||||
|
||||
// TODO: Add a compute shader path. Complete waste of time to set up a graphics state.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
#include "GPU/ge_constants.h"
|
||||
|
||||
// TODO: Replace enums and structs with same from thin3d.h, for convenient mapping.
|
||||
|
||||
@@ -1023,7 +1023,7 @@ void DrawEngineCommon::SubmitBezier(const void *control_points, const void *indi
|
||||
// Bezier patches share less control points than spline patches. Otherwise they are pretty much the same (except bezier don't support the open/close thing)
|
||||
int num_patches_u = (count_u - 1) / 3;
|
||||
int num_patches_v = (count_v - 1) / 3;
|
||||
BezierPatch *patches;
|
||||
BezierPatch *patches = nullptr;
|
||||
if (g_Config.bHardwareTessellation && g_Config.bHardwareTransform && !g_Config.bSoftwareRendering) {
|
||||
for (int idx = 0; idx < count_u * count_v; idx++) {
|
||||
SimpleVertex *point = simplified_control_points + (indices ? idxConv.convert(idx) : idx);
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include "base/logging.h"
|
||||
|
||||
#include "gfx/d3d9_state.h"
|
||||
#include "ext/native/thin3d/thin3d.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "GPU/D3D11/FramebufferManagerD3D11.h"
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/Config.h"
|
||||
#include "gfx/d3d9_shader.h"
|
||||
#include "GPU/Directx9/PixelShaderGeneratorDX9.h"
|
||||
#include "GPU/ge_constants.h"
|
||||
#include "GPU/Common/GPUStateUtils.h"
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
#include <cstdio>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/timeutil.h"
|
||||
|
||||
// For NV time functions. Ugly!
|
||||
#include "gfx/gl_common.h"
|
||||
#include "gfx_es2/gpu_features.h"
|
||||
|
||||
#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
|
||||
#include <stdio.h>
|
||||
|
||||
static double curtime = 0;
|
||||
static float curtime_f = 0;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
@@ -215,12 +217,7 @@ size_t getFilesInDir(const char *directory, std::vector<FileInfo> *files, const
|
||||
#ifdef _WIN32
|
||||
// Find the first file in the directory.
|
||||
WIN32_FIND_DATA ffd;
|
||||
#ifdef UNICODE
|
||||
|
||||
HANDLE hFind = FindFirstFile((ConvertUTF8ToWString(directory) + L"\\*").c_str(), &ffd);
|
||||
#else
|
||||
HANDLE hFind = FindFirstFile((std::string(directory) + "\\*").c_str(), &ffd);
|
||||
#endif
|
||||
HANDLE hFind = FindFirstFileEx((ConvertUTF8ToWString(directory) + L"\\*").c_str(), FindExInfoStandard, &ffd, FindExSearchNameMatch, NULL, 0);
|
||||
if (hFind == INVALID_HANDLE_VALUE) {
|
||||
FindClose(hFind);
|
||||
return 0;
|
||||
@@ -296,6 +293,9 @@ size_t getFilesInDir(const char *directory, std::vector<FileInfo> *files, const
|
||||
// Returns a vector with the device names
|
||||
std::vector<std::string> getWindowsDrives()
|
||||
{
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
return std::vector<std::string>(); // TODO UWP http://stackoverflow.com/questions/37404405/how-to-get-logical-drives-names-in-windows-10
|
||||
#else
|
||||
std::vector<std::string> drives;
|
||||
|
||||
const DWORD buffsize = GetLogicalDriveStrings(0, NULL);
|
||||
@@ -315,5 +315,6 @@ std::vector<std::string> getWindowsDrives()
|
||||
}
|
||||
}
|
||||
return drives;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
@@ -9,10 +9,8 @@
|
||||
#include "math/math_util.h"
|
||||
#include "gfx/texture_atlas.h"
|
||||
#include "gfx/gl_debug_log.h"
|
||||
#include "gfx/gl_common.h"
|
||||
#include "gfx_es2/draw_buffer.h"
|
||||
#include "gfx_es2/draw_text.h"
|
||||
#include "gfx_es2/glsl_program.h"
|
||||
#include "util/text/utf8.h"
|
||||
#include "util/text/wrap_text.h"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "gfx/gl_common.h"
|
||||
#include "gfx_es2/gpu_features.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32)
|
||||
#include "GL/wglew.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#include "thin3d/thin3d.h"
|
||||
#include "thin3d/d3d11_loader.h"
|
||||
#include "math/dataconv.h"
|
||||
@@ -168,10 +170,16 @@ private:
|
||||
};
|
||||
|
||||
static void GetRes(HWND hWnd, int &xres, int &yres) {
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
// TEMPORARY TODO UWP
|
||||
xres = 1024;
|
||||
yres = 768;
|
||||
#else
|
||||
RECT rc;
|
||||
GetClientRect(hWnd, &rc);
|
||||
xres = rc.right - rc.left;
|
||||
yres = rc.bottom - rc.top;
|
||||
#endif
|
||||
}
|
||||
|
||||
D3D11DrawContext::D3D11DrawContext(ID3D11Device *device, ID3D11DeviceContext *deviceContext, ID3D11Device1 *device1, ID3D11DeviceContext1 *deviceContext1, HWND hWnd)
|
||||
|
||||
Reference in new issue
Block a user