Skip to content

GS/HW: Allow swapping indices to handle provoking vertex first APIs.#13672

Draft
TJnotJT wants to merge 2 commits intoPCSX2:masterfrom
TJnotJT:gs-provoking-first-swap-index
Draft

GS/HW: Allow swapping indices to handle provoking vertex first APIs.#13672
TJnotJT wants to merge 2 commits intoPCSX2:masterfrom
TJnotJT:gs-provoking-first-swap-index

Conversation

@TJnotJT
Copy link
Copy Markdown
Contributor

@TJnotJT TJnotJT commented Dec 8, 2025

Status

Draft until dump run on DX completed.

Description of Changes

  1. Allows swapping indices in certain cases instead of de-indexing/copying the whole vertex queue when we are drawing flat shaded primitives with a graphics API that only supports provoking vertex first (i.e., DX11, DX12).
  2. Small refactor to put the handling in GSRendererHW::SetupIA().

Rationale behind Changes

Avoids doing an extra copy of the whole vertex queue when its not needed.

Suggested Testing Steps

Testing DX11 and/or DX12 on a variety of games would be helpful.

Did you use AI to help find, test, or implement this issue or feature?

No.

Credits

Approach suggested by TellowKrinkle.

@TheLastRar
Copy link
Copy Markdown
Contributor

Fixes a regression with d136b homebrew that got introduced with #12986

@TJnotJT
Copy link
Copy Markdown
Contributor Author

TJnotJT commented Dec 21, 2025

Fixes a regression with d136b homebrew that got introduced with #12986

That's good to know, just saw the related discussion on Discord.

@TJnotJT TJnotJT force-pushed the gs-provoking-first-swap-index branch from c7f1eae to 4975bcf Compare April 1, 2026 22:40
TJnotJT added 2 commits April 6, 2026 22:05
Avoids doing an extra copy of the whole vertex queue when its not needed.

Approach suggested by TellowKrinkle.
@TJnotJT TJnotJT force-pushed the gs-provoking-first-swap-index branch from 4975bcf to 53d3b7a Compare April 7, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants