-
Notifications
You must be signed in to change notification settings - Fork 566
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
SPIR-V -> HLSL : cross compiling bindings overlap #2064
Comments
Would need similar hacks as MSL where multiple OpVariables alias the same binding. This breaks down if different qualifiers like globallycoherent are applied though. Textures won't work here. Need to stamp out different space variables that application root signature must resolve. Descriptor aliasing really isn't feasible with HLSL. |
I've checked MSL codegen and it doesn't look quite right: In generated shader there is an issue: buffer now consumes multiple bind-points, what is a problem for engine (and also defeat the purpose of feature). Proposed change (buffers only): HLSL merge qualifiers:
Overlap of multiple uniform buffers, can be compiled as: cbuffer M : register(b0)
{
uint _data_16_26[MAX_OF_SIZES/4];
};
static const A _16 = (A)_data_16_26; // need to be careful about structure declaration, assuming tight packing here
static const B _26 = (B)_data_16_26; MSL use
|
Simple reproducer:
Been cross-compiled to HLSL as:
Seemingly there is 'simple' solution for SSBO - to use only a single binding. However, I don't know, if there is a solution for textures.
Any opinions on should this be implemented in any way or not? Thanks!
The text was updated successfully, but these errors were encountered: