|
@@ -647,6 +647,10 @@ const SpirvType *LowerTypeVisitor::lowerResourceType(QualType type,
|
|
{ // Texture types
|
|
{ // Texture types
|
|
spv::Dim dim = {};
|
|
spv::Dim dim = {};
|
|
bool isArray = {};
|
|
bool isArray = {};
|
|
|
|
+ // Disable depth hint because of driver issues
|
|
|
|
+ ImageType::WithDepth depth = spvOptions.disableImageTypeDepthHint
|
|
|
|
+ ? ImageType::WithDepth::No
|
|
|
|
+ : ImageType::WithDepth::Unknown;
|
|
if ((dim = spv::Dim::Dim1D, isArray = false, name == "Texture1D") ||
|
|
if ((dim = spv::Dim::Dim1D, isArray = false, name == "Texture1D") ||
|
|
(dim = spv::Dim::Dim2D, isArray = false, name == "Texture2D") ||
|
|
(dim = spv::Dim::Dim2D, isArray = false, name == "Texture2D") ||
|
|
(dim = spv::Dim::Dim3D, isArray = false, name == "Texture3D") ||
|
|
(dim = spv::Dim::Dim3D, isArray = false, name == "Texture3D") ||
|
|
@@ -683,7 +687,7 @@ const SpirvType *LowerTypeVisitor::lowerResourceType(QualType type,
|
|
return spvContext.getImageType(
|
|
return spvContext.getImageType(
|
|
lowerType(getElementType(astContext, sampledType), rule,
|
|
lowerType(getElementType(astContext, sampledType), rule,
|
|
/*isRowMajor*/ llvm::None, srcLoc),
|
|
/*isRowMajor*/ llvm::None, srcLoc),
|
|
- dim, ImageType::WithDepth::Unknown, isArray,
|
|
|
|
|
|
+ dim, depth, isArray,
|
|
/*isMultiSampled=*/false, /*sampled=*/ImageType::WithSampler::No,
|
|
/*isMultiSampled=*/false, /*sampled=*/ImageType::WithSampler::No,
|
|
format);
|
|
format);
|
|
}
|
|
}
|