mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 06:05:45 +00:00
Handle AS/MS subobjects explicitly, ignore empty ones. Closes #2193
* If we get passed an empty/degenerate AS or MS we can ignore it, the application is responsible for ensuring that it doesn't pass any *actual* shaders here.
This commit is contained in:
@@ -1167,6 +1167,26 @@ D3D12_EXPANDED_PIPELINE_STATE_STREAM_DESC::D3D12_EXPANDED_PIPELINE_STATE_STREAM_
|
||||
ITER_ADV(D3D12_VIEW_INSTANCING_DESC);
|
||||
break;
|
||||
}
|
||||
case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_AS:
|
||||
{
|
||||
if(ptr->data.shader.BytecodeLength > 0)
|
||||
{
|
||||
RDCERR("AS passed to D3D12_PIPELINE_STATE_STREAM_DESC but mesh shaders not supported");
|
||||
errored = true;
|
||||
}
|
||||
ITER_ADV(D3D12_SHADER_BYTECODE);
|
||||
break;
|
||||
}
|
||||
case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MS:
|
||||
{
|
||||
if(ptr->data.shader.BytecodeLength > 0)
|
||||
{
|
||||
RDCERR("MS passed to D3D12_PIPELINE_STATE_STREAM_DESC but mesh shaders not supported");
|
||||
errored = true;
|
||||
}
|
||||
ITER_ADV(D3D12_SHADER_BYTECODE);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
RDCERR("Unknown subobject type %d", obj->type);
|
||||
|
||||
@@ -459,6 +459,8 @@ struct D3D12_EXPANDED_PIPELINE_STATE_STREAM_DESC
|
||||
// construct from the stream descriptor
|
||||
D3D12_EXPANDED_PIPELINE_STATE_STREAM_DESC(const D3D12_PIPELINE_STATE_STREAM_DESC &stream);
|
||||
|
||||
bool errored = false;
|
||||
|
||||
// graphics properties
|
||||
ID3D12RootSignature *pRootSignature = NULL;
|
||||
D3D12_SHADER_BYTECODE VS = {};
|
||||
|
||||
@@ -194,6 +194,9 @@ HRESULT WrappedID3D12Device::CreatePipelineState(const D3D12_PIPELINE_STATE_STRE
|
||||
D3D12_PACKED_PIPELINE_STATE_STREAM_DESC unwrappedDesc = expandedDesc;
|
||||
unwrappedDesc.Unwrap();
|
||||
|
||||
if(expandedDesc.errored)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if(ppPipelineState == NULL)
|
||||
return m_pDevice3->CreatePipelineState(unwrappedDesc.AsDescStream(), riid, ppPipelineState);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user