Make the OpenGL (Classic) renderer work on OpenGL 3.1#2642
Open
FireNX70 wants to merge 2 commits into
Open
Conversation
Member
|
sure, why not! we'll see what the CI says, what the team says, etc |
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.
All shaders were already using version 140, which corresponds to OGL 3.1. None of them seem to be using any extensions introduced into the core spec in 3.2, as far as I can tell.
My first go at checking whether the CPU side was calling any functions introduced into the core standard in 3.2 turned up none. Testing showed glFramebufferTexture (which neither Mesamatrix nor this mention) was a problem. Using glFramebufferTexture2D with a GL_TEXTURE_2D textarget seems to work just as well, difference being glFramebufferTexture2D does exist in OGL 3.1. Note that glFramebufferTextureLayer DOES exist in 3.1 (in fact, it's existed since 3.0), so those calls were fine as they were.
With this, MelonDS can use OpenGL 3.1 instead of 3.2; so Panfrost will now work.
This only affects the conventional OpenGL renderer; the compute renderer is, of course, a whole 'nother story.
Testing on radeonsi turned up no regressions (the conventional OpenGL renderer does show some artifacting in some games, but it's already there in master, I'll open an issue for that later).