Skip to content

Commit 19bbc8f

Browse files
rudybearmeta-codesync[bot]
authored andcommitted
igl | vulkan | Add static_assert for binding struct triviality
Reviewed By: corporateshark Differential Revision: D112596138 fbshipit-source-id: f7e902911108993366393c154505c0c7a30e5a01
1 parent 5e83655 commit 19bbc8f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/igl/vulkan/ResourcesBinder.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#pragma once
99

10+
#include <type_traits>
1011
#include <igl/Common.h>
1112
#include <igl/Texture.h>
1213
#include <igl/vulkan/CommandBuffer.h>
@@ -37,6 +38,10 @@ struct BindingsStorageImages {
3738
VkImageView images[IGL_TEXTURE_SAMPLERS_MAX] = {};
3839
};
3940

41+
static_assert(std::is_trivially_copyable_v<BindingsBuffers>);
42+
static_assert(std::is_trivially_copyable_v<BindingsTextures>);
43+
static_assert(std::is_trivially_copyable_v<BindingsStorageImages>);
44+
4045
/** @brief Stores uniform and storage buffer bindings, as well as bindings for textures and sampler
4146
* states for Vulkan. This class maintains vectors for each type of shader resource available in IGL
4247
* and records the association between binding locations (indices) and the Vulkan objects, while

0 commit comments

Comments
 (0)