[all-commits] [llvm/llvm-project] 825e71: [HLSL] cbuffer: create host layout structs (#122820)

Helena Kotas via All-commits all-commits at lists.llvm.org
Fri Jan 24 10:24:31 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 825e712959d48f14b47e579871bcf9b5e25fff7a
      https://github.com/llvm/llvm-project/commit/825e712959d48f14b47e579871bcf9b5e25fff7a
  Author: Helena Kotas <hekotas at microsoft.com>
  Date:   2025-01-24 (Fri, 24 Jan 2025)

  Changed paths:
    M clang/lib/Sema/SemaHLSL.cpp
    R clang/test/AST/HLSL/ast-dump-comment-cbuffe-tbufferr.hlsl
    A clang/test/AST/HLSL/ast-dump-comment-cbuffer-tbuffer.hlsl
    A clang/test/AST/HLSL/cbuffer.hlsl
    A clang/test/AST/HLSL/cbuffer_and_namespaces.hlsl
    R clang/test/AST/HLSL/cbuffer_tbuffer.hlsl
    M clang/test/AST/HLSL/pch_hlsl_buffer.hlsl

  Log Message:
  -----------
  [HLSL] cbuffer: create host layout structs (#122820)

Creates layout struct for `cbuffer` in Sema which will contains only
declarations contributing to the constant buffer layout. Anything else
will be filtered out, such as static variables decls, struct and
function definitions, resources, or empty struct and zero-sized arrays.

If the constant buffer includes a struct that contains any of the above
undesirable declarations, a new version of this struct should be created
with these declarations filtered out as well.

The definition of buffer layout struct will be added to the
HLSLBufferDecl AST node as the last node. Any layout structs for
embedded structures will be added there as well.

Fixes #122553



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