tests/d3d12: Check whether the d3d12 device supports geometry shaders.

This commit is contained in:
Henri Verbeet
2025-08-04 17:23:35 +02:00
parent 4bb880f9ed
commit 47a183c75b
Notes: Henri Verbeet 2025-08-06 13:02:39 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1668
2 changed files with 30 additions and 5 deletions

View File

@@ -28287,6 +28287,14 @@ static void test_geometry_shader(void)
desc.no_pipeline = true;
if (!init_test_context(&context, &desc))
return;
if (!is_geometry_shader_supported(context.device))
{
skip("The device does not support geometry shaders.\n");
destroy_test_context(&context);
return;
}
device = context.device;
command_list = context.list;
queue = context.queue;
@@ -28342,7 +28350,6 @@ static void test_geometry_shader(void)
color = get_readback_uint(&rb.rb, 255, 240, 0);
ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color);
color = get_readback_uint(&rb.rb, 320, 240, 0);
bug_if(is_mvk_device(device))
ok(compare_color(color, 0xffffff00, 1), "Got unexpected color 0x%08x.\n", color);
color = get_readback_uint(&rb.rb, 385, 240, 0);
ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color);
@@ -28357,7 +28364,6 @@ static void test_geometry_shader(void)
color = get_readback_uint(&rb.rb, 255, 240, 0);
ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color);
color = get_readback_uint(&rb.rb, 320, 240, 0);
bug_if(is_mvk_device(device))
ok(compare_color(color, 0xffffff00, 1), "Got unexpected color 0x%08x.\n", color);
color = get_readback_uint(&rb.rb, 385, 240, 0);
ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color);
@@ -28530,6 +28536,14 @@ static void test_layered_rendering(void)
desc.no_pipeline = true;
if (!init_test_context(&context, &desc))
return;
if (!is_geometry_shader_supported(context.device))
{
skip("The device does not support geometry shaders.\n");
destroy_test_context(&context);
return;
}
device = context.device;
command_list = context.list;
queue = context.queue;
@@ -28563,15 +28577,12 @@ static void test_layered_rendering(void)
transition_resource_state(command_list, context.render_target,
D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE);
bug_if(is_mvk_device(device))
check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xff00ff00, 0);
reset_command_list(command_list, context.allocator);
check_sub_resource_uint(context.render_target, 1, queue, command_list, 0xffffffff, 0);
reset_command_list(command_list, context.allocator);
bug_if(is_mvk_device(device))
check_sub_resource_uint(context.render_target, 2, queue, command_list, 0x00000000, 0);
reset_command_list(command_list, context.allocator);
bug_if(is_mvk_device(device))
check_sub_resource_uint(context.render_target, 3, queue, command_list, 0xffffff00, 0);
ID3D12Resource_Release(vb);