[HLSL] [HLSL] Translate cbuffer {...}
declarations to target type dx.CBuffer
for simple cases with no arrays or embedded structs
#118531
Labels
HLSL
HLSL Language Support
Implement
cbuffer
codegen for simple constant buffers that have no arrays or embedded structs. The constant buffer will be translated to LLVM target typetarget("dx.CBuffer", ...)
and should include the cbuffer type, size, and a sequence of numbers specifying the layout (list of offset for each field).For example:
will be translated to
target("dx.CBuffer", { <2 x float>, [2 x float], i32}, 32, 0, 8, 16)
.Note that this might not be the final way how we are going to encode the constant buffer layout. They way to encode layout of constant buffers that contain arrays and embedded structures is still TBD and might change how the simple case is encoded as well.
Doing the simple case first will unblock tasks that are dependent of cbuffer codegen: #104862, #114126, #112992
The text was updated successfully, but these errors were encountered: