mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-21 18:29:05 +02:00
thin3d on Metal, plus a small render manager that owns frames, command buffers, lazily started render passes and a per-frame push buffer. Shaders are the same Vulkan GLSL the Vulkan backend gets, translated to MSL through glslang and SPIRV-Cross, with the Vulkan binding numbers as Metal buffer/texture indices. flip_vert_y makes Metal's clip space match Vulkan's, so everything else follows the Vulkan conventions. Adds GPUBackend::METAL (4) and builds the files on Apple platforms. Not yet selectable: the SDL window setup, the UI choice and the GPU core come next. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
42 lines
1.2 KiB
C++
42 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include "Common/GPU/thin3d.h"
|
|
|
|
// Separated this stuff into its own file so we don't get Windows.h included if all we want is the thin3d declarations.
|
|
|
|
#ifdef _WIN32
|
|
#include "Common/CommonWindows.h"
|
|
#include <D3Dcommon.h>
|
|
#include <wrl/client.h>
|
|
struct IDirect3DDevice9;
|
|
struct IDirect3D9;
|
|
struct IDirect3DDevice9Ex;
|
|
struct IDirect3D9Ex;
|
|
struct ID3D11Device;
|
|
struct ID3D11DeviceContext;
|
|
struct ID3D11Device1;
|
|
struct ID3D11DeviceContext1;
|
|
struct IDXGISwapChain;
|
|
#endif
|
|
|
|
class VulkanContext;
|
|
class MetalRenderManager;
|
|
|
|
namespace Draw {
|
|
|
|
DrawContext *T3DCreateGLContext(bool canChangeSwapInterval);
|
|
|
|
#ifdef _WIN32
|
|
DrawContext *T3DCreateD3D11Context(Microsoft::WRL::ComPtr<ID3D11Device> device, Microsoft::WRL::ComPtr<ID3D11DeviceContext> context, Microsoft::WRL::ComPtr<ID3D11Device1> device1, Microsoft::WRL::ComPtr<ID3D11DeviceContext1> context1, Microsoft::WRL::ComPtr<IDXGISwapChain> swapChain, D3D_FEATURE_LEVEL featureLevel, HWND hWnd, const std::vector<std::string> &adapterNames, int maxInflightFrames);
|
|
#endif
|
|
|
|
DrawContext *T3DCreateVulkanContext(VulkanContext *context, bool useRenderThread);
|
|
|
|
#ifdef __APPLE__
|
|
DrawContext *T3DCreateMetalContext(MetalRenderManager *renderManager);
|
|
#endif
|
|
|
|
} // namespace Draw
|