[llvm-branch-commits] [clang] [HLSL] Implement Texture2D::Load methods and builtin (PR #185708)

Helena Kotas via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Mar 10 19:24:03 PDT 2026


================
@@ -0,0 +1,55 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -emit-llvm -disable-llvm-passes -finclude-default-header -o - %s | llvm-cxxfilt | FileCheck %s --check-prefixes=CHECK,DXIL
+// RUN: %clang_cc1 -triple spirv-vulkan-library -x hlsl -emit-llvm -disable-llvm-passes -finclude-default-header -o - %s | llvm-cxxfilt | FileCheck %s --check-prefixes=CHECK,SPIRV
+
+Texture2D<float4> t;
----------------
hekota wrote:

Consider using `Texture<float3>` just to make sure the return type matches the element type, unlike the Gather case. 

https://github.com/llvm/llvm-project/pull/185708


More information about the llvm-branch-commits mailing list