[all-commits] [llvm/llvm-project] 8c5bd3: [HLSL] Implement Texture2D::mips[][]

Steven Perron via All-commits all-commits at lists.llvm.org
Thu Mar 12 08:20:23 PDT 2026


  Branch: refs/heads/users/s-perron/texture2d-mips
  Home:   https://github.com/llvm/llvm-project
  Commit: 8c5bd3dbfbdebb2af0a640c8fcb44cf68d9ef120
      https://github.com/llvm/llvm-project/commit/8c5bd3dbfbdebb2af0a640c8fcb44cf68d9ef120
  Author: Steven Perron <stevenperron at google.com>
  Date:   2026-03-12 (Thu, 12 Mar 2026)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/SemaHLSL.h
    M clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.cpp
    M clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.h
    M clang/lib/Sema/HLSLExternalSemaSource.cpp
    M clang/lib/Sema/SemaHLSL.cpp
    M clang/test/CodeGenHLSL/resources/Texture2D-Gather.hlsl
    A clang/test/CodeGenHLSL/resources/Texture2D-Mips.hlsl
    M clang/test/CodeGenHLSL/resources/Texture2D-Sample.hlsl
    M clang/test/CodeGenHLSL/resources/Texture2D-SampleBias.hlsl
    M clang/test/CodeGenHLSL/resources/Texture2D-SampleCmp.hlsl
    M clang/test/CodeGenHLSL/resources/Texture2D-SampleGrad.hlsl
    M clang/test/CodeGenHLSL/resources/Texture2D-SampleLevel.hlsl
    M clang/test/CodeGenHLSL/resources/Texture2D-default-explicit-binding.hlsl
    M clang/test/CodeGenHLSL/resources/Texture2D-default.hlsl
    M clang/test/CodeGenHLSL/resources/Texture2D-shorthand-contexts.hlsl
    A clang/test/SemaHLSL/Texture2D-mips-errors.hlsl
    A clang/test/SemaHLSL/Texture2D-mips-errors.ll

  Log Message:
  -----------
  [HLSL] Implement Texture2D::mips[][]

We implement the Textur2D::mips[][] method. We follow the design in DXC.
There is a new member called `mips` with type mips_type. The member will
contain a copy of the handle for the texture.

The type `mips_type` will have a member function `operator[]` that takes
a level, and returns a `mips_slice_type`. The slice will contain the
handle and the level. It also has an operator[] member function that
take a coordinate. It will do a load from the handle with the level and
coordinate, and return that value.

Assisted-by: Gemini



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list