Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the register assignment collision across shader stages #6983

Open
ttcvetkov opened this issue Oct 24, 2024 · 0 comments
Open

the register assignment collision across shader stages #6983

ttcvetkov opened this issue Oct 24, 2024 · 0 comments

Comments

@ttcvetkov
Copy link

For example:
My vertex shader use cbuffer 'A' it get assign to register b0. At the same time, my pixel shader use cbuffer 'B' and after compilation it get assign to the same register b0.
As i can see, in order to resolve the collision i have a few options.

1.) use old school binding model. One descriptor table per stage ( VS / PS... ) with D3D12_SHADER_VISIBILITY flag.
2.) explicit register assignment in HLSL ( : register( b0 )... etc ). One descriptor table for all stages.
3.) bindless rendering

IMHO, all three is not a option for me.
So, the question is. Is there anyway to compile HLSL for specific shader stage with regards to previous shader stage inorder to resolve register collision?

My vertex shader use cbuffer 'A' it get assign to register b0. When time gets to compile pixel shader, somehow to pass to compiler a memory blob from previous stage, then cbuffer 'B' will get assign to the next free register b1 in my case.
In this case, i can put all my handles in one descriptor table for all stages.

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant