Skip to content

Commit

Permalink
Only dereference the buffer view if it is valid.
Browse files Browse the repository at this point in the history
  • Loading branch information
AWoloszyn committed Sep 6, 2017
1 parent 634d7c9 commit 6e4bc83
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions gapis/api/vulkan/vulkan.api
Original file line number Diff line number Diff line change
Expand Up @@ -5810,9 +5810,15 @@ cmd void vkCmdBindDescriptorSets(
}
for k in (0 .. len(binding.BufferViewBindings)) {
buffer_view := binding.BufferViewBindings[as!u32(k)]
buffer_view_object := BufferViews[buffer_view]
bind_buffer_and_descriptor_sets.BoundBuffers[len(bind_buffer_and_descriptor_sets.BoundBuffers)] = BoundBuffer(
buffer_view_object.Buffer, buffer_view_object.Offset, buffer_view_object.Range)
if (buffer_view != as!VkBufferView(0)) {
buffer_view_object := BufferViews[buffer_view]
bind_buffer_and_descriptor_sets.BoundBuffers[len(bind_buffer_and_descriptor_sets.BoundBuffers)] = BoundBuffer(
buffer_view_object.Buffer, buffer_view_object.Offset, buffer_view_object.Range)
} else {
bind_buffer_and_descriptor_sets.BoundBuffers[len(bind_buffer_and_descriptor_sets.BoundBuffers)] = BoundBuffer(
as!ref!BufferObject(null), as!VkDeviceSize(0), as!VkDeviceSize(0))
}

}
}
}
Expand Down

0 comments on commit 6e4bc83

Please sign in to comment.