No need for Serialise_CreateCommandList anymore

* This removes use of D3DLock which is a super-temporary ugly hack to
  avoid a deadlock in some cases
This commit is contained in:
baldurk
2016-09-23 15:59:48 +02:00
parent 6bb6d7da57
commit f0c6786ade
3 changed files with 0 additions and 43 deletions
-1
View File
@@ -258,7 +258,6 @@ void Serialiser::Serialise(const char *name, D3D12Descriptor &el);
\
D3D12_CHUNK_MACRO(CREATE_COMMAND_QUEUE, "ID3D12Device::CreateCommandQueue") \
D3D12_CHUNK_MACRO(CREATE_COMMAND_ALLOCATOR, "ID3D12Device::CreateCommandAllocator") \
D3D12_CHUNK_MACRO(CREATE_COMMAND_LIST, "ID3D12Device::CreateCommandList") \
\
D3D12_CHUNK_MACRO(CREATE_GRAPHICS_PIPE, "ID3D12Device::CreateGraphicsPipeline") \
D3D12_CHUNK_MACRO(CREATE_COMPUTE_PIPE, "ID3D12Device::CreateComputePipeline") \
-3
View File
@@ -1604,9 +1604,6 @@ void WrappedID3D12Device::ProcessChunk(uint64_t offset, D3D12ChunkType context)
case CREATE_COMMAND_ALLOCATOR:
Serialise_CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID(), NULL);
break;
case CREATE_COMMAND_LIST:
Serialise_CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, NULL, NULL, IID(), NULL);
break;
case CREATE_GRAPHICS_PIPE: Serialise_CreateGraphicsPipelineState(NULL, IID(), NULL); break;
case CREATE_COMPUTE_PIPE: Serialise_CreateComputePipelineState(NULL, IID(), NULL); break;
@@ -181,43 +181,6 @@ HRESULT WrappedID3D12Device::CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE type
return ret;
}
bool WrappedID3D12Device::Serialise_CreateCommandList(UINT nodeMask, D3D12_COMMAND_LIST_TYPE type,
ID3D12CommandAllocator *pCommandAllocator,
ID3D12PipelineState *pInitialState,
REFIID riid, void **ppCommandList)
{
SERIALISE_ELEMENT(UINT, Mask, nodeMask);
SERIALISE_ELEMENT(D3D12_COMMAND_LIST_TYPE, ListType, type);
SERIALISE_ELEMENT(ResourceId, Allocator, GetResID(pCommandAllocator));
SERIALISE_ELEMENT(ResourceId, State, GetResID(pInitialState));
SERIALISE_ELEMENT(IID, guid, riid);
SERIALISE_ELEMENT(ResourceId, List,
((WrappedID3D12GraphicsCommandList *)*ppCommandList)->GetResourceID());
if(m_State == READING)
{
pCommandAllocator = GetResourceManager()->GetLiveAs<ID3D12CommandAllocator>(Allocator);
pInitialState = GetResourceManager()->GetLiveAs<ID3D12PipelineState>(State);
ID3D12GraphicsCommandList *ret = NULL;
HRESULT hr = m_pDevice->CreateCommandList(Mask, ListType, Unwrap(pCommandAllocator),
Unwrap(pInitialState), guid, (void **)&ret);
if(FAILED(hr))
{
RDCERR("Failed on resource serialise-creation, HRESULT: 0x%08x", hr);
}
else
{
ret = new WrappedID3D12GraphicsCommandList(ret, this, m_pSerialiser, m_State);
GetResourceManager()->AddLiveResource(List, ret);
}
}
return true;
}
HRESULT WrappedID3D12Device::CreateCommandList(UINT nodeMask, D3D12_COMMAND_LIST_TYPE type,
ID3D12CommandAllocator *pCommandAllocator,
ID3D12PipelineState *pInitialState, REFIID riid,
@@ -236,8 +199,6 @@ HRESULT WrappedID3D12Device::CreateCommandList(UINT nodeMask, D3D12_COMMAND_LIST
if(SUCCEEDED(ret))
{
SCOPED_LOCK(m_D3DLock);
WrappedID3D12GraphicsCommandList *wrapped =
new WrappedID3D12GraphicsCommandList(real, this, m_pSerialiser, m_State);