vkd3d: Handle CreatePipelineLibrary with NULL ppData.

Supposed to return S_FALSE.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
Hans-Kristian Arntzen 2021-10-07 17:40:06 +02:00
parent c58edfabe1
commit 0f2e448659
1 changed files with 11 additions and 3 deletions

View File

@ -4099,7 +4099,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePipelineLibrary(d3d12_device
const void *blob, SIZE_T blob_size, REFIID iid, void **lib)
{
struct d3d12_device *device = impl_from_ID3D12Device(iface);
struct d3d12_pipeline_library* pipeline_library;
struct d3d12_pipeline_library *pipeline_library;
HRESULT hr;
TRACE("iface %p, blob %p, blob_size %lu, iid %s, lib %p.\n",
@ -4108,8 +4108,16 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePipelineLibrary(d3d12_device
if (FAILED(hr = d3d12_pipeline_library_create(device, blob, blob_size, &pipeline_library)))
return hr;
return return_interface(&pipeline_library->ID3D12PipelineLibrary_iface,
&IID_ID3D12PipelineLibrary, iid, lib);
if (lib)
{
return return_interface(&pipeline_library->ID3D12PipelineLibrary_iface,
&IID_ID3D12PipelineLibrary, iid, lib);
}
else
{
ID3D12PipelineLibrary_Release(&pipeline_library->ID3D12PipelineLibrary_iface);
return S_FALSE;
}
}
static HRESULT STDMETHODCALLTYPE d3d12_device_SetEventOnMultipleFenceCompletion(d3d12_device_iface *iface,