From: Giovanni Mascellani gmascellani@codeweavers.com
--- tests/d3d12.c | 14 ++------------ tests/d3d12_test_utils.h | 3 ++- 2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/tests/d3d12.c b/tests/d3d12.c index a70b356e9..b5447f962 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -28092,16 +28092,13 @@ static void test_layered_rendering(void)
static void test_ps_layer(void) { - D3D12_GRAPHICS_PIPELINE_STATE_DESC pso_desc; ID3D12GraphicsCommandList *command_list; ID3D10Blob *vs_bytecode, *ps_bytecode; struct test_context_desc desc; D3D12_SHADER_BYTECODE vs, ps; struct test_context context; ID3D12CommandQueue *queue; - ID3D12Device *device; unsigned int i; - HRESULT hr;
static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f}; static const char vs_code[] = @@ -28144,7 +28141,8 @@ static void test_ps_layer(void)
memset(&desc, 0, sizeof(desc)); desc.rt_array_size = 6; - desc.no_pipeline = true; + desc.vs = &vs; + desc.ps = &ps; if (!init_test_context(&context, &desc)) { ID3D10Blob_Release(vs_bytecode); @@ -28159,17 +28157,9 @@ static void test_ps_layer(void) return; }
- device = context.device; command_list = context.list; queue = context.queue;
- init_pipeline_state_desc(&pso_desc, context.root_signature, - context.render_target_desc.Format, &vs, &ps, NULL); - pso_desc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE; - hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc, - &IID_ID3D12PipelineState, (void **)&context.pipeline_state); - ok(hr == S_OK, "Failed to create graphics pipeline state, hr %#x.\n", hr); - ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL); diff --git a/tests/d3d12_test_utils.h b/tests/d3d12_test_utils.h index 7473bbc43..e50ac45c5 100644 --- a/tests/d3d12_test_utils.h +++ b/tests/d3d12_test_utils.h @@ -994,6 +994,7 @@ struct test_context_desc bool no_render_target; bool no_root_signature; bool no_pipeline; + const D3D12_SHADER_BYTECODE *vs; const D3D12_SHADER_BYTECODE *ps; };
@@ -1153,7 +1154,7 @@ static inline bool init_test_context_(unsigned int line, struct test_context *co
context->pipeline_state = create_pipeline_state_(line, device, context->root_signature, context->render_target_desc.Format, - NULL, desc ? desc->ps : NULL, NULL); + desc ? desc->vs : NULL, desc ? desc->ps : NULL, NULL);
return true; }