aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobin Ehlis <tobin@lunarg.com>2015-07-10 11:10:21 -0600
committerTobin Ehlis <tobin@lunarg.com>2015-07-10 11:14:21 -0600
commit53f968f84558cd286d0cda9568a808cb97c14ec0 (patch)
tree746ad33b990fdb40e0b6907828437882ee0770e9
parent04d16a008e5aabd9a58bfe845cd308474984c6bd (diff)
downloadusermoji-53f968f84558cd286d0cda9568a808cb97c14ec0.tar.xz
layers: Allow ObjectTracker to skip validation of objects that can be NULL
-rwxr-xr-xvk-layer-generate.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/vk-layer-generate.py b/vk-layer-generate.py
index 6acbbacc..26b7280f 100755
--- a/vk-layer-generate.py
+++ b/vk-layer-generate.py
@@ -1074,24 +1074,26 @@ class ObjectTrackerSubcommand(Subcommand):
using_line = ''
create_line = ''
object_params = {} # dict of parameters that are VkObject types mapping to the size of array types or '0' if not array
- # TODO : Should also check through struct params & add any objects embedded in struct chains
+ valid_null_object_names = ['basePipelineHandle']
# TODO : A few of the skipped types are just "hard" cases that need some more work to support
# Need to handle NULL fences on queue submit, binding null memory, and WSI Image objects
for p in proto.params:
if p.ty in vulkan.core.objects and p.ty not in ['VkPhysicalDevice', 'VkQueue', 'VkFence', 'VkImage', 'VkDeviceMemory']:
- object_params[p.name] = 0
+ if p.name not in valid_null_object_names:
+ object_params[p.name] = 0
elif vk_helper.is_type(p.ty.replace('const ', '').strip('*'), 'struct'):
struct_type = p.ty.replace('const ', '').strip('*')
if vk_helper.typedef_rev_dict[struct_type] in vk_helper.struct_dict:
struct_type = vk_helper.typedef_rev_dict[struct_type]
for m in sorted(vk_helper.struct_dict[struct_type]):
if vk_helper.struct_dict[struct_type][m]['type'] in vulkan.core.objects and vk_helper.struct_dict[struct_type][m]['type'] not in ['VkPhysicalDevice', 'VkQueue', 'VkFence', 'VkImage', 'VkDeviceMemory']:
- param_name = '%s->%s' % (p.name, vk_helper.struct_dict[struct_type][m]['name'])
- object_params[param_name] = {}
- if vk_helper.struct_dict[struct_type][m]['dyn_array']:
- object_params[param_name] = '%s->%s' % (p.name, vk_helper.struct_dict[struct_type][m]['array_size'])
- else:
- object_params[param_name] = 0
+ if vk_helper.struct_dict[struct_type][m]['name'] not in valid_null_object_names:
+ param_name = '%s->%s' % (p.name, vk_helper.struct_dict[struct_type][m]['name'])
+ object_params[param_name] = {}
+ if vk_helper.struct_dict[struct_type][m]['dyn_array']:
+ object_params[param_name] = '%s->%s' % (p.name, vk_helper.struct_dict[struct_type][m]['array_size'])
+ else:
+ object_params[param_name] = 0
funcs = []
mutex_unlock = False
if proto.name in explicit_object_tracker_functions: