Support NULL pRootSignature when creating pipelines. Closes #997

* Seemingly if NULL, the embedded blob is used in the shaders (which must be
  present in at least one shader, and must match exactly if present in multiple
  shaders).
This commit is contained in:
baldurk
2018-06-04 19:23:26 +01:00
parent a38498b32f
commit 1f18b2ef4e
+8 -4
View File
@@ -367,7 +367,8 @@ bool WrappedID3D12Device::Serialise_CreateGraphicsPipelineState(
};
AddResource(pPipelineState, ResourceType::PipelineState, "Graphics Pipeline State");
DerivedResource(Descriptor.pRootSignature, pPipelineState);
if(Descriptor.pRootSignature)
DerivedResource(Descriptor.pRootSignature, pPipelineState);
for(size_t i = 0; i < ARRAY_COUNT(shaders); i++)
{
@@ -467,7 +468,8 @@ HRESULT WrappedID3D12Device::CreateGraphicsPipelineState(const D3D12_GRAPHICS_PI
record->Length = 0;
wrapped->SetResourceRecord(record);
record->AddParent(GetRecord(pDesc->pRootSignature));
if(pDesc->pRootSignature)
record->AddParent(GetRecord(pDesc->pRootSignature));
record->AddChunk(scope.Get());
}
@@ -575,7 +577,8 @@ bool WrappedID3D12Device::Serialise_CreateComputePipelineState(
AddResourceCurChunk(entry->GetResourceID());
AddResource(pPipelineState, ResourceType::PipelineState, "Compute Pipeline State");
DerivedResource(Descriptor.pRootSignature, pPipelineState);
if(Descriptor.pRootSignature)
DerivedResource(Descriptor.pRootSignature, pPipelineState);
DerivedResource(entry->GetResourceID(), pPipelineState);
wrapped->compute->CS.pShaderBytecode = entry;
@@ -620,7 +623,8 @@ HRESULT WrappedID3D12Device::CreateComputePipelineState(const D3D12_COMPUTE_PIPE
record->Length = 0;
wrapped->SetResourceRecord(record);
record->AddParent(GetRecord(pDesc->pRootSignature));
if(pDesc->pRootSignature)
record->AddParent(GetRecord(pDesc->pRootSignature));
record->AddChunk(scope.Get());
}