In DescriptorData() set nonsamp.type to D3D12DescriptorType::Undefined

If it defaults to zero then it would be treated as D3D12DescriptorType::Sampler
which lead to a crash calling "Create" on an uninitialized descriptor
This commit is contained in:
Jake Turner
2024-07-02 12:05:07 +01:00
parent 9a075cf21e
commit 452f75b966
+1
View File
@@ -326,6 +326,7 @@ union DescriptorData
{
nonsamp.resource = ResourceId();
nonsamp.counterResource = ResourceId();
nonsamp.type = D3D12DescriptorType::Undefined;
}
SamplerDescriptorData samp;
NonSamplerDescriptorData nonsamp;