Use IID_PPV_ARGS() macro for passing arguments to heap creation methods

This commit is contained in:
Daniel Krupiński 2021-09-16 19:39:09 +02:00
parent f50f65dcde
commit 5d92b05e99

View File

@ -3750,7 +3750,7 @@ HRESULT MemoryBlock::Init()
heapDesc.Alignment = HeapFlagsToAlignment(m_HeapFlags); heapDesc.Alignment = HeapFlagsToAlignment(m_HeapFlags);
heapDesc.Flags = m_HeapFlags; heapDesc.Flags = m_HeapFlags;
HRESULT hr = m_Allocator->GetDevice()->CreateHeap(&heapDesc, __uuidof(*m_Heap), (void**)&m_Heap); HRESULT hr = m_Allocator->GetDevice()->CreateHeap(&heapDesc, IID_PPV_ARGS(&m_Heap));
if(SUCCEEDED(hr)) if(SUCCEEDED(hr))
{ {
m_Allocator->m_Budget.m_BlockBytes[HeapTypeToIndex(m_HeapProps.Type)] += m_Size; m_Allocator->m_Budget.m_BlockBytes[HeapTypeToIndex(m_HeapProps.Type)] += m_Size;
@ -5140,7 +5140,7 @@ HRESULT AllocatorPimpl::AllocateHeap(
heapDesc.Flags = committedAllocParams.m_HeapFlags; heapDesc.Flags = committedAllocParams.m_HeapFlags;
ID3D12Heap* heap = nullptr; ID3D12Heap* heap = nullptr;
HRESULT hr = m_Device->CreateHeap(&heapDesc, __uuidof(*heap), (void**)&heap); HRESULT hr = m_Device->CreateHeap(&heapDesc, IID_PPV_ARGS(&heap));
if(SUCCEEDED(hr)) if(SUCCEEDED(hr))
{ {
const BOOL wasZeroInitialized = TRUE; const BOOL wasZeroInitialized = TRUE;
@ -5183,7 +5183,7 @@ HRESULT AllocatorPimpl::AllocateHeap1(
heapDesc.Flags = committedAllocParams.m_HeapFlags; heapDesc.Flags = committedAllocParams.m_HeapFlags;
ID3D12Heap* heap = nullptr; ID3D12Heap* heap = nullptr;
HRESULT hr = m_Device4->CreateHeap1(&heapDesc, pProtectedSession, __uuidof(*heap), (void**)&heap); HRESULT hr = m_Device4->CreateHeap1(&heapDesc, pProtectedSession, IID_PPV_ARGS(&heap));
if(SUCCEEDED(hr)) if(SUCCEEDED(hr))
{ {
const BOOL wasZeroInitialized = TRUE; const BOOL wasZeroInitialized = TRUE;