tests: Fix up some TODO is dual_source_blending test.

Some calls are apparently supposed to fail, and we were not cleaning up
handles correctly if the calls succeeded.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
Hans-Kristian Arntzen 2020-10-29 11:14:58 +01:00
parent 4ed553acc4
commit 10d13dd2c1
1 changed files with 13 additions and 4 deletions

View File

@ -34188,19 +34188,25 @@ static void test_dual_source_blending(bool use_dxil)
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
&IID_ID3D12PipelineState, (void **)&context.pipeline_state);
ok(hr == S_OK, "Failed to create pipeline, hr %#x.\n", hr);
ID3D12PipelineState_Release(context.pipeline_state);
if (SUCCEEDED(hr))
ID3D12PipelineState_Release(context.pipeline_state);
context.pipeline_state = NULL;
pso_desc.BlendState.RenderTarget[1] = pso_desc.BlendState.RenderTarget[0];
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
&IID_ID3D12PipelineState, (void **)&context.pipeline_state);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
todo ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr))
ID3D12PipelineState_Release(context.pipeline_state);
context.pipeline_state = NULL;
pso_desc.BlendState.RenderTarget[1].DestBlendAlpha = D3D12_BLEND_SRC_ALPHA;
pso_desc.BlendState.RenderTarget[1].DestBlend = D3D12_BLEND_SRC_COLOR;
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
&IID_ID3D12PipelineState, (void **)&context.pipeline_state);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
todo ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr))
ID3D12PipelineState_Release(context.pipeline_state);
context.pipeline_state = NULL;
pso_desc.NumRenderTargets = 2;
@ -34215,7 +34221,10 @@ static void test_dual_source_blending(bool use_dxil)
pso_desc.BlendState.RenderTarget[0].BlendOpAlpha = D3D12_BLEND_OP_ADD;
hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
&IID_ID3D12PipelineState, (void **)&context.pipeline_state);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
todo ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr))
ID3D12PipelineState_Release(context.pipeline_state);
context.pipeline_state = NULL;
destroy_test_context(&context);
}