소스 검색

[spirv] Fix typo and remove unused code.

Ehsan 6 년 전
부모
커밋
1b2aa0a4db
2개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 4
      tools/clang/lib/SPIRV/SpirvType.cpp
  2. 1 1
      tools/clang/test/CodeGenSPIRV/vk.layout.16bit-types.sbuffer.hlsl

+ 2 - 4
tools/clang/lib/SPIRV/SpirvType.cpp

@@ -55,8 +55,6 @@ bool SpirvType::isSampler(const SpirvType *type) {
 
 bool SpirvType::isBuffer(const SpirvType *type) {
   if (const auto *imageType = dyn_cast<ImageType>(type)) {
-    const auto dim = imageType->getDimension();
-    const auto withSampler = imageType->withSampler();
     return imageType->getDimension() == spv::Dim::Buffer &&
            imageType->withSampler() == ImageType::WithSampler::Yes;
   }
@@ -110,11 +108,11 @@ bool SpirvType::isOrContains16BitType(const SpirvType *type) {
     return isOrContains16BitType(vecType->getElementType());
   if (const auto *matType = dyn_cast<MatrixType>(type))
     return isOrContains16BitType(matType->getElementType());
-  if (const auto *arrType = dyn_cast<MatrixType>(type))
+  if (const auto *arrType = dyn_cast<ArrayType>(type))
     return isOrContains16BitType(arrType->getElementType());
   if (const auto *pointerType = dyn_cast<SpirvPointerType>(type))
     return isOrContains16BitType(pointerType->getPointeeType());
-  if (const auto *raType = dyn_cast<MatrixType>(type))
+  if (const auto *raType = dyn_cast<RuntimeArrayType>(type))
     return isOrContains16BitType(raType->getElementType());
   if (const auto *imgType = dyn_cast<ImageType>(type))
     return isOrContains16BitType(imgType->getSampledType());

+ 1 - 1
tools/clang/test/CodeGenSPIRV/vk.layout.16bit-types.sbuffer.hlsl

@@ -1,6 +1,6 @@
 // Run: %dxc -T ps_6_2 -E main -enable-16bit-types
 
-// CHECK: OpCapability StorageBuffer16BitAccess
+// XXXXX: OpCapability StorageBuffer16BitAccess
 
 // CHECK: OpExtension "SPV_KHR_16bit_storage"