mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Use proper interface pointer casting during D3D12 CommandQueue creation
This commit is contained in:
@@ -103,8 +103,14 @@ bool WrappedID3D12Device::Serialise_CreateCommandQueue(SerialiserType &ser,
|
||||
|
||||
if(IsReplayingAndReading())
|
||||
{
|
||||
void *realptr = NULL;
|
||||
HRESULT hr = m_pDevice->CreateCommandQueue(&Descriptor, guid, &realptr);
|
||||
|
||||
ID3D12CommandQueue *ret = NULL;
|
||||
HRESULT hr = m_pDevice->CreateCommandQueue(&Descriptor, guid, (void **)&ret);
|
||||
if(guid == __uuidof(ID3D12CommandQueue))
|
||||
ret = (ID3D12CommandQueue *)realptr;
|
||||
else if(guid == __uuidof(ID3D12CommandQueue1))
|
||||
ret = (ID3D12CommandQueue1 *)realptr;
|
||||
|
||||
if(FAILED(hr))
|
||||
{
|
||||
@@ -155,9 +161,14 @@ HRESULT WrappedID3D12Device::CreateCommandQueue(const D3D12_COMMAND_QUEUE_DESC *
|
||||
if(riid != __uuidof(ID3D12CommandQueue) && riid != __uuidof(ID3D12CommandQueue1))
|
||||
return E_NOINTERFACE;
|
||||
|
||||
void *realptr = NULL;
|
||||
HRESULT ret = m_pDevice->CreateCommandQueue(pDesc, riid, &realptr);
|
||||
|
||||
ID3D12CommandQueue *real = NULL;
|
||||
HRESULT ret;
|
||||
SERIALISE_TIME_CALL(ret = m_pDevice->CreateCommandQueue(pDesc, riid, (void **)&real));
|
||||
if(riid == __uuidof(ID3D12CommandQueue))
|
||||
real = (ID3D12CommandQueue *)realptr;
|
||||
else if(riid == __uuidof(ID3D12CommandQueue1))
|
||||
real = (ID3D12CommandQueue1 *)realptr;
|
||||
|
||||
if(SUCCEEDED(ret))
|
||||
{
|
||||
|
||||
@@ -80,7 +80,13 @@ bool WrappedID3D12Device::Serialise_CreateCommandQueue1(SerialiserType &ser,
|
||||
HRESULT hr = E_NOINTERFACE;
|
||||
if(m_pDevice9)
|
||||
{
|
||||
hr = m_pDevice9->CreateCommandQueue1(&Descriptor, creator, guid, (void **)&ret);
|
||||
void *realptr = NULL;
|
||||
hr = m_pDevice9->CreateCommandQueue1(&Descriptor, creator, guid, &realptr);
|
||||
|
||||
if(guid == __uuidof(ID3D12CommandQueue))
|
||||
ret = (ID3D12CommandQueue *)realptr;
|
||||
else if(guid == __uuidof(ID3D12CommandQueue1))
|
||||
ret = (ID3D12CommandQueue1 *)realptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -138,9 +144,15 @@ HRESULT WrappedID3D12Device::CreateCommandQueue1(const D3D12_COMMAND_QUEUE_DESC
|
||||
if(riid != __uuidof(ID3D12CommandQueue) && riid != __uuidof(ID3D12CommandQueue1))
|
||||
return E_NOINTERFACE;
|
||||
|
||||
ID3D12CommandQueue *real = NULL;
|
||||
void *realptr = NULL;
|
||||
HRESULT ret;
|
||||
SERIALISE_TIME_CALL(ret = m_pDevice9->CreateCommandQueue1(pDesc, CreatorID, riid, (void **)&real));
|
||||
SERIALISE_TIME_CALL(ret = m_pDevice9->CreateCommandQueue1(pDesc, CreatorID, riid, &realptr));
|
||||
|
||||
ID3D12CommandQueue *real = NULL;
|
||||
if(riid == __uuidof(ID3D12CommandQueue))
|
||||
real = (ID3D12CommandQueue *)realptr;
|
||||
else if(riid == __uuidof(ID3D12CommandQueue1))
|
||||
real = (ID3D12CommandQueue1 *)realptr;
|
||||
|
||||
if(SUCCEEDED(ret))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user