Allow specifying a NULL bytecode with a non-0 bytecode length

* Apparently D3D12 warns about this but still creates the PSO
This commit is contained in:
baldurk
2018-05-23 19:29:10 +01:00
parent ebe7ffca80
commit 6cfdd09774
+2 -1
View File
@@ -371,9 +371,10 @@ bool WrappedID3D12Device::Serialise_CreateGraphicsPipelineState(
for(size_t i = 0; i < ARRAY_COUNT(shaders); i++)
{
if(shaders[i]->BytecodeLength == 0)
if(shaders[i]->BytecodeLength == 0 || shaders[i]->pShaderBytecode == NULL)
{
shaders[i]->pShaderBytecode = NULL;
shaders[i]->BytecodeLength = 0;
}
else
{