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
spirv-opt: debugprintf instrumentation reports "Mixed stage shader module not supported" #4892
Comments
Yes. |
Okay, cool. Then I might poke around here and see if I can detect common function calls. I'm a little unfamiliar with the code here, but I figure I should be able to work it out. If I can get that working, I can open a PR here. :) |
There is a function that traverses the call tree of an entry point function. From that you can build a set of ids of functions that are called. From that, you can do an intersection on the function sets of two entry points. |
Remove stage specific debug info that is only needed by GPU-AV. This allows debug printfs to be used in multi stage shader modules. Fixes KhronosGroup#4892
Remove stage specific debug info that is only needed by GPU-AV. This allows debug printfs to be used in multi stage shader modules. Fixes KhronosGroup#4892
Remove stage specific debug info that is only needed by GPU-AV. This allows debug printfs to be used in multi-stage shader modules. Fixes KhronosGroup#4892
This is a continuation of the issue over on the Vulkan Validation Layers repo here: KhronosGroup/Vulkan-ValidationLayers#4350
A quick summary is that I'd like to support printf with multiple entry points. This should be doable so long as no entry point calls a common function (which is true if --inline-entry-points-exhaustive is used, which is included by default as part of the -o0 flag).
I believe the code that needs changing is here:
SPIRV-Tools/source/opt/instrument_pass.cpp
Lines 968 to 991 in 0a43a84
So, I believe the logic there should instead ask "do any entry points call a common function? if so, disable printf instrumentation."
@greg-lunarg does that seem right?
The text was updated successfully, but these errors were encountered: