mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-01 23:26:03 +00:00
VideoBackends: Add Metal renderer
This commit is contained in:
parent
b0b5faa793
commit
716c0980d7
42 changed files with 3714 additions and 47 deletions
30
Source/Core/VideoBackends/Metal/MTLBoundingBox.h
Normal file
30
Source/Core/VideoBackends/Metal/MTLBoundingBox.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
// Copyright 2022 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "VideoCommon/BoundingBox.h"
|
||||
|
||||
#include <Metal/Metal.h>
|
||||
|
||||
#include "VideoBackends/Metal/MRCHelpers.h"
|
||||
|
||||
namespace Metal
|
||||
{
|
||||
class BoundingBox final : public ::BoundingBox
|
||||
{
|
||||
public:
|
||||
~BoundingBox() override;
|
||||
|
||||
bool Initialize() override;
|
||||
|
||||
protected:
|
||||
std::vector<BBoxType> Read(u32 index, u32 length) override;
|
||||
void Write(u32 index, const std::vector<BBoxType>& values) override;
|
||||
|
||||
private:
|
||||
BBoxType* m_cpu_buffer_ptr;
|
||||
MRCOwned<id<MTLFence>> m_download_fence;
|
||||
MRCOwned<id<MTLFence>> m_upload_fence;
|
||||
MRCOwned<id<MTLBuffer>> m_cpu_buffer;
|
||||
MRCOwned<id<MTLBuffer>> m_gpu_buffer;
|
||||
};
|
||||
} // namespace Metal
|
Loading…
Add table
Add a link
Reference in a new issue