-
Notifications
You must be signed in to change notification settings - Fork 854
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
--auto-map-locations gets disabled when linking mutiple shaders #1309
Comments
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
We will want to discuss multiple stages independently from multiple compilation units for the same stage. There are definite holes, depending on what you want to do, but it will help to be clear which category:
|
This is the second category, ie linking multiple compilation units together into a single stage. For example, if I have this in one file called
And then I have this almost empty second file in
And then I link them together into a single fragment module like this:
Then the color_out variable doesn’t get a Location decoration. If I leave out the |
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
I am looking now at multiple compilation units for compiling to SPIR-V rather than just validating. There are a few fundamental issues to overcome. |
FYI: #1446 Includes the hard part for fixing up symbol IDs. |
I've considered a few paths here, and it seems the most general case (due to API usage, not to command-line usage) is to keep all this state per compilation unit, as it currently is, and just include the missing ones in the merge. There is a PR on the way that does this, but does not yet have a broad test suite. |
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
Hi, I found some crashes, and doing git-bisect, they started with this commit:
So for example, this crash if you use the following two vertex shaders: 1.vert
And 2.vert:
We get a crash when using --aml:
Without --aml, it just fails, due missing locations. And just in case it is interesting, the bt I got is this:
Not sure if I should open a new issue, or let this comment here to re-open this one. |
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
This reverts commit b617e14. This was the upstream fix for KhronosGroup#1309 But it caused regressions (crashes) while converting some tests, like this: tests/spec/arb_arrays_of_arrays/linker/intrastage-interface.shader_test So for now we are keeping our downstream fix: "Copy config when creating a TIntermediate for a compilation unit"
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
This reverts commit b617e14. This was the upstream fix for KhronosGroup#1309 But it caused regressions (crashes) while converting some tests, like this: tests/spec/arb_arrays_of_arrays/linker/intrastage-interface.shader_test So for now we are keeping our downstream fix: "Copy config when creating a TIntermediate for a compilation unit"
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
This reverts commit b617e14. This was the upstream fix for KhronosGroup#1309 But it caused regressions (crashes) while converting some tests, like this: tests/spec/arb_arrays_of_arrays/linker/intrastage-interface.shader_test So for now we are keeping our downstream fix: "Copy config when creating a TIntermediate for a compilation unit"
Without this --auto-map-locations effectively gets disabled when there are more than one compilations units for a stage. This is kind of a hacky fix and I think there should be a better way to do it. See: KhronosGroup#1309
This reverts commit b617e14. This was the upstream fix for KhronosGroup#1309 But it caused regressions (crashes) while converting some tests, like this: tests/spec/arb_arrays_of_arrays/linker/intrastage-interface.shader_test So for now we are keeping our downstream fix: "Copy config when creating a TIntermediate for a compilation unit"
I have just tested master, and it seems that this is not a issue anymore. I didn't check when this stopped to be a problem, but I don't think that we need to really check that. I think that it is ok to close the issue. |
If you pass in multiple shader sources on the command line then --auto-map-locations gets disabled.
It looks like a bunch of configuration state from the command line, including --aml, is set on the
TIntermediate
for a shader inCompileAndLinkShaderUnits
inStandAlone.cpp
. However inTProgram::linkStage
when there are multiple compilation units it creates a newTIntermediate
to compile each one and this configuration state is not copied over.Perhaps the configuration state within
TIntermediate
could be stored in a struct with a convenient way to copy it to a new intermediate. Or maybe global configuration state from the command line should be stored somewhere else where it is globally accessible.The text was updated successfully, but these errors were encountered: