Skip to content

Commit 9169be0

Browse files
committed
formatting
1 parent 9c09f21 commit 9169be0

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

llvm/lib/Target/DirectX/DXILPostOptimizationValidation.cpp

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ tripleToVisibility(llvm::Triple::EnvironmentType ET) {
160160
}
161161
}
162162

163-
164163
static void reportIfDeniedShaderStageAccess(Module &M, dxbc::RootFlags Flags,
165164
dxbc::RootFlags Mask) {
166165
if ((Flags & Mask) == Mask) {
@@ -172,7 +171,6 @@ static void reportIfDeniedShaderStageAccess(Module &M, dxbc::RootFlags Flags,
172171
}
173172
}
174173

175-
176174
static void validateRootSignature(Module &M,
177175
const mcdxbc::RootSignatureDesc &RSD,
178176
dxil::ModuleMetadataInfo &MMI,
@@ -238,7 +236,7 @@ static void validateRootSignature(Module &M,
238236
Builder.findOverlapping(ReportedBinding);
239237
reportOverlappingRegisters(M, ReportedBinding, Overlaping);
240238
});
241-
239+
242240
const hlsl::BoundRegs &BoundRegs = Builder.takeBoundRegs();
243241
bool HasBindings = false;
244242
for (const ResourceInfo &RI : DRM) {
@@ -253,35 +251,36 @@ static void validateRootSignature(Module &M,
253251

254252
if (Reg != nullptr) {
255253
const auto *ParamInfo =
256-
static_cast<const mcdxbc::RootParameterInfo *>(Reg->Cookie);
257-
258-
if (RC != ResourceClass::SRV && RC != ResourceClass::UAV){
254+
static_cast<const mcdxbc::RootParameterInfo *>(Reg->Cookie);
255+
256+
if (RC != ResourceClass::SRV && RC != ResourceClass::UAV) {
259257
HasBindings = true;
260258
continue;
261259
}
262-
263-
if (ParamInfo->Type == dxbc::RootParameterType::DescriptorTable){
260+
261+
if (ParamInfo->Type == dxbc::RootParameterType::DescriptorTable) {
264262
HasBindings = true;
265263
continue;
266264
}
267-
268-
if (RK != ResourceKind::RawBuffer && RK != ResourceKind::StructuredBuffer){
265+
266+
if (RK != ResourceKind::RawBuffer &&
267+
RK != ResourceKind::StructuredBuffer) {
269268
reportInvalidHandleTyError(M, RC, Binding);
270269
continue;
271270
}
272271
HasBindings = true;
273-
272+
274273
} else {
275274
reportRegNotBound(M, RC, Binding);
276275
}
277276
}
278277

279-
if(HasBindings && MMI.ShaderProfile != Triple::Compute){
278+
if (HasBindings && MMI.ShaderProfile != Triple::Compute) {
280279
dxbc::RootFlags Flags = dxbc::RootFlags(RSD.Flags);
281280
switch (MMI.ShaderProfile) {
282281
case Triple::Pixel:
283-
reportIfDeniedShaderStageAccess(M, Flags,
284-
dxbc::RootFlags::DenyPixelShaderRootAccess);
282+
reportIfDeniedShaderStageAccess(
283+
M, Flags, dxbc::RootFlags::DenyPixelShaderRootAccess);
285284
break;
286285
case Triple::Vertex:
287286
reportIfDeniedShaderStageAccess(
@@ -292,16 +291,16 @@ static void validateRootSignature(Module &M,
292291
M, Flags, dxbc::RootFlags::DenyGeometryShaderRootAccess);
293292
break;
294293
case Triple::Hull:
295-
reportIfDeniedShaderStageAccess(M, Flags,
296-
dxbc::RootFlags::DenyHullShaderRootAccess);
294+
reportIfDeniedShaderStageAccess(
295+
M, Flags, dxbc::RootFlags::DenyHullShaderRootAccess);
297296
break;
298297
case Triple::Domain:
299298
reportIfDeniedShaderStageAccess(
300299
M, Flags, dxbc::RootFlags::DenyDomainShaderRootAccess);
301300
break;
302301
case Triple::Mesh:
303-
reportIfDeniedShaderStageAccess(M, Flags,
304-
dxbc::RootFlags::DenyMeshShaderRootAccess);
302+
reportIfDeniedShaderStageAccess(
303+
M, Flags, dxbc::RootFlags::DenyMeshShaderRootAccess);
305304
break;
306305
case Triple::Amplification:
307306
reportIfDeniedShaderStageAccess(
@@ -311,7 +310,6 @@ static void validateRootSignature(Module &M,
311310
llvm_unreachable("Invalid triple to shader stage conversion");
312311
}
313312
}
314-
315313
}
316314

317315
static mcdxbc::RootSignatureDesc *

0 commit comments

Comments
 (0)