D3D12: Initial commit for D3D12 backend implementation.

This commit is contained in:
hdcmeta
2016-01-07 19:40:35 -08:00
parent a2e2e36745
commit 8cc686b360
54 changed files with 12296 additions and 7 deletions

View File

@ -0,0 +1,47 @@
// Copyright 2008 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "VideoCommon/VertexManagerBase.h"
namespace DX12
{
class D3DStreamBuffer;
class VertexManager final : public VertexManagerBase
{
public:
VertexManager();
~VertexManager();
NativeVertexFormat* CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) override;
void CreateDeviceObjects() override;
void DestroyDeviceObjects() override;
void SetIndexBuffer();
protected:
void ResetBuffer(u32 stride) override;
private:
void PrepareDrawBuffers(u32 stride);
void Draw(u32 stride);
void vFlush(bool use_dst_alpha) override;
u32 m_vertex_draw_offset;
u32 m_index_draw_offset;
D3DStreamBuffer* m_vertex_stream_buffer = nullptr;
D3DStreamBuffer* m_index_stream_buffer = nullptr;
bool m_vertex_stream_buffer_reallocated = false;
bool m_index_stream_buffer_reallocated = false;
std::vector<u8> m_index_cpu_buffer;
std::vector<u8> m_vertex_cpu_buffer;
};
} // namespace