Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validation_layer_generator: do not check static array addresses #399

Merged
merged 2 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/sdk/pr.399.gh.OpenXR-SDK-Source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Validation Layer: Fix the validation_layer_generator to not check static array addresses.
15 changes: 9 additions & 6 deletions src/scripts/validation_layer_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1437,9 +1437,10 @@ def outputParamMemberContents(self, is_command, struct_command_name, param_membe
indent)
if (param_member.is_handle or self.isEnumType(param_member.type) or
(self.isStruct(param_member.type) and not self.isStructAlwaysValid(param_member.type))):
loop_string += self.writeIndent(indent)
loop_string += 'if (%s) {\n' % (prefixed_param_member_name)
indent = indent + 1
if not param_member.is_static_array:
loop_string += self.writeIndent(indent)
loop_string += 'if (%s) {\n' % (prefixed_param_member_name)
indent = indent + 1
loop_string += self.writeIndent(indent)
loop_string += 'for (uint32_t %s = 0; %s < %s; ++%s) {\n' % (loop_param_name,
loop_param_name,
Expand Down Expand Up @@ -1841,12 +1842,14 @@ def outputParamMemberContents(self, is_command, struct_command_name, param_membe
param_member_contents += self.writeIndent(indent)
param_member_contents += '}\n'
if is_loop:
indent = indent - 2
if wrote_loop:
param_member_contents += self.writeIndent(indent + 1)
param_member_contents += '}\n'
indent = indent - 1
param_member_contents += self.writeIndent(indent)
param_member_contents += '}\n'
if not param_member.is_static_array:
indent = indent - 1
param_member_contents += self.writeIndent(indent)
param_member_contents += '}\n'

return param_member_contents

Expand Down