diff --git a/tests/d3d12.c b/tests/d3d12.c index a5c6c2aef..551ac86f1 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -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); diff --git a/tests/d3d12_crosstest.h b/tests/d3d12_crosstest.h index dfd0939b8..222f5a693 100644 --- a/tests/d3d12_crosstest.h +++ b/tests/d3d12_crosstest.h @@ -558,6 +558,11 @@ static inline bool is_depth_clip_enable_supported(ID3D12Device *device) return true; } +static inline bool is_geometry_shader_supported(ID3D12Device *device) +{ + return true; +} + #else #define VKD3D_AGILITY_SDK_EXPORTS @@ -940,6 +945,15 @@ static inline bool is_depth_clip_enable_supported(ID3D12Device *device) VkPhysicalDevice vk_physical_device = vkd3d_get_vk_physical_device(device); return check_device_extension(vk_physical_device, VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME); } + +static inline bool is_geometry_shader_supported(ID3D12Device *device) +{ + VkPhysicalDeviceFeatures features; + + vkGetPhysicalDeviceFeatures(vkd3d_get_vk_physical_device(device), &features); + + return features.geometryShader; +} #endif static void enable_d3d12_debug_layer(void)