Skip to content

Commit c5fe343

Browse files
committed
fix formatting.
1 parent 8dbf224 commit c5fe343

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

Graphics/ShaderTools/include/SPIRVShaderResources.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ struct SPIRVSpecializationConstantAttribs
211211

212212
const char* const Name;
213213
const uint32_t SpecId;
214-
const uint32_t Size; // Byte size of the scalar type
214+
const uint32_t Size; // Byte size of the scalar type
215215
const SHADER_CODE_BASIC_TYPE BasicType;
216216
};
217217
static_assert(sizeof(SPIRVSpecializationConstantAttribs) % sizeof(void*) == 0, "Size of SPIRVSpecializationConstantAttribs struct must be multiple of sizeof(void*)");
@@ -323,8 +323,8 @@ class SPIRVShaderResources
323323
const SPIRVSpecializationConstantAttribs& GetSpecConstant(Uint32 n) const noexcept
324324
{
325325
VERIFY(n < m_NumSpecConstants, "Specialization constant index (", n, ") is out of range. Total spec constant count: ", m_NumSpecConstants);
326-
const SPIRVShaderResourceAttribs* ResourceMemoryEnd = reinterpret_cast<const SPIRVShaderResourceAttribs*>(m_MemoryBuffer.get()) + GetTotalResources();
327-
const SPIRVShaderStageInputAttribs* StageInputsEnd = reinterpret_cast<const SPIRVShaderStageInputAttribs*>(ResourceMemoryEnd) + m_NumShaderStageInputs;
326+
const SPIRVShaderResourceAttribs* ResourceMemoryEnd = reinterpret_cast<const SPIRVShaderResourceAttribs*>(m_MemoryBuffer.get()) + GetTotalResources();
327+
const SPIRVShaderStageInputAttribs* StageInputsEnd = reinterpret_cast<const SPIRVShaderStageInputAttribs*>(ResourceMemoryEnd) + m_NumShaderStageInputs;
328328
return reinterpret_cast<const SPIRVSpecializationConstantAttribs*>(StageInputsEnd)[n];
329329
}
330330

Graphics/ShaderTools/src/SPIRVShaderResources.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,8 +642,8 @@ SPIRVShaderResources::SPIRVShaderResources(IMemoryAllocator& Allocator,
642642
}
643643

644644
SpecConstInfo Info;
645-
Info.Name = Compiler.get_name(sc.id);
646-
Info.SpecId = sc.constant_id;
645+
Info.Name = Compiler.get_name(sc.id);
646+
Info.SpecId = sc.constant_id;
647647
// OpTypeBool has width==1 in SPIRV-Cross; use 4 bytes (VkBool32) for bool specialization constants
648648
Info.Size = Type.basetype == diligent_spirv_cross::SPIRType::Boolean ? 4 : Type.width / 8;
649649
Info.BasicType = SpirvBaseTypeToShaderCodeBasicType(Type.basetype);

Tests/DiligentCoreTest/src/ShaderTools/SPIRVShaderResourcesTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,8 @@ void TestSpecializationConstants(SHADER_COMPILER Compiler)
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 auto& 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)