-- v2: vkd3d: Support DXGI_FORMAT_B4G4R4A4_UNORM.
From: Conor McCarthy cmccarthy@codeweavers.com
--- tests/d3d12.c | 40 ++++++++++++++++++++++++++++++++++++++-- tests/d3d12_test_utils.h | 4 ++++ 2 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/tests/d3d12.c b/tests/d3d12.c index aaea5e316..dc25c9838 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -534,6 +534,20 @@ static bool is_vs_array_index_supported(ID3D12Device *device) return options.VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation; }
+static bool is_typed_uav_format_supported(ID3D12Device *device, DXGI_FORMAT format) +{ + D3D12_FEATURE_DATA_FORMAT_SUPPORT format_support = {0}; + HRESULT hr; + + format_support.Format = format; + hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_FORMAT_SUPPORT, + &format_support, sizeof(format_support)); + todo + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + + return format_support.Support1 & D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW; +} + #define create_cb_root_signature(a, b, c, e) create_cb_root_signature_(__LINE__, a, b, c, e) static ID3D12RootSignature *create_cb_root_signature_(unsigned int line, ID3D12Device *device, unsigned int reg_idx, D3D12_SHADER_VISIBILITY shader_visibility, @@ -5638,13 +5652,13 @@ static void test_clear_unordered_access_view_buffer(void)
static void test_clear_unordered_access_view_image(void) { + unsigned int image_size, image_depth, texel_size; unsigned int expected_colour, actual_colour; D3D12_UNORDERED_ACCESS_VIEW_DESC uav_desc; ID3D12DescriptorHeap *cpu_heap, *gpu_heap; ID3D12GraphicsCommandList *command_list; unsigned int i, j, d, p, x, y, z, layer; D3D12_HEAP_PROPERTIES heap_properties; - unsigned int image_size, image_depth; struct d3d12_resource_readback rb; D3D12_RESOURCE_DESC resource_desc; struct test_context_desc desc; @@ -5672,6 +5686,7 @@ static void test_clear_unordered_access_view_image(void) unsigned int expected; bool is_float; bool is_todo; + bool check_support; } tests[] = { @@ -5708,6 +5723,9 @@ static void test_clear_unordered_access_view_image(void) {DXGI_FORMAT_R8G8B8A8_UINT, 1, 1, 0, 0, 1, 0, {}, {0x123, 0, 0, 0}, 0x00000023, false, true}, {DXGI_FORMAT_R8G8B8A8_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x04030201}, {DXGI_FORMAT_R11G11B10_FLOAT, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x00c01001}, + {DXGI_FORMAT_B5G6R5_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x00000843, false, true}, + {DXGI_FORMAT_B5G5R5A1_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00008443, false, true}, + {DXGI_FORMAT_B4G4R4A4_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00001123, false, true, true}, /* Test float clears with formats. */ {DXGI_FORMAT_R16G16_UNORM, 1, 1, 0, 0, 1, 0, {}, {0x3e800000 /* 0.25f */, 0x3f800000 /* 1.0f */, 0, 0}, 0xffff4000, true}, @@ -5720,6 +5738,15 @@ static void test_clear_unordered_access_view_image(void) {DXGI_FORMAT_R11G11B10_FLOAT, 1, 1, 0, 0, 1, 0, {}, {0x3f000000 /* 1.0f */, 0 /* 0.0f */, 0xbf800000 /* -1.0f */, 0x3f000000 /* 1.0f */}, 0x00000380, true}, + {DXGI_FORMAT_B5G6R5_UNORM, 1, 1, 0, 0, 1, 0, {}, + {0x3f000000 /* 0.5f */, 0x3f800000 /* 1.0f */, 0x40000000 /* -1.0f */, 0}, + 0x87ff, true, true}, + {DXGI_FORMAT_B5G5R5A1_UNORM, 1, 1, 0, 0, 1, 0, {}, + {0x3f000000 /* 0.5f */, 0x3e800000 /* 0.25f */, 0x3e000000 /* 0.125f */, 0x3f800000 /* 1.0f */}, + 0xc104, true, true}, + {DXGI_FORMAT_B4G4R4A4_UNORM, 1, 1, 0, 0, 1, 0, {}, + {0x3f000000 /* 0.5f */, 0x3f800000 /* 1.0f */, 0x40000000 /* 2.0f */, 0x40000000 /* -1.0f */}, + 0xf8ff, true, true, true}, };
static const struct @@ -5758,6 +5785,12 @@ static void test_clear_unordered_access_view_image(void) if (tests[i].image_layers > 1 && !uav_dimensions[d].is_layered) continue;
+ if (tests[i].check_support && !is_typed_uav_format_supported(device, tests[i].format)) + { + skip("Device does not support format %#x; skipping.\n", tests[i].format); + continue; + } + vkd3d_test_push_context("Dim %u, Test %u", d, i);
is_1d = uav_dimensions[d].resource_dim == D3D12_RESOURCE_DIMENSION_TEXTURE1D; @@ -5786,6 +5819,8 @@ static void test_clear_unordered_access_view_image(void) uav_desc.Format = tests[i].format; uav_desc.ViewDimension = uav_dimensions[d].view_dim;
+ texel_size = format_size(uav_desc.Format); + for (j = 0; j < 2; ++j) { unsigned int first_layer = j ? 0 : tests[i].first_layer; @@ -5893,7 +5928,8 @@ static void test_clear_unordered_access_view_image(void) && layer < tests[i].first_layer + tests[i].layer_count;
expected_colour = is_inside ? tests[i].expected : clear_value[0]; - actual_colour = get_readback_uint(&rb.rb, x, y, z); + actual_colour = (texel_size == 2) ? get_readback_uint16(&rb.rb, x, y) + : get_readback_uint(&rb.rb, x, y, z); success = compare_color(actual_colour, expected_colour, tests[i].is_float ? 1 : 0);
todo_if(tests[i].is_todo && expected_colour) diff --git a/tests/d3d12_test_utils.h b/tests/d3d12_test_utils.h index 4fe6fa716..4f2c18edd 100644 --- a/tests/d3d12_test_utils.h +++ b/tests/d3d12_test_utils.h @@ -357,6 +357,10 @@ static unsigned int format_size(DXGI_FORMAT format) case DXGI_FORMAT_BC4_UNORM: case DXGI_FORMAT_BC4_SNORM: return 8; + case DXGI_FORMAT_B5G6R5_UNORM: + case DXGI_FORMAT_B5G5R5A1_UNORM: + case DXGI_FORMAT_B4G4R4A4_UNORM: + return 2;
default: trace("Unhandled format %#x.\n", format);
From: Conor McCarthy cmccarthy@codeweavers.com
--- libs/vkd3d/command.c | 6 ++++++ libs/vkd3d/utils.c | 1 + tests/d3d12.c | 5 ++--- 3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 7115a74a6..2b3f2869c 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -5414,6 +5414,12 @@ static const struct vkd3d_format *vkd3d_fixup_clear_uav_uint_colour(struct d3d12 | ((colour->uint32[2] & 0x3ff) << 22); return vkd3d_get_format(device, DXGI_FORMAT_R32_UINT, false);
+ case DXGI_FORMAT_B5G6R5_UNORM: + colour->uint32[0] = (colour->uint32[2] & 0x1f) + | ((colour->uint32[1] & 0x3f) << 5) + | ((colour->uint32[0] & 0x1f) << 11); + return vkd3d_get_format(device, DXGI_FORMAT_R16_UINT, false); + default: return NULL; } diff --git a/libs/vkd3d/utils.c b/libs/vkd3d/utils.c index ac79ae5dd..c62dc55a7 100644 --- a/libs/vkd3d/utils.c +++ b/libs/vkd3d/utils.c @@ -87,6 +87,7 @@ static const struct vkd3d_format vkd3d_formats[] = {DXGI_FORMAT_R8_SNORM, VK_FORMAT_R8_SNORM, 1, 1, 1, 1, COLOR, 1}, {DXGI_FORMAT_R8_SINT, VK_FORMAT_R8_SINT, 1, 1, 1, 1, COLOR, 1, SINT}, {DXGI_FORMAT_A8_UNORM, VK_FORMAT_R8_UNORM, 1, 1, 1, 1, COLOR, 1}, + {DXGI_FORMAT_B5G6R5_UNORM, VK_FORMAT_R5G6B5_UNORM_PACK16, 2, 1, 1, 1, COLOR, 1}, {DXGI_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR, 1}, {DXGI_FORMAT_B8G8R8X8_UNORM, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR, 1}, {DXGI_FORMAT_B8G8R8A8_TYPELESS, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR, 1, TYPELESS}, diff --git a/tests/d3d12.c b/tests/d3d12.c index dc25c9838..d01d19e94 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -954,7 +954,6 @@ static void test_check_feature_support(void) is_todo = format == DXGI_FORMAT_R9G9B9E5_SHAREDEXP || format == DXGI_FORMAT_R8G8_B8G8_UNORM || format == DXGI_FORMAT_G8R8_G8B8_UNORM - || format == DXGI_FORMAT_B5G6R5_UNORM || format == DXGI_FORMAT_B5G5R5A1_UNORM || format == DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM || (DXGI_FORMAT_AYUV <= format && format <= DXGI_FORMAT_B4G4R4A4_UNORM); @@ -5723,7 +5722,7 @@ static void test_clear_unordered_access_view_image(void) {DXGI_FORMAT_R8G8B8A8_UINT, 1, 1, 0, 0, 1, 0, {}, {0x123, 0, 0, 0}, 0x00000023, false, true}, {DXGI_FORMAT_R8G8B8A8_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x04030201}, {DXGI_FORMAT_R11G11B10_FLOAT, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x00c01001}, - {DXGI_FORMAT_B5G6R5_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x00000843, false, true}, + {DXGI_FORMAT_B5G6R5_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x00000843}, {DXGI_FORMAT_B5G5R5A1_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00008443, false, true}, {DXGI_FORMAT_B4G4R4A4_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00001123, false, true, true}, /* Test float clears with formats. */ @@ -5740,7 +5739,7 @@ static void test_clear_unordered_access_view_image(void) 0x00000380, true}, {DXGI_FORMAT_B5G6R5_UNORM, 1, 1, 0, 0, 1, 0, {}, {0x3f000000 /* 0.5f */, 0x3f800000 /* 1.0f */, 0x40000000 /* -1.0f */, 0}, - 0x87ff, true, true}, + 0x87ff, true}, {DXGI_FORMAT_B5G5R5A1_UNORM, 1, 1, 0, 0, 1, 0, {}, {0x3f000000 /* 0.5f */, 0x3e800000 /* 0.25f */, 0x3e000000 /* 0.125f */, 0x3f800000 /* 1.0f */}, 0xc104, true, true},
From: Conor McCarthy cmccarthy@codeweavers.com
--- libs/vkd3d/command.c | 7 +++++++ libs/vkd3d/utils.c | 1 + tests/d3d12.c | 5 ++--- 3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 2b3f2869c..6df00a225 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -5420,6 +5420,13 @@ static const struct vkd3d_format *vkd3d_fixup_clear_uav_uint_colour(struct d3d12 | ((colour->uint32[0] & 0x1f) << 11); return vkd3d_get_format(device, DXGI_FORMAT_R16_UINT, false);
+ case DXGI_FORMAT_B5G5R5A1_UNORM: + colour->uint32[0] = (colour->uint32[2] & 0x1f) + | ((colour->uint32[1] & 0x1f) << 5) + | ((colour->uint32[0] & 0x1f) << 10) + | ((colour->uint32[3] & 0x1) << 15); + return vkd3d_get_format(device, DXGI_FORMAT_R16_UINT, false); + default: return NULL; } diff --git a/libs/vkd3d/utils.c b/libs/vkd3d/utils.c index c62dc55a7..6796c08cd 100644 --- a/libs/vkd3d/utils.c +++ b/libs/vkd3d/utils.c @@ -88,6 +88,7 @@ static const struct vkd3d_format vkd3d_formats[] = {DXGI_FORMAT_R8_SINT, VK_FORMAT_R8_SINT, 1, 1, 1, 1, COLOR, 1, SINT}, {DXGI_FORMAT_A8_UNORM, VK_FORMAT_R8_UNORM, 1, 1, 1, 1, COLOR, 1}, {DXGI_FORMAT_B5G6R5_UNORM, VK_FORMAT_R5G6B5_UNORM_PACK16, 2, 1, 1, 1, COLOR, 1}, + {DXGI_FORMAT_B5G5R5A1_UNORM, VK_FORMAT_A1R5G5B5_UNORM_PACK16, 2, 1, 1, 1, COLOR, 1}, {DXGI_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR, 1}, {DXGI_FORMAT_B8G8R8X8_UNORM, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR, 1}, {DXGI_FORMAT_B8G8R8A8_TYPELESS, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR, 1, TYPELESS}, diff --git a/tests/d3d12.c b/tests/d3d12.c index d01d19e94..918621471 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -954,7 +954,6 @@ static void test_check_feature_support(void) is_todo = format == DXGI_FORMAT_R9G9B9E5_SHAREDEXP || format == DXGI_FORMAT_R8G8_B8G8_UNORM || format == DXGI_FORMAT_G8R8_G8B8_UNORM - || format == DXGI_FORMAT_B5G5R5A1_UNORM || format == DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM || (DXGI_FORMAT_AYUV <= format && format <= DXGI_FORMAT_B4G4R4A4_UNORM);
@@ -5723,7 +5722,7 @@ static void test_clear_unordered_access_view_image(void) {DXGI_FORMAT_R8G8B8A8_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x04030201}, {DXGI_FORMAT_R11G11B10_FLOAT, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x00c01001}, {DXGI_FORMAT_B5G6R5_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x00000843}, - {DXGI_FORMAT_B5G5R5A1_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00008443, false, true}, + {DXGI_FORMAT_B5G5R5A1_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00008443}, {DXGI_FORMAT_B4G4R4A4_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00001123, false, true, true}, /* Test float clears with formats. */ {DXGI_FORMAT_R16G16_UNORM, 1, 1, 0, 0, 1, 0, {}, @@ -5742,7 +5741,7 @@ static void test_clear_unordered_access_view_image(void) 0x87ff, true}, {DXGI_FORMAT_B5G5R5A1_UNORM, 1, 1, 0, 0, 1, 0, {}, {0x3f000000 /* 0.5f */, 0x3e800000 /* 0.25f */, 0x3e000000 /* 0.125f */, 0x3f800000 /* 1.0f */}, - 0xc104, true, true}, + 0xc104, true}, {DXGI_FORMAT_B4G4R4A4_UNORM, 1, 1, 0, 0, 1, 0, {}, {0x3f000000 /* 0.5f */, 0x3f800000 /* 1.0f */, 0x40000000 /* 2.0f */, 0x40000000 /* -1.0f */}, 0xf8ff, true, true, true},
From: Conor McCarthy cmccarthy@codeweavers.com
--- libs/vkd3d/command.c | 7 +++++++ libs/vkd3d/device.c | 8 ++++++++ libs/vkd3d/utils.c | 8 ++++++++ libs/vkd3d/vkd3d_private.h | 1 + tests/d3d12.c | 7 +++---- 5 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 6df00a225..4a69ff530 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -5427,6 +5427,13 @@ static const struct vkd3d_format *vkd3d_fixup_clear_uav_uint_colour(struct d3d12 | ((colour->uint32[3] & 0x1) << 15); return vkd3d_get_format(device, DXGI_FORMAT_R16_UINT, false);
+ case DXGI_FORMAT_B4G4R4A4_UNORM: + colour->uint32[0] = (colour->uint32[2] & 0xf) + | ((colour->uint32[1] & 0xf) << 4) + | ((colour->uint32[0] & 0xf) << 8) + | ((colour->uint32[3] & 0xf) << 12); + return vkd3d_get_format(device, DXGI_FORMAT_R16_UINT, false); + default: return NULL; } diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 90de27c53..8c0f5e902 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -89,6 +89,7 @@ static const struct vkd3d_optional_extension_info optional_device_extensions[] = VK_EXTENSION(KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE, KHR_sampler_mirror_clamp_to_edge), VK_EXTENSION(KHR_TIMELINE_SEMAPHORE, KHR_timeline_semaphore), /* EXT extensions */ + VK_EXTENSION(EXT_4444_FORMATS, EXT_4444_formats), VK_EXTENSION(EXT_CALIBRATED_TIMESTAMPS, EXT_calibrated_timestamps), VK_EXTENSION(EXT_CONDITIONAL_RENDERING, EXT_conditional_rendering), VK_EXTENSION(EXT_DEBUG_MARKER, EXT_debug_marker), @@ -798,6 +799,7 @@ struct vkd3d_physical_device_info VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT vertex_divisor_features; VkPhysicalDeviceTimelineSemaphoreFeaturesKHR timeline_semaphore_features; VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT mutable_features; + VkPhysicalDevice4444FormatsFeaturesEXT formats4444_features;
VkPhysicalDeviceFeatures2 features2; }; @@ -821,6 +823,7 @@ static void vkd3d_physical_device_info_init(struct vkd3d_physical_device_info *i VkPhysicalDeviceMaintenance3Properties *maintenance3_properties; VkPhysicalDeviceTransformFeedbackPropertiesEXT *xfb_properties; VkPhysicalDevice physical_device = device->vk_physical_device; + VkPhysicalDevice4444FormatsFeaturesEXT *formats4444_features; VkPhysicalDeviceTransformFeedbackFeaturesEXT *xfb_features; struct vkd3d_vulkan_info *vulkan_info = &device->vk_info;
@@ -839,6 +842,7 @@ static void vkd3d_physical_device_info_init(struct vkd3d_physical_device_info *i vertex_divisor_properties = &info->vertex_divisor_properties; timeline_semaphore_features = &info->timeline_semaphore_features; mutable_features = &info->mutable_features; + formats4444_features = &info->formats4444_features; xfb_features = &info->xfb_features; xfb_properties = &info->xfb_properties;
@@ -866,6 +870,8 @@ static void vkd3d_physical_device_info_init(struct vkd3d_physical_device_info *i vk_prepend_struct(&info->features2, timeline_semaphore_features); mutable_features->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT; vk_prepend_struct(&info->features2, mutable_features); + formats4444_features->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT; + vk_prepend_struct(&info->features2, formats4444_features);
if (vulkan_info->KHR_get_physical_device_properties2) VK_CALL(vkGetPhysicalDeviceFeatures2KHR(physical_device, &info->features2)); @@ -1655,6 +1661,8 @@ static HRESULT vkd3d_init_device_caps(struct d3d12_device *device, if (!physical_device_info->timeline_semaphore_features.timelineSemaphore) vulkan_info->KHR_timeline_semaphore = false;
+ physical_device_info->formats4444_features.formatA4B4G4R4 = VK_FALSE; + vulkan_info->texel_buffer_alignment_properties = physical_device_info->texel_buffer_alignment_properties;
if (get_spec_version(vk_extensions, count, VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME) >= 3) diff --git a/libs/vkd3d/utils.c b/libs/vkd3d/utils.c index 6796c08cd..58747342b 100644 --- a/libs/vkd3d/utils.c +++ b/libs/vkd3d/utils.c @@ -118,6 +118,9 @@ static const struct vkd3d_format vkd3d_formats[] = {DXGI_FORMAT_BC7_UNORM_SRGB, VK_FORMAT_BC7_SRGB_BLOCK, 1, 4, 4, 16, COLOR, 1}, };
+static const struct vkd3d_format format_b4g4r4a4 = + {DXGI_FORMAT_B4G4R4A4_UNORM, VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT, 2, 1, 1, 1, COLOR, 1}; + /* Each depth/stencil format is only compatible with itself in Vulkan. */ static const struct vkd3d_format vkd3d_depth_stencil_formats[] = { @@ -451,6 +454,11 @@ const struct vkd3d_format *vkd3d_get_format(const struct d3d12_device *device, return &vkd3d_formats[i]; }
+ /* Do not check VkPhysicalDevice4444FormatsFeaturesEXT because apps + * should query format support, which returns more detailed info. */ + if (dxgi_format == format_b4g4r4a4.dxgi_format && device->vk_info.EXT_4444_formats) + return &format_b4g4r4a4; + return NULL; }
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 91ffa6e98..efd76309c 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -128,6 +128,7 @@ struct vkd3d_vulkan_info bool KHR_sampler_mirror_clamp_to_edge; bool KHR_timeline_semaphore; /* EXT device extensions */ + bool EXT_4444_formats; bool EXT_calibrated_timestamps; bool EXT_conditional_rendering; bool EXT_debug_marker; diff --git a/tests/d3d12.c b/tests/d3d12.c index 918621471..6d85a8e8a 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -542,7 +542,6 @@ static bool is_typed_uav_format_supported(ID3D12Device *device, DXGI_FORMAT form format_support.Format = format; hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_FORMAT_SUPPORT, &format_support, sizeof(format_support)); - todo ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
return format_support.Support1 & D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW; @@ -955,7 +954,7 @@ static void test_check_feature_support(void) || format == DXGI_FORMAT_R8G8_B8G8_UNORM || format == DXGI_FORMAT_G8R8_G8B8_UNORM || format == DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM - || (DXGI_FORMAT_AYUV <= format && format <= DXGI_FORMAT_B4G4R4A4_UNORM); + || (DXGI_FORMAT_AYUV <= format && format <= DXGI_FORMAT_A8P8);
memset(&format_info, 0, sizeof(format_info)); format_info.Format = format; @@ -5723,7 +5722,7 @@ static void test_clear_unordered_access_view_image(void) {DXGI_FORMAT_R11G11B10_FLOAT, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x00c01001}, {DXGI_FORMAT_B5G6R5_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 4}, 0x00000843}, {DXGI_FORMAT_B5G5R5A1_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00008443}, - {DXGI_FORMAT_B4G4R4A4_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00001123, false, true, true}, + {DXGI_FORMAT_B4G4R4A4_UNORM, 1, 1, 0, 0, 1, 0, {}, {1, 2, 3, 1}, 0x00001123, false, false, true}, /* Test float clears with formats. */ {DXGI_FORMAT_R16G16_UNORM, 1, 1, 0, 0, 1, 0, {}, {0x3e800000 /* 0.25f */, 0x3f800000 /* 1.0f */, 0, 0}, 0xffff4000, true}, @@ -5744,7 +5743,7 @@ static void test_clear_unordered_access_view_image(void) 0xc104, true}, {DXGI_FORMAT_B4G4R4A4_UNORM, 1, 1, 0, 0, 1, 0, {}, {0x3f000000 /* 0.5f */, 0x3f800000 /* 1.0f */, 0x40000000 /* 2.0f */, 0x40000000 /* -1.0f */}, - 0xf8ff, true, true, true}, + 0xf8ff, true, false, true}, };
static const struct
On Mon Apr 15 13:51:43 2024 +0000, Conor McCarthy wrote:
The Vulkan spec says, "can also be used in the pNext chain of VkDeviceCreateInfo to selectively enable these features" which is a bit vague, but the validation layer has no problem with omitting this.
Added it.