Skip to content

GS/GL: Drop requirement for GLAD_GL_ARB_draw_buffers_blend.#14236

Open
lightningterror wants to merge 1 commit intomasterfrom
gs_gl_function_pointers_support
Open

GS/GL: Drop requirement for GLAD_GL_ARB_draw_buffers_blend.#14236
lightningterror wants to merge 1 commit intomasterfrom
gs_gl_function_pointers_support

Conversation

@lightningterror
Copy link
Copy Markdown
Contributor

@lightningterror lightningterror commented Mar 31, 2026

Description of Changes

GS/GL: Drop requirement for GLAD_GL_ARB_draw_buffers_blend.
Currently we don't use hw blend on individual render targets so we can revert to old behavior while keeping compatibility with older drivers.

Rationale behind Changes

Fixes crashes on older Mesa drivers on llvmpipe sw, might help other drivers/gpus that we don't know about.

Suggested Testing Steps

Try the latest release from:
https://fdossena.com/?p=mesa/index.frag
see if it crashes on windows on gl.

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

No.

@TellowKrinkle
Copy link
Copy Markdown
Member

I pulled up the mesa you linked in a decompiler and it definitely contains a glBlendFuncSeparatei, so you might want to look into why that isn't getting loaded properly.
image

@TheLastRar
Copy link
Copy Markdown
Contributor

glBlendFuncSeparatei is listed as available in GL4.0 and newer.
GLAD doesn’t attempt to load it (or any GL4.0 function) if the reported GL version is too old.
The linked MESA build reports GL3.3.

A suffixed version of glBlendFuncSeparatei (glBlendFuncSeparateiARB) is loaded if GL_ARB_draw_buffers_blend is reported (as is the case with the linked MESA build).

@lightningterror lightningterror force-pushed the gs_gl_function_pointers_support branch from 2cc6249 to 88692d5 Compare April 1, 2026 14:03
@lightningterror lightningterror changed the title GS/GL: Check if function pointers are actually supported for extensions. GS/GL: Better handle GLAD_GL_ARB_draw_buffers_blend support. Apr 1, 2026
@lightningterror
Copy link
Copy Markdown
Contributor Author

At least it doesn't have vendor specific variants, anyway thanks for checking, cleaned/updated the code.

@lightningterror
Copy link
Copy Markdown
Contributor Author

lightningterror commented Apr 1, 2026

It seems that #13631 introduced back GLAD_GL_ARB_draw_buffers_blend support, @TJnotJT do we have any use case for it, otherwise we can switch back to the old ones, I also remember AMD pre Adrenalin era having issues with GLAD_GL_ARB_draw_buffers_blend not working properly while being supported.

@TJnotJT
Copy link
Copy Markdown
Contributor

TJnotJT commented Apr 1, 2026

@lightningterror Yes, GLAD_GL_ARB_draw_buffers_blend is used for depth-as-rt feedback since we need to disable blending on the depth RT separately from the color RT. If there is a way to check for issues with GLAD_GL_ARB_draw_buffers_blend, depth feedback could be disabled in such cases.

@lightningterror lightningterror requested a review from TJnotJT April 2, 2026 00:07
Currently we don't use hw blend on individual render targets
so we can revert to old behavior while keeping compatibility
with older drivers.
@lightningterror lightningterror force-pushed the gs_gl_function_pointers_support branch from 16d296b to a5643a8 Compare April 4, 2026 03:55
@lightningterror lightningterror changed the title GS/GL: Better handle GLAD_GL_ARB_draw_buffers_blend support. GS/GL: Drop requirement for GLAD_GL_ARB_draw_buffers_blend. Apr 4, 2026
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.

4 participants