Skip to content

Commit 7f42a31

Browse files
committed
fix formatting
1 parent 0708918 commit 7f42a31

File tree

6 files changed

+20
-21
lines changed

6 files changed

+20
-21
lines changed

Graphics/GraphicsEngineVulkan/include/PipelineLayoutVk.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ class PipelineResourceSignatureVkImpl;
4343
/// Push constant information extracted from shaders or selected from inline constants
4444
struct PushConstantInfoVk
4545
{
46-
VkShaderStageFlags StageFlags = 0;
47-
Uint32 Size = 0;
48-
Uint32 SignatureIndex = ~0u; // Index of the signature containing the push constant (~0u if none)
49-
Uint32 ResourceIndex = ~0u; // Resource index within the signature (~0u if none)
46+
VkShaderStageFlags StageFlags = 0;
47+
Uint32 Size = 0;
48+
Uint32 SignatureIndex = ~0u; // Index of the signature containing the push constant (~0u if none)
49+
Uint32 ResourceIndex = ~0u; // Resource index within the signature (~0u if none)
5050
};
5151

5252
static constexpr Uint32 INVALID_PUSH_CONSTANT_INDEX = ~0u;

Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,10 @@ DeviceContextVkImpl::ResourceBindInfo& DeviceContextVkImpl::GetBindInfo(PIPELINE
427427

428428
void DeviceContextVkImpl::UpdateInlineConstantBuffers(ResourceBindInfo& BindInfo)
429429
{
430-
const PipelineLayoutVk& Layout = m_pPipelineState->GetPipelineLayout();
431-
const Uint32 PushConstSignIdx = Layout.GetPushConstantSignatureIndex();
432-
const Uint32 PushConstResIdx = Layout.GetPushConstantResourceIndex();
433-
const Uint32 SignCount = m_pPipelineState->GetResourceSignatureCount();
430+
const PipelineLayoutVk& Layout = m_pPipelineState->GetPipelineLayout();
431+
const Uint32 PushConstSignIdx = Layout.GetPushConstantSignatureIndex();
432+
const Uint32 PushConstResIdx = Layout.GetPushConstantResourceIndex();
433+
const Uint32 SignCount = m_pPipelineState->GetResourceSignatureCount();
434434

435435
for (Uint32 i = 0; i < SignCount; ++i)
436436
{

Graphics/GraphicsEngineVulkan/src/PipelineLayoutVk.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ void PipelineLayoutVk::Create(RenderDeviceVkImpl* pDe
149149
PipelineLayoutCI.pushConstantRangeCount = 1;
150150
PipelineLayoutCI.pPushConstantRanges = &PushConstantRange;
151151

152-
m_PushConstantSize = PushConstant.Size;
153-
m_PushConstantStageFlags = PushConstant.StageFlags;
154-
m_PushConstantSignatureIndex = PushConstant.SignatureIndex;
155-
m_PushConstantResourceIndex = PushConstant.ResourceIndex;
152+
m_PushConstantSize = PushConstant.Size;
153+
m_PushConstantStageFlags = PushConstant.StageFlags;
154+
m_PushConstantSignatureIndex = PushConstant.SignatureIndex;
155+
m_PushConstantResourceIndex = PushConstant.ResourceIndex;
156156
}
157157
else
158158
{

Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ void PipelineResourceSignatureVkImpl::CreateSetLayouts(const bool IsSerialized)
332332
DescrType,
333333
DSMapping[SetId],
334334
pVkImmutableSamplers != nullptr,
335-
CacheGroupOffsets[CacheGroup], // SRBCacheOffset
336-
ResDesc.VarType == SHADER_RESOURCE_VARIABLE_TYPE_STATIC ? StaticCacheOffset : ~0u // StaticCacheOffset
335+
CacheGroupOffsets[CacheGroup], // SRBCacheOffset
336+
ResDesc.VarType == SHADER_RESOURCE_VARIABLE_TYPE_STATIC ? StaticCacheOffset : ~0u // StaticCacheOffset
337337
};
338338
}
339339
else
@@ -1264,10 +1264,10 @@ void PipelineResourceSignatureVkImpl::UpdateInlineConstantBuffers(const ShaderRe
12641264

12651265
for (Uint32 i = 0; i < m_NumInlineConstantBufferAttribs; ++i)
12661266
{
1267-
const InlineConstantBufferAttribsVk& InlineCBAttr = m_InlineConstantBufferAttribs[i];
1268-
const Uint32 DataSize = InlineCBAttr.NumConstants * sizeof(Uint32);
1269-
const ResourceAttribs& Attr = GetResourceAttribs(InlineCBAttr.ResIndex);
1270-
const Uint32 CacheOffset = Attr.CacheOffset(CacheType);
1267+
const InlineConstantBufferAttribsVk& InlineCBAttr = m_InlineConstantBufferAttribs[i];
1268+
const Uint32 DataSize = InlineCBAttr.NumConstants * sizeof(Uint32);
1269+
const ResourceAttribs& Attr = GetResourceAttribs(InlineCBAttr.ResIndex);
1270+
const Uint32 CacheOffset = Attr.CacheOffset(CacheType);
12711271
const void* pInlineConstantData = ResourceCache.GetInlineConstantData(Attr.DescrSet, CacheOffset);
12721272
VERIFY_EXPR(pInlineConstantData != nullptr);
12731273

Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ void PipelineStateVkImpl::PatchShaderConvertUniformBufferToPushConstant(TShaderS
979979
return;
980980

981981
const PipelineResourceDesc& ResDesc = pSignature->GetResourceDesc(PushConstantInfo.ResourceIndex);
982-
const std::string PushConstantName = ResDesc.Name;
982+
const std::string PushConstantName = ResDesc.Name;
983983

984984
// For each shader stage, check if the uniform buffer needs to be patched
985985
for (ShaderStageInfo& Stage : ShaderStages)
@@ -1023,7 +1023,7 @@ void PipelineStateVkImpl::PatchShaderConvertUniformBufferToPushConstant(TShaderS
10231023

10241024
if (ShouldPatchUniformBuffer)
10251025
{
1026-
const std::vector<uint32_t>& SPIRV = Stage.SPIRVs[i];
1026+
const std::vector<uint32_t>& SPIRV = Stage.SPIRVs[i];
10271027
std::vector<uint32_t> PatchedSPIRV = PatchSPIRVConvertUniformBufferToPushConstant(
10281028
SPIRV,
10291029
SPV_ENV_MAX, // Auto-detect target environment

Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ void ShaderVkImpl::Initialize(const ShaderCreateInfo& ShaderCI,
239239

240240
VERIFY_EXPR(ShaderCI.ByteCode != nullptr || m_EntryPoint == ShaderCI.EntryPoint ||
241241
(m_EntryPoint == "main" && (ShaderCI.CompileFlags & SHADER_COMPILE_FLAG_HLSL_TO_SPIRV_VIA_GLSL) != 0));
242-
243242
}
244243
else
245244
{

0 commit comments

Comments
 (0)