''register(ID, space)'' like register(t3, space1) will be translated into
i32 3, i32 1 as the last 2 operands for resource annotation metadata.
NamedMetadata for CBuffers and SRVs are added as "hlsl.srvs" and "hlsl.cbufs".
Differential D130951
[HLSL] CodeGen hlsl resource binding. python3kgae on Aug 1 2022, 4:42 PM. Authored by
Details ''register(ID, space)'' like register(t3, space1) will be translated into NamedMetadata for CBuffers and SRVs are added as "hlsl.srvs" and "hlsl.cbufs".
Diff Detail
Event Timeline
Comment Actions Rename ResBinding and addResourceAnnotation to BufferResBinding and addBufferResourceAnnotation.
Comment Actions Add resource shape to metadata.
|
Does this apply to buffers only? In which case it might be better to either nest this into Buffer definition or rename into something like BufferResBinding. Also adding some documenting comments would help here, even if they could just refer to the language documentation.