From 326dfe2632aaac01a8cf3e0197c5eb48e1dc1622 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sat, 27 Mar 2021 17:46:43 -0300 Subject: [PATCH] metal: workaround for garbage data being stored in pipeline keys --- src/modules/graphics/vertex.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/graphics/vertex.h b/src/modules/graphics/vertex.h index 006df24a7..34d30bbe1 100644 --- a/src/modules/graphics/vertex.h +++ b/src/modules/graphics/vertex.h @@ -318,9 +318,14 @@ struct VertexAttributes VertexAttributeInfo attribs[MAX]; VertexBufferLayout bufferLayouts[BufferBindings::MAX]; - VertexAttributes() {} + VertexAttributes() + { + memset(this, 0, sizeof(VertexAttributes)); + } + VertexAttributes(CommonFormat format, uint8 bufferindex) { + memset(this, 0, sizeof(VertexAttributes)); setCommonFormat(format, bufferindex); }