aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWilliam Henning <whenning@google.com>2018-05-24 14:49:16 -0600
committerTobin Ehlis <tobine@google.com>2018-05-25 06:55:43 -0600
commit2d1bc52881788f6b2523f4cf1c1711a47d7953a7 (patch)
treeddfd84dae31178c931231c514df6188607f1df2d /scripts
parent6749fa482482f02c30e117f6c00e0a6a5e887993 (diff)
downloadusermoji-2d1bc52881788f6b2523f4cf1c1711a47d7953a7.tar.xz
icd: Hard code unsupported image formats
Hard code that the mock ICD does not support VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, an arbitrary image format not currently used in any validation layers test. Additionally hard code that the mock ICD doesn't images created with a sample count of 64 bits. These hardcoded unsupported image formats git the CreateImageFormatSupportErrors and CreateImageMaxLimitsViolation tests in the validation layers to run.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mock_icd_generator.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/mock_icd_generator.py b/scripts/mock_icd_generator.py
index bb393375..9c60fbd4 100644
--- a/scripts/mock_icd_generator.py
+++ b/scripts/mock_icd_generator.py
@@ -739,12 +739,18 @@ CUSTOM_C_INTERCEPTS = {
GetPhysicalDeviceFormatProperties(physicalDevice, format, &pFormatProperties->formatProperties);
''',
'vkGetPhysicalDeviceImageFormatProperties': '''
+ // A hardcoded unsupported format
+ if (format == VK_FORMAT_E5B9G9R9_UFLOAT_PACK32) {
+ return VK_ERROR_FORMAT_NOT_SUPPORTED;
+ }
+
// TODO: Just hard-coding some values for now
// TODO: If tiling is linear, limit the mips, levels, & sample count
if (VK_IMAGE_TILING_LINEAR == tiling) {
*pImageFormatProperties = { { 4096, 4096, 256 }, 1, 1, VK_SAMPLE_COUNT_1_BIT, 4294967296 };
} else {
- *pImageFormatProperties = { { 4096, 4096, 256 }, 12, 256, 0x7F, 4294967296 };
+ // We hard-code support for all sample counts except 64 bits.
+ *pImageFormatProperties = { { 4096, 4096, 256 }, 12, 256, 0x7F & ~VK_SAMPLE_COUNT_64_BIT, 4294967296 };
}
return VK_SUCCESS;
''',