Minor code review
This commit is contained in:
parent
fcc5b33bf3
commit
6828e6387f
@ -2548,7 +2548,7 @@ inline HRESULT D3DX12ParsePipelineStream(const D3D12_PIPELINE_STATE_STREAM_DESC&
|
||||
{
|
||||
BYTE* pStream = static_cast<BYTE*>(Desc.pPipelineStateSubobjectStream)+CurOffset;
|
||||
auto SubobjectType = *reinterpret_cast<D3D12_PIPELINE_STATE_SUBOBJECT_TYPE*>(pStream);
|
||||
if (SubobjectType >= D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MAX_VALID)
|
||||
if (SubobjectType < 0 || SubobjectType >= D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MAX_VALID)
|
||||
{
|
||||
pCallbacks->ErrorUnknownSubobject(SubobjectType);
|
||||
return E_INVALIDARG;
|
||||
|
Loading…
Reference in New Issue
Block a user