Module: vkd3d Branch: master Commit: 1eaf7fa37bbef1a3ab51cca962c1b1e2d93a2fc9 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/1eaf7fa37bbef1a3ab51cca962c1b1...
Author: Stefan Dösinger stefan@codeweavers.com Date: Sat Dec 2 22:30:07 2023 +0300
tests: Show that compute pipeline state objects are not reused.
---
tests/d3d12.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/d3d12.c b/tests/d3d12.c index 5f145194..1fa24121 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -2991,9 +2991,9 @@ static void test_root_signature_limits(void) static void test_create_compute_pipeline_state(void) { D3D12_COMPUTE_PIPELINE_STATE_DESC pipeline_state_desc; + ID3D12PipelineState *pipeline_state, *pipeline_state2; D3D12_ROOT_SIGNATURE_DESC root_signature_desc; ID3D12RootSignature *root_signature; - ID3D12PipelineState *pipeline_state; ID3D12Device *device, *tmp_device; ID3D10Blob *bytecode; ULONG refcount; @@ -3036,6 +3036,13 @@ static void test_create_compute_pipeline_state(void) &IID_ID3D12PipelineState, (void **)&pipeline_state); ok(hr == S_OK, "Failed to create compute pipeline, hr %#x.\n", hr);
+ hr = ID3D12Device_CreateComputePipelineState(device, &pipeline_state_desc, + &IID_ID3D12PipelineState, (void **)&pipeline_state2); + ok(hr == S_OK, "Failed to create compute pipeline, hr %#x.\n", hr); + ok(pipeline_state != pipeline_state2, "Got the same pipeline state object.\n"); + refcount = ID3D12PipelineState_Release(pipeline_state2); + ok(!refcount, "ID3D12PipelineState has %u references left.\n", (unsigned int)refcount); + refcount = get_refcount(root_signature); ok(refcount == 1, "Got unexpected refcount %u.\n", (unsigned int)refcount);