-
Notifications
You must be signed in to change notification settings - Fork 166
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
Register re-use between shader stages with different layouts. #38
Comments
Assuming the two files are being passed together in the same "compile request" the intended behavior (not yet implemented) is:
Note that this kind of issue is only likely to come up when compiling from multiple files (one file per entry point) instead of a single file with multiple entry points. The latter is the preferred style for Slang, and is probably the most familiar to HLSL users. |
The basic behavior that was requested was implemented in #93, just with a warning instead of an error in the first of the two cases:
There's still some work to be done here:
|
Closes shader-slang#38 - Change overlapping bindings case from error to warning (it is *technically* allowed in HLSL/GLSL) - Make diagnostic messages for these cases include a note to point at the "other" declaration in each case, so that user can more easily isolate the problem - Unrelated fix: make sure `slangc` sets up its diagnostic callback *before* parsing command-line options so that error messages output during options parsing will be visible - Unrelated fix: make sure that formatting for diagnostic messages doesn't print diagnostic ID for notes (all have IDs < 0). - Note: eventually I'd like to not print diagnostic IDs at all (I think they are cluttering up our output), but doing that requires touching all the test cases...
Improve diagnostics for overlapping/conflicting bindings
I'm reusing a register between two shader stages, with different layouts and names,
Is this supposed to be an error?
VS.vs.txt
PS.ps.txt
The text was updated successfully, but these errors were encountered: