From: Giovanni Mascellani gmascellani@codeweavers.com
It requires Vulkan transform feedback extension. --- tests/d3d12.c | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-)
diff --git a/tests/d3d12.c b/tests/d3d12.c index fb0d4f7a5..5967523d6 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -30297,7 +30297,9 @@ static void test_domain_shader_inputs(void) struct test_context context; ID3D12Resource *so_buffer; ID3D12CommandQueue *queue; + const float *elems = NULL; unsigned int x, y; + bool fail = false; HRESULT hr;
#if 0 @@ -30457,6 +30459,7 @@ static void test_domain_shader_inputs(void) pso_desc.StreamOutput.RasterizedStream = D3D12_SO_NO_RASTERIZED_STREAM; hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc, &IID_ID3D12PipelineState, (void **)&context.pipeline_state); + bug_if(is_mvk_device(context.device)) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
so_buffer = create_default_buffer(context.device, 1024, @@ -30478,13 +30481,21 @@ static void test_domain_shader_inputs(void) get_buffer_readback_with_command_list(so_buffer, DXGI_FORMAT_UNKNOWN, &rb, queue, command_list); for (y = 0; y < ARRAY_SIZE(reference); ++y) { - const float *elems = get_readback_data(&rb.rb, y, 0, 0, stride); + elems = get_readback_data(&rb.rb, y, 0, 0, stride); for (x = 0; x < ARRAY_SIZE(*reference); ++x) { - ok(compare_float(reference[y][x], elems[x], 0), - "Got unexpected value %.8e for [%u][%u], expected %.8e.\n", elems[x], y, x, reference[y][x]); + if (!compare_float(reference[y][x], elems[x], 0)) + { + fail = true; + break; + } } + + if (fail) + break; } + bug_if(is_mvk_device(context.device)) + ok(!fail, "Got unexpected value %.8e for [%u][%u], expected %.8e.\n", elems[x], y, x, reference[y][x]); release_resource_readback(&rb);
ID3D12Resource_Release(so_buffer); @@ -30502,7 +30513,9 @@ static void test_domain_shader_one_patch_constant_input(void) struct test_context context; ID3D12Resource *so_buffer; ID3D12CommandQueue *queue; + const float *elems = NULL; unsigned int x, y; + bool fail = false; HRESULT hr;
#if 0 @@ -30631,6 +30644,7 @@ static void test_domain_shader_one_patch_constant_input(void) pso_desc.StreamOutput.RasterizedStream = D3D12_SO_NO_RASTERIZED_STREAM; hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc, &IID_ID3D12PipelineState, (void **)&context.pipeline_state); + bug_if(is_mvk_device(context.device)) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
so_buffer = create_default_buffer(context.device, 1024, @@ -30652,13 +30666,21 @@ static void test_domain_shader_one_patch_constant_input(void) get_buffer_readback_with_command_list(so_buffer, DXGI_FORMAT_UNKNOWN, &rb, queue, command_list); for (y = 0; y < ARRAY_SIZE(reference); ++y) { - const float *elems = get_readback_data(&rb.rb, y, 0, 0, stride); + elems = get_readback_data(&rb.rb, y, 0, 0, stride); for (x = 0; x < ARRAY_SIZE(*reference); ++x) { - ok(compare_float(reference[y][x], elems[x], 0), - "Got unexpected value %.8e for [%u][%u], expected %.8e.\n", elems[x], y, x, reference[y][x]); + if (!compare_float(reference[y][x], elems[x], 0)) + { + fail = true; + break; + } } + + if (fail) + break; } + bug_if(is_mvk_device(context.device)) + ok(!fail, "Got unexpected value %.8e for [%u][%u], expected %.8e.\n", elems[x], y, x, reference[y][x]); release_resource_readback(&rb);
ID3D12Resource_Release(so_buffer); @@ -36156,6 +36178,7 @@ static void test_hull_shader_relative_addressing(void) pso_desc.StreamOutput.RasterizedStream = D3D12_SO_NO_RASTERIZED_STREAM; hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc, &IID_ID3D12PipelineState, (void **)&context.pipeline_state); + bug_if(is_mvk_device(context.device)) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
vb = create_upload_buffer(context.device, sizeof(vertices), vertices); @@ -36182,7 +36205,8 @@ static void test_hull_shader_relative_addressing(void) transition_resource_state(command_list, so_buffer, D3D12_RESOURCE_STATE_STREAM_OUT, D3D12_RESOURCE_STATE_COPY_SOURCE); get_buffer_readback_with_command_list(so_buffer, DXGI_FORMAT_UNKNOWN, &rb, queue, command_list); - bug_if(is_radv_device(context.device)) check_triangles(&rb.rb, &expected_triangle, 1); + bug_if(is_radv_device(context.device) || is_mvk_device(context.device)) + check_triangles(&rb.rb, &expected_triangle, 1); release_resource_readback(&rb);
ID3D12Resource_Release(so_buffer); @@ -36389,6 +36413,7 @@ static void test_hull_shader_patch_constant_inputs(void) pso_desc.StreamOutput.RasterizedStream = D3D12_SO_NO_RASTERIZED_STREAM; hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc, &IID_ID3D12PipelineState, (void **)&context.pipeline_state); + bug_if(is_mvk_device(context.device)) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
vb = create_upload_buffer(context.device, sizeof(vertices), vertices); @@ -36414,6 +36439,7 @@ static void test_hull_shader_patch_constant_inputs(void) transition_resource_state(command_list, so_buffer, D3D12_RESOURCE_STATE_STREAM_OUT, D3D12_RESOURCE_STATE_COPY_SOURCE); get_buffer_readback_with_command_list(so_buffer, DXGI_FORMAT_UNKNOWN, &rb, queue, command_list); + bug_if(is_mvk_device(context.device)) check_triangles(&rb.rb, &expected_triangle, 1); release_resource_readback(&rb);