rendering: avoid primitive restart for Lua VAO model submissions - #3156
Open
Kitrae wants to merge 1 commit into
Open
rendering: avoid primitive restart for Lua VAO model submissions#3156Kitrae wants to merge 1 commit into
Kitrae wants to merge 1 commit into
Conversation
Kitrae
marked this pull request as ready for review
July 31, 2026 20:27
Collaborator
|
Hmm I do wonder why this was here in the first place... is it vestigial or there for some good reason (that we need to make sure is fixed in some other way)? Good find nonetheless! |
Author
From what i can actually tell, Primitive restart was added to the generic |
Author
|
hoping this could get approved? |
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 changed:
LuaVAOImpl::Submit()no longer enables primitive restart around model multi draw submissions.The regular
LuaVAOImpl::DrawElements()path is unchanged and continues to support the primitive restart.Why:
Lua VAO model submissions use ordinary triangle lists and dont contain primitive restart indices.
Enabling primitive restart caused Zink to enter an extremely slow path when BARS custom unit shaders were active. Model rendering dropped the game to roughly 2-4 fps.
Removing the unnecessary state avoids that bottleneck without disabling CUS, changing any shaders, or introducing a zink specific fallback.
Tested:
Zink: BAR loaded with CUS enabled and full shaders, then rendered models without the previous severe framerate hit.
Native OpenGL on NVIDIA: CUS initialized, compiled, and rendered successfully.
RelWithDebInfo engine build completed