[PATCH] D130951: [HLSL] CodeGen hlsl resource binding.

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 14:20:50 PDT 2022


beanz accepted this revision.
beanz added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/CodeGen/CGHLSLRuntime.h:73
   CodeGenModule &CGM;
   uint32_t ResourceCounters[static_cast<uint32_t>(
       hlsl::ResourceClass::NumClasses)] = {0};
----------------
beanz wrote:
> The `ResourceCounters` here was a stand-in for allocating resource indices.
> 
> If you have a different path for allocating these, we shouldn't need the counter anymore. I'm a little concerned that it looks like you're not allocating these in code generation. Can you explain how you intend to allocate indices? Is there a reason not to do this in code gen?
Wait... I guess I actually fed the `ResourceCounter` to the ID, which is fine.

I don't like that we're not allocating the indices in codegen, but we can address that in a subsequent patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130951/new/

https://reviews.llvm.org/D130951



More information about the llvm-commits mailing list