aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2020-06-04 21:31:45 -0600
committerTobin Ehlis <tobine@google.com>2020-06-05 07:53:45 -0600
commit9d7880c7a07598cca8fb80b74bfee933e852f445 (patch)
tree33bc8e82794243bdb6e1348be0d03e86c478fa7f /scripts
parent5b40c4aa0dba6bf479431267d8ef715ab1376cc1 (diff)
downloadusermoji-9d7880c7a07598cca8fb80b74bfee933e852f445.tar.xz
icd: Cleanup supported VK API version
Use a single constant, kSupportedVulkanAPIVersion, everwhere that supported API version is referenced. Current value is VK_API_VERSION_1_1.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mock_icd_generator.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/mock_icd_generator.py b/scripts/mock_icd_generator.py
index 9a785a9e..3410af38 100644
--- a/scripts/mock_icd_generator.py
+++ b/scripts/mock_icd_generator.py
@@ -55,6 +55,7 @@ SOURCE_CPP_PREFIX = '''
using std::unordered_map;
static constexpr uint32_t icd_physical_device_count = 1;
+static constexpr uint32_t kSupportedVulkanAPIVersion = VK_API_VERSION_1_1;
static unordered_map<VkInstance, std::array<VkPhysicalDevice, icd_physical_device_count>> physical_device_map;
// Map device memory handle to any mapped allocations that we'll need to free on unmap
@@ -497,7 +498,7 @@ CUSTOM_C_INTERCEPTS = {
return VK_SUCCESS;
''',
'vkEnumerateInstanceVersion': '''
- *pApiVersion = VK_API_VERSION_1_1;
+ *pApiVersion = kSupportedVulkanAPIVersion;
return VK_SUCCESS;
''',
'vkEnumerateDeviceLayerProperties': '''
@@ -769,7 +770,7 @@ CUSTOM_C_INTERCEPTS = {
''',
'vkGetPhysicalDeviceProperties': '''
// TODO: Just hard-coding some values for now
- pProperties->apiVersion = VK_API_VERSION_1_1;
+ pProperties->apiVersion = kSupportedVulkanAPIVersion;
pProperties->driverVersion = 1;
pProperties->vendorID = 0xba5eba11;
pProperties->deviceID = 0xf005ba11;