mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Fix shader tests crashes on WARP driver.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
d0e539aec9
commit
3a480415c1
@@ -419,10 +419,12 @@ static void parse_test_directive(struct shader_context *context, const char *lin
|
||||
hr = create_root_signature(context->c.device, &root_signature_desc, &context->c.root_signature);
|
||||
ok(hr == S_OK, "Failed to create root signature, hr %#x.\n", hr);
|
||||
|
||||
pso = create_pipeline_state(context->c.device, context->c.root_signature,
|
||||
context->c.render_target_desc.Format, NULL, &ps, NULL);
|
||||
pso = create_pipeline_state(context->c.device, context->c.root_signature, context->c.render_target_desc.Format,
|
||||
NULL, &ps, NULL);
|
||||
if (!pso)
|
||||
return;
|
||||
vkd3d_array_reserve((void **)&context->c.pso, &context->c.pso_capacity, context->c.pso_count + 1, sizeof(*context->c.pso));
|
||||
context->c.pso[context->c.pso_count++] = pso;
|
||||
|
||||
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context->c.root_signature);
|
||||
if (context->uniform_count)
|
||||
@@ -439,7 +441,6 @@ static void parse_test_directive(struct shader_context *context, const char *lin
|
||||
ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context->c.rtv, clear_color, 0, NULL);
|
||||
ID3D12GraphicsCommandList_SetPipelineState(command_list, pso);
|
||||
ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0);
|
||||
ID3D12PipelineState_Release(pso);
|
||||
transition_resource_state(command_list, context->c.render_target,
|
||||
D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user