Skip to content

Commit

Permalink
profiles: Update to header 303
Browse files Browse the repository at this point in the history
  • Loading branch information
ziga-lunarg committed Dec 4, 2024
1 parent c1012e3 commit a618d7a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
17 changes: 14 additions & 3 deletions scripts/gen_profiles_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,12 @@ class PhysicalDeviceData {
bool vulkan_1_1_properties_written_;
bool vulkan_1_2_properties_written_;
bool vulkan_1_3_properties_written_;
bool vulkan_1_4_properties_written_;
bool vulkan_1_1_features_written_;
bool vulkan_1_2_features_written_;
bool vulkan_1_3_features_written_;
bool vulkan_1_4_features_written_;
'''

PHYSICAL_DEVICE_DATA_CONSTRUCTOR_BEGIN = '''
Expand All @@ -232,10 +234,12 @@ class PhysicalDeviceData {
vulkan_1_1_properties_written_ = false;
vulkan_1_2_properties_written_ = false;
vulkan_1_3_properties_written_ = false;
vulkan_1_4_properties_written_ = false;
vulkan_1_1_features_written_ = false;
vulkan_1_2_features_written_ = false;
vulkan_1_3_features_written_ = false;
vulkan_1_4_features_written_ = false;
'''

PHYSICAL_DEVICE_DATA_END = ''' }
Expand Down Expand Up @@ -1295,7 +1299,7 @@ class JsonLoader {
if (i > 0) {
priorities += ", ";
}
priorities += string_VkQueueGlobalPriorityKHR(dest->global_priority_properties_.priorities[i]);
priorities += string_VkQueueGlobalPriority(dest->global_priority_properties_.priorities[i]);
}
priorities += "]";
Expand Down Expand Up @@ -1518,6 +1522,9 @@ class JsonLoader {
if (features.isMember("VkPhysicalDeviceVulkan13Features")) {
pdd_->vulkan_1_3_features_written_ = true;
}
if (features.isMember("VkPhysicalDeviceVulkan14Features")) {
pdd_->vulkan_1_4_features_written_ = true;
}
bool success = GetFeature(device_name, enable_warnings, features, feature);
if (!success) {
failed = true;
Expand All @@ -1540,6 +1547,9 @@ class JsonLoader {
if (properties.isMember("VkPhysicalDeviceVulkan13Properties")) {
pdd_->vulkan_1_3_properties_written_ = true;
}
if (properties.isMember("VkPhysicalDeviceVulkan14Properties")) {
pdd_->vulkan_1_4_properties_written_ = true;
}
for (const auto &prop : properties.getMemberNames()) {
bool success = GetProperty(device_name, enable_warnings, properties, prop);
if (!success) {
Expand Down Expand Up @@ -3268,6 +3278,7 @@ class JsonLoader {
bool api_version_above_1_1 = effective_api_version >= VK_API_VERSION_1_1;
bool api_version_above_1_2 = effective_api_version >= VK_API_VERSION_1_2;
bool api_version_above_1_3 = effective_api_version >= VK_API_VERSION_1_3;
bool api_version_above_1_4 = effective_api_version >= VK_API_VERSION_1_4;
::device_has_astc_hdr = ::PhysicalDeviceData::HasExtension(&pdd, VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME);
::device_has_pvrtc = ::PhysicalDeviceData::HasExtension(&pdd, VK_IMG_FORMAT_PVRTC_EXTENSION_NAME);
Expand Down Expand Up @@ -3501,7 +3512,7 @@ class VulkanProfilesLayerGenerator():
additional_properties = ['VkPhysicalDeviceProperties', 'VkPhysicalDeviceLimits', 'VkPhysicalDeviceSparseProperties', 'VkPhysicalDeviceToolProperties', 'VkPhysicalDevicePortabilitySubsetPropertiesKHR']
# VkPhysicalDeviceHostImageCopyFeaturesEXT is not ignored to allow the people using the MockICD to still have the feature enabled,
# but use the properties in the MockICD until HostImageCopyPropertiesEXT is fixed.
ignored_structs = ['VkPhysicalDeviceHostImageCopyPropertiesEXT', 'VkPhysicalDeviceLayeredApiPropertiesListKHR']
ignored_structs = ['VkPhysicalDeviceHostImageCopyProperties', 'VkPhysicalDeviceHostImageCopyPropertiesEXT', 'VkPhysicalDeviceLayeredApiPropertiesListKHR']

int_to_json_type_map = {
'int32_t': 'Int',
Expand Down Expand Up @@ -3622,7 +3633,7 @@ def generate_helpers(self):

gen += self.generate_string_to_image_layout(registry.enums['VkImageLayout'].values)

enums = set(('VkToolPurposeFlagBits', 'VkSampleCountFlagBits', 'VkResolveModeFlagBits', 'VkShaderStageFlagBits', 'VkSubgroupFeatureFlagBits', 'VkShaderFloatControlsIndependence', 'VkPointClippingBehavior', 'VkOpticalFlowGridSizeFlagBitsNV', 'VkQueueFlagBits', 'VkMemoryDecompressionMethodFlagBitsNV', 'VkLayeredDriverUnderlyingApiMSFT', 'VkImageUsageFlagBits', 'VkBufferUsageFlagBits', 'VkPhysicalDeviceSchedulingControlsFlagBitsARM', 'VkIndirectCommandsInputModeFlagBitsEXT'))
enums = set(('VkToolPurposeFlagBits', 'VkSampleCountFlagBits', 'VkResolveModeFlagBits', 'VkShaderStageFlagBits', 'VkSubgroupFeatureFlagBits', 'VkShaderFloatControlsIndependence', 'VkPointClippingBehavior', 'VkOpticalFlowGridSizeFlagBitsNV', 'VkQueueFlagBits', 'VkMemoryDecompressionMethodFlagBitsNV', 'VkLayeredDriverUnderlyingApiMSFT', 'VkImageUsageFlagBits', 'VkBufferUsageFlagBits', 'VkPhysicalDeviceSchedulingControlsFlagBitsARM', 'VkIndirectCommandsInputModeFlagBitsEXT', 'VkPipelineRobustnessBufferBehavior', 'VkPipelineRobustnessImageBehavior'))
enums = enums.union(self.get_video_enums())
gen += self.generate_string_to_uint(enums, registry.enums)

Expand Down
5 changes: 4 additions & 1 deletion scripts/gen_profiles_solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -3382,7 +3382,7 @@ def __init__(self, xml, upperCaseName):


# Dynamic arrays are ill-formed, but some of them still have a maximum size that can be used
struct_with_valid_dynamic_array = ["VkQueueFamilyGlobalPriorityPropertiesKHR"]
struct_with_valid_dynamic_array = ["VkQueueFamilyGlobalPriorityProperties"]

class VulkanRegistry():
def __init__(self, registryFile, api = 'vulkan'):
Expand Down Expand Up @@ -4258,6 +4258,9 @@ def applyWorkarounds(self):
self.structs['VkPhysicalDeviceVulkan13Properties'].members['minSubgroupSize'].limittype = 'min,pot'
self.structs['VkPhysicalDeviceVulkan13Properties'].members['maxSubgroupSize'].limittype = 'max,pot'

if 'VkPhysicalDeviceVulkan14Properties' in self.structs:
self.structs['VkPhysicalDeviceVulkan14Properties'].members['maxCombinedImageSamplerDescriptorCount'].limittype = 'min,pot'

if 'VkPhysicalDeviceTexelBufferAlignmentProperties' in self.structs:
self.structs['VkPhysicalDeviceTexelBufferAlignmentProperties'].members['storageTexelBufferOffsetAlignmentBytes'].limittype = 'min,pot'
self.structs['VkPhysicalDeviceTexelBufferAlignmentProperties'].members['storageTexelBufferOffsetSingleTexelAlignment'].limittype = 'exact'
Expand Down
10 changes: 10 additions & 0 deletions scripts/gen_profiles_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,16 @@ def gen_properties(self, extensions, registry):
gen += enum[0]
self.test_values[name][property] = enum[1]
self.i += 1
elif property_type == "VkPipelineRobustnessBufferBehavior":
enum = self.get_enum('VkPipelineRobustnessBufferBehavior', False)
gen += enum[0]
self.test_values[name][property] = enum[1]
self.i += 1
elif property_type == "VkPipelineRobustnessImageBehavior":
enum = self.get_enum('VkPipelineRobustnessImageBehavior', False)
gen += enum[0]
self.test_values[name][property] = enum[1]
self.i += 1
elif property_type == "char":
gen += "\""
gen += property_name
Expand Down
6 changes: 3 additions & 3 deletions scripts/known_good.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"cmake_options": [
"-DVULKAN_HEADERS_ENABLE_MODULE=OFF"
],
"commit": "v1.3.302"
"commit": "v1.4.303"
},
{
"name": "Vulkan-Utility-Libraries",
"url": "https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git",
"sub_dir": "Vulkan-Utility-Libraries",
"build_dir": "Vulkan-Utility-Libraries/build",
"install_dir": "Vulkan-Utility-Libraries/build/install",
"commit": "v1.3.302",
"commit": "v1.4.303",
"deps": [
{
"var_name": "VULKAN_HEADERS_INSTALL_DIR",
Expand All @@ -31,7 +31,7 @@
"sub_dir": "Vulkan-Loader",
"build_dir": "Vulkan-Loader/build",
"install_dir": "Vulkan-Loader/build/install",
"commit": "v1.3.301",
"commit": "v1.4.303",
"deps": [
{
"var_name": "VULKAN_HEADERS_INSTALL_DIR",
Expand Down

0 comments on commit a618d7a

Please sign in to comment.