Make ComboVertexStateDescriptor non-copyable non-movable.
The VertexState tests were failing on MSVC debug x64 because the
ComboVertexStateDescriptor was copied but internal pointer to
itself weren't updated. This commit makes the structure non-movable and
non-copyable so the problem doesn't happen in the future and fixes
compilation errors.
Bug: dawn:602
Change-Id: Idd3a68933920eb47939217362e9e137dd7581014
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38400
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/utils/ComboRenderPipelineDescriptor.h b/src/utils/ComboRenderPipelineDescriptor.h
index 067b79e..ce8eb30 100644
--- a/src/utils/ComboRenderPipelineDescriptor.h
+++ b/src/utils/ComboRenderPipelineDescriptor.h
@@ -27,6 +27,11 @@
public:
ComboVertexStateDescriptor();
+ ComboVertexStateDescriptor(const ComboVertexStateDescriptor&) = delete;
+ ComboVertexStateDescriptor& operator=(const ComboVertexStateDescriptor&) = delete;
+ ComboVertexStateDescriptor(ComboVertexStateDescriptor&&) = delete;
+ ComboVertexStateDescriptor& operator=(ComboVertexStateDescriptor&&) = delete;
+
std::array<wgpu::VertexBufferLayoutDescriptor, kMaxVertexBuffers> cVertexBuffers;
std::array<wgpu::VertexAttributeDescriptor, kMaxVertexAttributes> cAttributes;
};