mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Implement D3D12 backend
This commit is contained in:
33
Source/Core/VideoBackends/D3D12/DXVertexFormat.h
Normal file
33
Source/Core/VideoBackends/D3D12/DXVertexFormat.h
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright 2019 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <d3d12.h>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "VideoCommon/NativeVertexFormat.h"
|
||||
|
||||
namespace DX12
|
||||
{
|
||||
class DXVertexFormat : public NativeVertexFormat
|
||||
{
|
||||
public:
|
||||
static const u32 MAX_VERTEX_ATTRIBUTES = 16;
|
||||
|
||||
DXVertexFormat(const PortableVertexDeclaration& vtx_decl);
|
||||
|
||||
// Passed to pipeline state creation
|
||||
void GetInputLayoutDesc(D3D12_INPUT_LAYOUT_DESC* desc) const;
|
||||
|
||||
private:
|
||||
void AddAttribute(const char* semantic_name, u32 semantic_index, u32 slot, DXGI_FORMAT format,
|
||||
u32 offset);
|
||||
void MapAttributes();
|
||||
|
||||
std::array<D3D12_INPUT_ELEMENT_DESC, MAX_VERTEX_ATTRIBUTES> m_attribute_descriptions = {};
|
||||
u32 m_num_attributes = 0;
|
||||
};
|
||||
} // namespace Vulkan
|
Reference in New Issue
Block a user