Skip to content

Commit 2559085

Browse files
committed
Fix VK_API_MAX_FRAMEWORK_VERSION
Change-Id: Ib8f99b9c43797d403eb5f65941f9d7ba66e24cf6
1 parent 3732007 commit 2559085

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

external/vulkancts/framework/vulkan/generated/vulkan/vkBasicTypes.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0 (static_cast<uint32_t> (VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)))
4444
#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0 (static_cast<uint32_t> (VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)))
4545
#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0 (static_cast<uint32_t> (VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)))
46-
#define VK_API_MAX_FRAMEWORK_VERSION VK_API_VERSION_1_0
46+
#define VK_API_MAX_FRAMEWORK_VERSION VK_API_VERSION_1_4
4747

4848
// Handles
4949
VK_DEFINE_HANDLE (VkInstance, HANDLE_TYPE_INSTANCE);

external/vulkancts/scripts/gen_framework.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,10 +1324,14 @@ def genLines (defines):
13241324
yield line
13251325
# add VK_API_MAX_FRAMEWORK_VERSION
13261326
major, minor = 1, 0
1327-
for feature in reversed(api.features):
1328-
if feature.api == api.apiName:
1327+
# In vk.xml, vulkan features (1.1, 1.2, 1.3) are marked as vulkan,vulkansc
1328+
api_feature_name = "vulkan,vulkansc" if api.apiName == "vulkan" else api.apiName
1329+
sorted_features = reversed(sorted(api.features, key=lambda feature: feature.number))
1330+
for feature in sorted_features:
1331+
if feature.api == api_feature_name:
13291332
major, minor = feature.number.split('.')
13301333
break
1334+
logging.debug("Found max framework version for API '%s': %s.%s" % (api.apiName, major, minor))
13311335
yield f"#define VK{apiName}_API_MAX_FRAMEWORK_VERSION\tVK{apiName}_API_VERSION_{major}_{minor}"
13321336

13331337
def genHandlesSrc (handles):

0 commit comments

Comments
 (0)