Skip to content

Commit 389cd0f

Browse files
committed
formatting
1 parent 03b6051 commit 389cd0f

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

tools/clang/lib/AST/ASTContextHLSL.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,8 +1396,7 @@ CXXRecordDecl *hlsl::DeclareVkSampledTexture2DType(ASTContext &context,
13961396
context.DeclarationNames.getIdentifier(&context.Idents.get("Sample")),
13971397
/*isConst*/ true);
13981398
sampleDecl->addAttr(HLSLIntrinsicAttr::CreateImplicit(
1399-
context, "op", "",
1400-
static_cast<int>(hlsl::IntrinsicOp::MOP_Sample)));
1399+
context, "op", "", static_cast<int>(hlsl::IntrinsicOp::MOP_Sample)));
14011400
sampleDecl->addAttr(HLSLCXXOverloadAttr::CreateImplicit(context));
14021401

14031402
// Sample(location, offset)

tools/clang/lib/SPIRV/AstTypeProbe.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,8 @@ bool isTexture(QualType type) {
929929
bool isSampledTexture(QualType type) {
930930
if (const auto *rt = type->getAs<RecordType>()) {
931931
const auto name = rt->getDecl()->getName();
932-
// TODO(https://github.com/microsoft/DirectXShaderCompiler/issues/7979): Add other sampled texture types as needed.
932+
// TODO(https://github.com/microsoft/DirectXShaderCompiler/issues/7979): Add
933+
// other sampled texture types as needed.
933934
if (name == "SampledTexture2D")
934935
return true;
935936
}

tools/clang/lib/SPIRV/LowerTypeVisitor.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -851,9 +851,8 @@ const SpirvType *LowerTypeVisitor::lowerVkTypeInVkNamespace(
851851
}
852852
if (name == "SampledTexture2D") {
853853
const auto sampledType = hlsl::GetHLSLResourceResultType(type);
854-
auto loweredType =
855-
lowerType(getElementType(astContext, sampledType), rule,
856-
/*isRowMajor*/ llvm::None, srcLoc);
854+
auto loweredType = lowerType(getElementType(astContext, sampledType), rule,
855+
/*isRowMajor*/ llvm::None, srcLoc);
857856

858857
// Treat bool textures as uint for compatibility with OpTypeImage.
859858
if (loweredType == spvContext.getBoolType()) {

tools/clang/lib/Sema/SemaHLSL.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,8 +1252,8 @@ static const ArBasicKind g_DxHitObjectCT[] = {AR_OBJECT_HIT_OBJECT,
12521252
#ifdef ENABLE_SPIRV_CODEGEN
12531253
static const ArBasicKind g_VKBufferPointerCT[] = {AR_OBJECT_VK_BUFFER_POINTER,
12541254
AR_BASIC_UNKNOWN};
1255-
static const ArBasicKind g_VKSampledTexture2DCT[] = {AR_OBJECT_VK_SAMPLED_TEXTURE2D,
1256-
AR_BASIC_UNKNOWN};
1255+
static const ArBasicKind g_VKSampledTexture2DCT[] = {
1256+
AR_OBJECT_VK_SAMPLED_TEXTURE2D, AR_BASIC_UNKNOWN};
12571257
#endif
12581258

12591259
// Basic kinds, indexed by a LEGAL_INTRINSIC_COMPTYPES value.
@@ -1314,7 +1314,7 @@ const ArBasicKind *g_LegalIntrinsicCompTypes[] = {
13141314
g_RayQueryCT, // LICOMPTYPE_RAY_QUERY
13151315
g_LinAlgCT, // LICOMPTYPE_LINALG
13161316
#ifdef ENABLE_SPIRV_CODEGEN
1317-
g_VKBufferPointerCT, // LICOMPTYPE_VK_BUFFER_POINTER
1317+
g_VKBufferPointerCT, // LICOMPTYPE_VK_BUFFER_POINTER
13181318
g_VKSampledTexture2DCT, // LICOMPTYPE_VK_SAMPLED_TEXTURE2D
13191319
#endif
13201320
};

0 commit comments

Comments
 (0)