From 40c590a0310abb54aa8ffe6b7f4a2b9b77b316a9 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 30 Sep 2024 00:06:22 -0700 Subject: [PATCH] Initialize HasIntegerDot (#1404) Reported as `UndefinedBehaviorSanitizer: invalid-bool-load` --- lib/SPIRVProducerPass.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/SPIRVProducerPass.cpp b/lib/SPIRVProducerPass.cpp index 5356979a9..2e3046577 100644 --- a/lib/SPIRVProducerPass.cpp +++ b/lib/SPIRVProducerPass.cpp @@ -313,8 +313,8 @@ struct SPIRVProducerPassImpl { outputCInitList(outputCInitList), patchBoundOffset(0), nextID(1), OpExtInstImportID(0), HasVariablePointersStorageBuffer(false), HasVariablePointers(false), HasNonUniformPointers(false), - HasConvertToF(false), SamplerPointerTy(nullptr), SamplerDataTy(nullptr), - WorkgroupSizeValueID(0), WorkgroupSizeVarID(0), + HasConvertToF(false), HasIntegerDot(false), SamplerPointerTy(nullptr), + SamplerDataTy(nullptr), WorkgroupSizeValueID(0), WorkgroupSizeVarID(0), TestOutput(out == nullptr) { addCapability(spv::CapabilityShader); if (clspv::Option::PhysicalStorageBuffers()) @@ -328,8 +328,9 @@ struct SPIRVProducerPassImpl { outputCInitList(false), patchBoundOffset(0), nextID(1), OpExtInstImportID(0), HasVariablePointersStorageBuffer(false), HasVariablePointers(false), HasNonUniformPointers(false), - HasConvertToF(false), SamplerPointerTy(nullptr), SamplerDataTy(nullptr), - WorkgroupSizeValueID(0), WorkgroupSizeVarID(0), TestOutput(true) { + HasConvertToF(false), HasIntegerDot(false), SamplerPointerTy(nullptr), + SamplerDataTy(nullptr), WorkgroupSizeValueID(0), WorkgroupSizeVarID(0), + TestOutput(true) { if (clspv::Option::PhysicalStorageBuffers()) addCapability(spv::CapabilityPhysicalStorageBufferAddresses); addCapability(spv::CapabilityShader);