Skip to content

Commit ae5362e

Browse files
committed
Fix change requests.
1 parent 239ef9d commit ae5362e

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Graphics/ShaderTools/src/SPIRVShaderResources.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,9 +617,9 @@ SPIRVShaderResources::SPIRVShaderResources(IMemoryAllocator& Allocator,
617617
struct SpecConstInfo
618618
{
619619
std::string Name;
620-
uint32_t SpecId;
621-
uint32_t Size;
622-
SHADER_CODE_BASIC_TYPE BasicType;
620+
uint32_t SpecId = 0;
621+
uint32_t Size = 0;
622+
SHADER_CODE_BASIC_TYPE BasicType = SHADER_CODE_BASIC_TYPE_UNKNOWN;
623623
};
624624
std::vector<SpecConstInfo> SpecConstants;
625625
Uint32 NumSpecConstants = 0;

Tests/DiligentCoreTest/src/ShaderTools/SPIRVShaderResourcesTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -630,13 +630,13 @@ void TestSpecializationConstants(SHADER_COMPILER Compiler)
630630

631631
// Build a map from name to reference for order-independent matching
632632
std::unordered_map<std::string, const SPIRVSpecConstRefAttribs*> RefMap;
633-
for (const auto& Ref : RefSpecConstants)
633+
for (const SPIRVSpecConstRefAttribs& Ref : RefSpecConstants)
634634
RefMap[Ref.Name] = &Ref;
635635

636636
for (Uint32 i = 0; i < ConstResources.GetNumSpecConstants(); ++i)
637637
{
638-
const auto& SC = ConstResources.GetSpecConstant(i);
639-
const auto it = RefMap.find(SC.Name);
638+
const SPIRVSpecializationConstantAttribs& SC = ConstResources.GetSpecConstant(i);
639+
const auto it = RefMap.find(SC.Name);
640640
ASSERT_NE(it, RefMap.end()) << "Specialization constant '" << SC.Name << "' is not found in the reference list";
641641

642642
const auto* pRef = it->second;

0 commit comments

Comments
 (0)