Skip to content

GS: Add utility functions for vertices/quads.#14240

Open
TJnotJT wants to merge 1 commit intoPCSX2:masterfrom
TJnotJT:gs-vertex-funcs
Open

GS: Add utility functions for vertices/quads.#14240
TJnotJT wants to merge 1 commit intoPCSX2:masterfrom
TJnotJT:gs-vertex-funcs

Conversation

@TJnotJT
Copy link
Copy Markdown
Contributor

@TJnotJT TJnotJT commented Apr 1, 2026

Description of Changes

Add utility functions for vertices/quads:

  • Functions to extract fields of a GSVertex into GSVector4/GSVector4i.
  • Functions to detect quads, get their window/texture coords, and get the bounds of rasterized points.

Rationale behind Changes

To reduce code duplication and organize commonly used functionality.

Different parts of the renderers reimplement some of this functionality (e.g. triangles-as-quads detection and overlap draw list computation), so they could be refactored to use these functions.

Suggested Testing Steps

Currently, none of the functions are used, so they could be just checked for correctness.

I've done a few ad hoc tests to make sure they behave as expected.

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

No.

Copy link
Copy Markdown
Contributor

@Mrlinkwii Mrlinkwii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smoke test was fine on linux on HW renderers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants