llvm-project
27a96b31 - [Hlsl][Spirv] Don't emit global variables for structs containing just resources (#234797)

Commit
11 days ago
[Hlsl][Spirv] Don't emit global variables for structs containing just resources (#234797) For global, non-static instances of a struct containing resources, we end up splitting these recursively into separate global variables for each resource, and for numeric members these go into the default $globals cbuffer. For this change, when there's a instance of a struct (or array of) containing only resources, skip emitting a global variable for the struct. Before, it would emit external linkage globals of these which would not get removed. based on https://github.com/llvm/wg-hlsl/blob/main/proposals/0038-resources-in-structs.md improves #194435 assisted by: codex
Author
Parents
Loading