Skip to content

How to get the correct Binding Space for Parameter Block? #7646

Answered by mkeshavaNV
LJFYC007 asked this question in Q&A
Discussion options

You must be logged in to vote

The problem is that when you call getBindingSpace() on a parameter block, it's likely returning 0 because it's looking at the wrong resource kind. Parameter blocks in Slang use a special resource kind called SubElementRegisterSpace to manage their binding spaces, which is different from regular parameters. Can you try:
auto space = varLayout->getOffset(LayoutResourceKind::SubElementRegisterSpace);

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by LJFYC007
Comment options

You must be logged in to vote
2 replies
@mkeshavaNV
Comment options

@LJFYC007
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants