Skip to content

GS/GL/DX11: Backport multidraw fb copy from DX11 to GL, and some DX11 cleanup.#14243

Merged
lightningterror merged 4 commits intomasterfrom
gs_gl_multidraw_fb_copy
Apr 4, 2026
Merged

GS/GL/DX11: Backport multidraw fb copy from DX11 to GL, and some DX11 cleanup.#14243
lightningterror merged 4 commits intomasterfrom
gs_gl_multidraw_fb_copy

Conversation

@lightningterror
Copy link
Copy Markdown
Contributor

@lightningterror lightningterror commented Apr 2, 2026

Description of Changes

GS/DX11: Cleanup some multidraw fb copy code.
Remove skip first barrier check, rely on the one barrier parameter being set to false. Other misc cleanup.

GS/GL: Backport multidraw fb copy from DX11.
Will be used when GL_ARB_texture_barrier isn't supported.
Can also be used for Depth as RT feedback loops.

GS/DX11: Check if Depth feedback is enabled before making a copy.

GS/GL: Backport multidraw fb copy for depth feedbacks.

Rationale behind Changes

Fallback method when texture barriers aren't supported, alternative accuracy means.

Suggested Testing Steps

Needs #14234 merged first, then do the same testing posted in that pr using the dumps and mesa llvmpipe sw renderer.

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

No.

@TJnotJT
Copy link
Copy Markdown
Contributor

TJnotJT commented Apr 2, 2026

Can also be used for Depth as RT feedback loops. Depth as RT feedback loops isn't implemented yet.

If multidraw FB copy is enabled, we could do copies on the depth buffer directly (instead of depth as RT), so that part could also be backported from DX11.

Of course, the depth feedback mode might have to be overridden in the feature check, if it's enabled.

@lightningterror lightningterror force-pushed the gs_gl_multidraw_fb_copy branch from bd78b76 to 0c89542 Compare April 3, 2026 19:02
@lightningterror
Copy link
Copy Markdown
Contributor Author

Done, backported the changes.

@lightningterror lightningterror force-pushed the gs_gl_multidraw_fb_copy branch from 0c89542 to 8778fc9 Compare April 3, 2026 21:53
@lightningterror lightningterror force-pushed the gs_gl_multidraw_fb_copy branch 2 times, most recently from c4160dc to b562ac7 Compare April 3, 2026 23:53
@lightningterror lightningterror changed the title GS/GL: Backport multidraw fb copy from DX11. GS/GL/DX11: Backport multidraw fb copy from DX11 to GL, and some DX11 cleanup. Apr 3, 2026
Remove skip first barrier check, rely on the one barrier parameter being set to false.
Other misc cleanup.
Will be used when GL_ARB_texture_barrier  isn't supported.
Can also be used for Depth feedback loops.
@lightningterror lightningterror force-pushed the gs_gl_multidraw_fb_copy branch from b562ac7 to 8f1f631 Compare April 4, 2026 00:46
Copy link
Copy Markdown
Contributor

@TJnotJT TJnotJT left a comment

Choose a reason for hiding this comment

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

Changes look good, haven't tested.

@lightningterror
Copy link
Copy Markdown
Contributor Author

lightningterror commented Apr 4, 2026

Dump run on gl is fine, also smoke tested some dumps that need sw blend and depth feedback and they work on mesa.

Gonna merge since it should be fine, I also have other pending changes and open prs.

@lightningterror lightningterror merged commit 2c608b4 into master Apr 4, 2026
25 checks passed
@lightningterror lightningterror deleted the gs_gl_multidraw_fb_copy branch April 4, 2026 02:27
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