mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Show that graphics pipeline state objects are not reused.
This commit is contained in:
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
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user