This commit is contained in:
Бранимир Караџић
2024-12-07 22:49:45 -08:00
parent f6baa4bdaf
commit 042ebe8814
31 changed files with 110 additions and 110 deletions

View File

@@ -50,7 +50,7 @@ namespace bgfx { namespace d3d12
{ D3D_PRIMITIVE_TOPOLOGY_POINTLIST, D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT, 1, 1, 0 },
{ D3D_PRIMITIVE_TOPOLOGY_UNDEFINED, D3D12_PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED, 0, 0, 0 },
};
BX_STATIC_ASSERT(Topology::Count == BX_COUNTOF(s_primInfo)-1);
static_assert(Topology::Count == BX_COUNTOF(s_primInfo)-1);
static const uint32_t s_checkMsaa[] =
{
@@ -296,7 +296,7 @@ namespace bgfx { namespace d3d12
#undef $B
#undef $A
};
BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_textureFormat) );
static_assert(TextureFormat::Count == BX_COUNTOF(s_textureFormat) );
static const D3D12_INPUT_ELEMENT_DESC s_attrib[] =
{
@@ -319,7 +319,7 @@ namespace bgfx { namespace d3d12
{ "TEXCOORD", 6, DXGI_FORMAT_R32G32_FLOAT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
{ "TEXCOORD", 7, DXGI_FORMAT_R32G32_FLOAT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
};
BX_STATIC_ASSERT(Attrib::Count == BX_COUNTOF(s_attrib) );
static_assert(Attrib::Count == BX_COUNTOF(s_attrib) );
static const DXGI_FORMAT s_attribType[][4][2] =
{
@@ -354,7 +354,7 @@ namespace bgfx { namespace d3d12
{ DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT },
},
};
BX_STATIC_ASSERT(AttribType::Count == BX_COUNTOF(s_attribType) );
static_assert(AttribType::Count == BX_COUNTOF(s_attribType) );
static D3D12_INPUT_ELEMENT_DESC* fillVertexLayout(uint8_t _stream, D3D12_INPUT_ELEMENT_DESC* _out, const VertexLayout& _layout)
{
@@ -470,7 +470,7 @@ namespace bgfx { namespace d3d12
{ { D3D12_HEAP_TYPE_UPLOAD, D3D12_CPU_PAGE_PROPERTY_UNKNOWN, D3D12_MEMORY_POOL_UNKNOWN, 0, 0 }, D3D12_RESOURCE_STATE_GENERIC_READ },
{ { D3D12_HEAP_TYPE_READBACK, D3D12_CPU_PAGE_PROPERTY_UNKNOWN, D3D12_MEMORY_POOL_UNKNOWN, 0, 0 }, D3D12_RESOURCE_STATE_COPY_DEST },
};
BX_STATIC_ASSERT(BX_COUNTOF(s_heapProperties) == HeapProperty::Count);
static_assert(BX_COUNTOF(s_heapProperties) == HeapProperty::Count);
static inline D3D12_HEAP_PROPERTIES ID3D12DeviceGetCustomHeapProperties(ID3D12Device *device, uint32_t nodeMask, D3D12_HEAP_TYPE heapType)
{
@@ -1308,7 +1308,7 @@ namespace bgfx { namespace d3d12
{ D3D12_DESCRIPTOR_RANGE_TYPE_CBV, 1, 0, 0, D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND },
{ D3D12_DESCRIPTOR_RANGE_TYPE_UAV, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, 0, 0, D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND },
};
BX_STATIC_ASSERT(BX_COUNTOF(descRange) == Rdt::Count);
static_assert(BX_COUNTOF(descRange) == Rdt::Count);
D3D12_ROOT_PARAMETER rootParameter[] =
{
@@ -2510,9 +2510,9 @@ namespace bgfx { namespace d3d12
{
#if BX_PLATFORM_WINDOWS
uint32_t nodeMask[] = { 1, 1, 1, 1 };
BX_STATIC_ASSERT(BX_COUNTOF(m_backBufferColor) == BX_COUNTOF(nodeMask) );
static_assert(BX_COUNTOF(m_backBufferColor) == BX_COUNTOF(nodeMask) );
IUnknown* presentQueue[] ={ m_cmd.m_commandQueue, m_cmd.m_commandQueue, m_cmd.m_commandQueue, m_cmd.m_commandQueue };
BX_STATIC_ASSERT(BX_COUNTOF(m_backBufferColor) == BX_COUNTOF(presentQueue) );
static_assert(BX_COUNTOF(m_backBufferColor) == BX_COUNTOF(presentQueue) );
DX_CHECK(m_dxgi.resizeBuffers(m_swapChain, m_scd, nodeMask, presentQueue) );
#elif BX_PLATFORM_WINRT
DX_CHECK(m_dxgi.resizeBuffers(m_swapChain, m_scd));
@@ -4453,7 +4453,7 @@ namespace bgfx { namespace d3d12
sizeof(BatchD3D12::DrawIndirectCommand),
sizeof(BatchD3D12::DrawIndexedIndirectCommand),
};
BX_STATIC_ASSERT(BX_COUNTOF(s_indirectCommandSize) == BatchD3D12::Count);
static_assert(BX_COUNTOF(s_indirectCommandSize) == BatchD3D12::Count);
void BatchD3D12::flush(ID3D12GraphicsCommandList* _commandList, Enum _type)
{