[clang] [HLSL] Implement Texture2D::mips[][] (PR #186143)

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 23 13:07:13 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 53365 tests passed
* 1040 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.CodeGenHLSL/resources/Texture2D-Mips.hlsl</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -triple dxil-pc-shadermodel6.0-pixel -x hlsl -emit-llvm -disable-llvm-passes -finclude-default-header -o - C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl | llvm-cxxfilt | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl --check-prefixes=CHECK,DXIL
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -triple dxil-pc-shadermodel6.0-pixel -x hlsl -emit-llvm -disable-llvm-passes -finclude-default-header -o - 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl'
# note: command had no output on stdout or stderr
# executed command: llvm-cxxfilt
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl' --check-prefixes=CHECK,DXIL
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl:7:11: error: CHECK: expected string not found in input
# | // CHECK: %[[LOC_ADDR:.*]] = alloca <2 x float>, align 8
# |           ^
# | <stdin>:56:7: note: scanning from here
# | entry:
# |       ^
# | <stdin>:57:6: note: possible intended match here
# |  %loc.addr = alloca <2 x float>, align 4
# |      ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           51:  ret void 
# |           52: } 
# |           53:  
# |           54: ; Function Attrs: alwaysinline convergent mustprogress norecurse nounwind 
# |           55: define internal noundef nofpclass(nan inf) <4 x float> @test_mips(float vector[2])(<2 x float> noundef nofpclass(nan inf) %loc) #1 { 
# |           56: entry: 
# | check:7'0           X error: no match found
# |           57:  %loc.addr = alloca <2 x float>, align 4 
# | check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:7'1          ?                                    possible intended match
# |           58:  %ref.tmp = alloca %"struct.hlsl::Texture2D<>::mips_slice_type", align 4 
# | check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           59:  store <2 x float> %loc, ptr %loc.addr, align 4 
# | check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           60:  call void @hlsl::Texture2D<float vector[4]>::mips_type::operator[](int) const(ptr dead_on_unwind writable sret(%"struct.hlsl::Texture2D<>::mips_slice_type") align 4 %ref.tmp, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds nuw (i8, ptr @t, i32 4), i32 noundef 0) #6 
# | check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           61:  %0 = load <2 x float>, ptr %loc.addr, align 4 
# | check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           62:  %conv = fptosi <2 x float> %0 to <2 x i32> 
# | check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            .
# |            .
# |            .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the cfe-commits mailing list