tests: Show that graphics pipeline state objects are not reused.

This commit is contained in:
Stefan Dösinger 2023-12-02 21:35:52 +03:00 committed by Alexandre Julliard
parent 705cf10626
commit 82a3209ee2
Notes: Alexandre Julliard 2023-12-07 22:48:26 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/507

View File

@ -3067,10 +3067,10 @@ static void test_create_compute_pipeline_state(void)
static void test_create_graphics_pipeline_state(void)
{
ID3D12PipelineState *pipeline_state, *pipeline_state2;
D3D12_ROOT_SIGNATURE_DESC root_signature_desc;
D3D12_GRAPHICS_PIPELINE_STATE_DESC pso_desc;
ID3D12RootSignature *root_signature;
ID3D12PipelineState *pipeline_state;
ID3D12Device *device, *tmp_device;
D3D12_BLEND_DESC *blend;
ULONG refcount;
@ -3105,6 +3105,13 @@ static void test_create_graphics_pipeline_state(void)
&IID_ID3D12PipelineState, (void **)&pipeline_state);
ok(hr == S_OK, "Failed to create pipeline, hr %#x.\n", hr);
hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc,
&IID_ID3D12PipelineState, (void **)&pipeline_state2);
ok(hr == S_OK, "Failed to create 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);