Skip to content

Commit 1084671

Browse files
committed
clang format
1 parent 9b2e89d commit 1084671

9 files changed

Lines changed: 1212 additions & 1087 deletions

File tree

include/dxc/DxilContainer/DxilPipelineStateValidation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ void SetupPSVInitInfo(PSVInitInfo &InitInfo, const DxilModule &DM);
11481148
void SetShaderProps(PSVRuntimeInfo0 *pInfo, const DxilModule &DM);
11491149
void SetShaderProps(PSVRuntimeInfo1 *pInfo1, const DxilModule &DM);
11501150
void SetShaderProps(PSVRuntimeInfo2 *pInfo2, const DxilModule &DM);
1151-
void SetShaderProps(PSVRuntimeInfo4 *pInfo4, const DxilModule &DM);
1151+
void SetShaderProps(PSVRuntimeInfo4 *Info4, const DxilModule &DM);
11521152

11531153
void PrintPSVRuntimeInfo(llvm::raw_ostream &OS, PSVRuntimeInfo0 *pInfo0,
11541154
PSVRuntimeInfo1 *pInfo1, PSVRuntimeInfo2 *pInfo2,

lib/DXIL/DxilMetadataHelper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,9 +1625,9 @@ MDTuple *DxilMDHelper::EmitDxilEntryProperties(uint64_t rawShaderFlag,
16251625
MDVals.emplace_back(MDNode::get(m_Ctx, WaveSizeVal));
16261626
}
16271627

1628-
MDVals.emplace_back(Uint32ToConstMD(DxilMDHelper::kDxilMaxGroupSharedMemTag));
16291628
MDVals.emplace_back(
1630-
Uint32ToConstMD(props.groupSharedLimitBytes));
1629+
Uint32ToConstMD(DxilMDHelper::kDxilMaxGroupSharedMemTag));
1630+
MDVals.emplace_back(Uint32ToConstMD(props.groupSharedLimitBytes));
16311631
} break;
16321632
// Geometry shader.
16331633
case DXIL::ShaderKind::Geometry: {

lib/DXIL/DxilModule.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,14 +413,13 @@ unsigned DxilModule::GetNumThreads(unsigned idx) const {
413413
}
414414

415415
unsigned DxilModule::GetGroupSharedLimit() const {
416-
DXASSERT(m_DxilEntryPropsMap.size() == 1 &&
417-
(m_pSM->IsCS() || m_pSM->IsMS() || m_pSM->IsAS()),
416+
DXASSERT(m_DxilEntryPropsMap.size() == 1 &&
417+
(m_pSM->IsCS() || m_pSM->IsMS() || m_pSM->IsAS()),
418418
"only works for CS/MS/AS profiles");
419419
const DxilFunctionProps &props = m_DxilEntryPropsMap.begin()->second->props;
420420
DXASSERT_NOMSG(m_pSM->GetKind() == props.shaderKind);
421421
return props.groupSharedLimitBytes;
422-
}
423-
422+
}
424423

425424
DxilWaveSize &DxilModule::GetWaveSize() {
426425
return const_cast<DxilWaveSize &>(

lib/DxilContainer/DxilPipelineStateValidation.cpp

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -305,19 +305,18 @@ void hlsl::SetShaderProps(PSVRuntimeInfo2 *pInfo2, const DxilModule &DM) {
305305
}
306306
}
307307

308-
void hlsl::SetShaderProps(PSVRuntimeInfo4 *pInfo4, const DxilModule &DM) {
309-
assert(pInfo4);
310-
const ShaderModel* SM = DM.GetShaderModel();
311-
switch (SM->GetKind())
312-
{
313-
case ShaderModel::Kind::Compute:
314-
case ShaderModel::Kind::Mesh:
315-
case ShaderModel::Kind::Amplification:
316-
pInfo4->GroupSharedLimit = DM.GetGroupSharedLimit();
317-
break;
318-
default:
319-
break;
320-
}
308+
void hlsl::SetShaderProps(PSVRuntimeInfo4 *Info4, const DxilModule &DM) {
309+
assert(Info4);
310+
const ShaderModel *SM = DM.GetShaderModel();
311+
switch (SM->GetKind()) {
312+
case ShaderModel::Kind::Compute:
313+
case ShaderModel::Kind::Mesh:
314+
case ShaderModel::Kind::Amplification:
315+
Info4->GroupSharedLimit = DM.GetGroupSharedLimit();
316+
break;
317+
default:
318+
break;
319+
}
321320
}
322321

323322
void PSVResourceBindInfo0::Print(raw_ostream &OS) const {
@@ -825,8 +824,7 @@ void hlsl::PrintPSVRuntimeInfo(llvm::raw_ostream &OS, PSVRuntimeInfo0 *pInfo0,
825824
<< pInfo2->NumThreadsY << "," << pInfo2->NumThreadsZ << ")\n";
826825
}
827826
if (pInfo4) {
828-
OS << Comment << " GroupSharedLimit="
829-
<< pInfo4->GroupSharedLimit << "\n";
827+
OS << Comment << " GroupSharedLimit=" << pInfo4->GroupSharedLimit << "\n";
830828
}
831829
break;
832830
case PSVShaderKind::Amplification:
@@ -836,8 +834,7 @@ void hlsl::PrintPSVRuntimeInfo(llvm::raw_ostream &OS, PSVRuntimeInfo0 *pInfo0,
836834
<< pInfo2->NumThreadsY << "," << pInfo2->NumThreadsZ << ")\n";
837835
}
838836
if (pInfo4) {
839-
OS << Comment << " GroupSharedLimit="
840-
<< pInfo4->GroupSharedLimit << "\n";
837+
OS << Comment << " GroupSharedLimit=" << pInfo4->GroupSharedLimit << "\n";
841838
}
842839
break;
843840
case PSVShaderKind::Mesh:
@@ -866,8 +863,7 @@ void hlsl::PrintPSVRuntimeInfo(llvm::raw_ostream &OS, PSVRuntimeInfo0 *pInfo0,
866863
<< pInfo2->NumThreadsY << "," << pInfo2->NumThreadsZ << ")\n";
867864
}
868865
if (pInfo4) {
869-
OS << Comment << " GroupSharedLimit="
870-
<< pInfo4->GroupSharedLimit << "\n";
866+
OS << Comment << " GroupSharedLimit=" << pInfo4->GroupSharedLimit << "\n";
871867
}
872868
break;
873869
case PSVShaderKind::Library:

lib/DxilValidation/DxilValidation.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3927,9 +3927,8 @@ static void ValidateGlobalVariables(ValidationContext &ValCtx) {
39273927
DxilEntryProps &EntryProps = M.GetDxilEntryProps(M.GetEntryFunction());
39283928
if (EntryProps.props.IsCS()) {
39293929
unsigned SpecifiedTGSMSize = EntryProps.props.groupSharedLimitBytes;
3930-
if (SpecifiedTGSMSize > 0) {
3931-
MaxSize = SpecifiedTGSMSize;
3932-
}
3930+
if (SpecifiedTGSMSize > 0)
3931+
MaxSize = SpecifiedTGSMSize;
39333932
}
39343933
}
39353934

0 commit comments

Comments
 (0)