Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions renderdoc/driver/d3d12/d3d12_device_wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down Expand Up @@ -154,12 +160,17 @@ HRESULT WrappedID3D12Device::CreateCommandQueue(const D3D12_COMMAND_QUEUE_DESC *
if(ppCommandQueue == NULL)
return m_pDevice->CreateCommandQueue(pDesc, riid, NULL);

if(riid != __uuidof(ID3D12CommandQueue))
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))
{
Expand Down
20 changes: 16 additions & 4 deletions renderdoc/driver/d3d12/d3d12_device_wrap9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,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
{
Expand Down Expand Up @@ -136,12 +142,18 @@ HRESULT WrappedID3D12Device::CreateCommandQueue1(const D3D12_COMMAND_QUEUE_DESC
if(ppCommandQueue == NULL)
return m_pDevice9->CreateCommandQueue1(pDesc, CreatorID, riid, NULL);

if(riid != __uuidof(ID3D12CommandQueue))
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))
{
Expand Down
Loading