Skip to content

Commit

Permalink
Remove more unused dx12 code in Vulkan paths
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkY-LunarG committed Oct 25, 2024
1 parent d5f02fb commit a711f46
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,9 @@ def make_decode_invocation(self, name, value, preamble, main_body, epilogue):
access_op = '->'

if is_static_array:
array_dimension = ''
# dx12 treats 2d array as 1d array. EX: [8][2] -> [16], so dx12's 2d array needs *.
# But vk keeps 2d array.
if self.is_dx12_class() and value.array_dimension and value.array_dimension > 0:
array_dimension = '*'
# The pointer decoder will write directly to the struct member's memory.
main_body += ' wrapper->{name}{}SetExternalMemory({}value->{name}, {arraylen});\n'.format(
main_body += ' wrapper->{name}{}SetExternalMemory(value->{name}, {arraylen});\n'.format(
access_op,
array_dimension,
name=value.name,
arraylen=value.array_capacity
)
Expand Down
3 changes: 0 additions & 3 deletions framework/generated/vulkan_generators/base_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1588,9 +1588,6 @@ def make_encoder_method_call(

return '{}({})'.format(method_call, ', '.join(args))

def is_dx12_class(self):
return False

def is_openxr_class(self):
return True if ('OpenXr' in self.__class__.__name__) else False

Expand Down

0 comments on commit a711f46

Please sign in to comment.