diff options
| author | Tobin Ehlis <tobine@google.com> | 2020-09-25 16:03:40 -0600 |
|---|---|---|
| committer | jeremyk-lunarg <jeremyk@lunarg.com> | 2021-05-11 16:46:00 -0600 |
| commit | 1d176506710c4fabda4e0c4844b1f4ff77e106b7 (patch) | |
| tree | 130604696b2ff2e9ae9f3ab9129e0a73d3a99ca5 /scripts | |
| parent | c251814e52e6857a946b2784d7f82daaa739d6da (diff) | |
| download | usermoji-1d176506710c4fabda4e0c4844b1f4ff77e106b7.tar.xz | |
icd:Consider DS when setting format bits
When setting device format properties, don't set color attachment-
related bits for DS formats and don't set DS attachment bit for
color formats.
Fixes #445
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/mock_icd_generator.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/scripts/mock_icd_generator.py b/scripts/mock_icd_generator.py index 79680a80..64ea7dc6 100644 --- a/scripts/mock_icd_generator.py +++ b/scripts/mock_icd_generator.py @@ -741,8 +741,22 @@ CUSTOM_C_INTERCEPTS = { if (VK_FORMAT_UNDEFINED == format) { *pFormatProperties = { 0x0, 0x0, 0x0 }; } else { - // TODO: Just returning full support for everything initially - *pFormatProperties = { 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF }; + // Default to a color format, skip DS bit + *pFormatProperties = { 0x00FFFDFF, 0x00FFFDFF, 0x00FFFDFF }; + switch (format) { + case VK_FORMAT_D16_UNORM: + case VK_FORMAT_X8_D24_UNORM_PACK32: + case VK_FORMAT_D32_SFLOAT: + case VK_FORMAT_S8_UINT: + case VK_FORMAT_D16_UNORM_S8_UINT: + case VK_FORMAT_D24_UNORM_S8_UINT: + case VK_FORMAT_D32_SFLOAT_S8_UINT: + // Don't set color bits for DS formats + *pFormatProperties = { 0x00FFFE7F, 0x00FFFE7F, 0x00FFFE7F }; + break; + default: + break; + } } ''', 'vkGetPhysicalDeviceFormatProperties2KHR': ''' |
