Skip to content

Commit d45d20e

Browse files
authored
[OpenCL] Remove image dimensionality comments; NFC (#147312)
The code is correct as it aligns with the SPIR-V Specification, but the comment was incorrect.
1 parent b02920f commit d45d20e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/CodeGen/Targets/SPIR.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ static llvm::Type *getSPIRVImageType(llvm::LLVMContext &Ctx, StringRef BaseType,
322322
// Choose the dimension of the image--this corresponds to the Dim enum in
323323
// SPIR-V (first integer parameter of OpTypeImage).
324324
if (OpenCLName.starts_with("image2d"))
325-
IntParams[0] = 1; // 1D
325+
IntParams[0] = 1;
326326
else if (OpenCLName.starts_with("image3d"))
327-
IntParams[0] = 2; // 2D
327+
IntParams[0] = 2;
328328
else if (OpenCLName == "image1d_buffer")
329329
IntParams[0] = 5; // Buffer
330330
else

0 commit comments

Comments
 (0)