Repository navigation
vk_shaders: rename the reflected entry point, not 'main' (MARVEL Cosmic Invasion) - #2597
Open
bensaadmucret wants to merge 1 commit into
Open
bensaadmucret wants to merge 1 commit into
bensaadmucret wants to merge 1 commit into
Conversation
…ic Invasion) SPIRV-Cross refused a module whose entry point is not named main: 'Entry point does not exist.' SDL_GPU's SPIR-V names its entry points ShaderFunction1 / ShaderFunction2, so MARVEL Cosmic Invasion's whole capture failed to translate. The reflection already reads the name (eps[0]); --rename-entry-point now takes it and falls back to 'main' only when the reflection names none. Checked: MARVEL Cosmic Invasion's four captured modules (2 vertex ShaderFunction1, 2 fragment ShaderFunction2) translate to vk_shaders.metallib and draw in a window at 60 FPS.
bensaadmucret
force-pushed
the
pr-vk-entry-point
branch
from
November 14, 2026 13:59
b322418 to
f3a8cb8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
vk_shaders.pystopped on a captured SPIR-V module withspirv-cross failed: Entry point does not exist: the translate command passed--rename-entry-point main vk_<key> <stage>, but SDL_GPU names its entry pointsShaderFunction1,ShaderFunction2, … — there is nomainto rename.The reflected entry point's name (
eps[0]of the--reflectoutput, already read for the stage) is passed instead, withmainkept as the fallback when the reflection names none.Adds the finding to docs/reference/rendering.md (Vulkan layer: SPIR-V entry points that are not
main).Checked
python3 -m unittest dm.tools.tests.test_docs(6 tests)010059D020C26000v0 (buildD6A37DEAFF3F5AEA, provisional profile): its four captured modules (entry pointsShaderFunction1/ShaderFunction2) failed translation before and translate after; the resultingvk_shaders.metallibis what the game draws with at 60 fpsvk_shaders.pyruns on each captured module; a module whose entry point ismaingets the same command as before.Docs
docs/reference/<subsystem>.mdentry, andpython3 dm/tools/docs_symptoms.pywas run (the symptom index)dmsh_chain.py --headerwas run anddm/gfx/nvn/dmsh_chain.his part of the change