From 7b7dfad5527f0d6bf7e1aad0a632a69f484797fe Mon Sep 17 00:00:00 2001 From: Powei Feng Date: Tue, 24 Oct 2023 15:43:24 -0700 Subject: [PATCH] filamat: Fix MaterialInfo::userMaterialHasCustomDepth init (#7292) Leaving it uninitialized leads to msan failure. --- libs/filamat/src/MaterialBuilder.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/filamat/src/MaterialBuilder.cpp b/libs/filamat/src/MaterialBuilder.cpp index 01e645c6877..7f00a1b4f21 100644 --- a/libs/filamat/src/MaterialBuilder.cpp +++ b/libs/filamat/src/MaterialBuilder.cpp @@ -629,6 +629,9 @@ void MaterialBuilder::prepareToBuild(MaterialInfo& info) noexcept { info.vertexDomainDeviceJittered = mVertexDomainDeviceJittered; info.featureLevel = mFeatureLevel; info.groupSize = mGroupSize; + + // This is determined via static analysis of the glsl after prepareToBuild(). + info.userMaterialHasCustomDepth = false; } bool MaterialBuilder::findProperties(backend::ShaderStage type,