================
@@ -5132,7 +5132,45 @@ void
SemaHLSL::handleGlobalStructOrArrayOfWithResources(VarDecl *VD) {
}
}
+bool SemaHLSL::CheckForMipsIntermediateType(QualType T, SourceLocation Loc) {
----------------
Keenuts wrote:
Seems like there is a way to go around this and fail with a crash:
```hlsl
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-pixel -x hlsl -emit-llvm -O3
-finclude-default-header -o - %s | llvm-cxxfilt | FileCheck %s
--check-prefixes=CHECK,DXIL
Texture2D<float4> t;
template<typename T>
float4 foo(T t) {
return t[int2(0, 0)];
}
[shader("pixel")]
float4 test_mips() : SV_Target {
return t.mips[0][int2(0, 0)] + foo(t.mips[0]);
}
```
https://github.com/llvm/llvm-project/pull/186143
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits