Browse Source

metal: workaround for garbage data being stored in pipeline keys

Alex Szpakowski 4 years ago
parent
commit
326dfe2632
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/modules/graphics/vertex.h

+ 6 - 1
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);
 	}