OGL: do not call glMemoryBarrier when ARB_shader_image_load_store is missing - #467
Merged
Merged
Conversation
…missing OGLBoundingBox::Read calls glMemoryBarrier on the non-GLES path, but that entry point comes from ARB_shader_image_load_store. On a desktop context below GL 4.2 the pointer is null, while bSupportsBBox can still be true because it is set from bSupportsFragmentStoresAndAtomics. Saving a state reads the bounding box and calls the null pointer. Add bSupportsImageLoadStore to the condition, the same check UsePersistentStagingBuffers() in OGLTexture.cpp already uses for that function. Drivers without it fall to the glMapBufferRange path below.
Collaborator
|
Please make this PR to dolphin-emu as its a core bug if it is one as well. |
Author
|
Yes, submitted there too: dolphin-emu#14803 |
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.
Fixes #466.
OGLBoundingBox::ReadcallsglMemoryBarrieron the non-GLES path, but thatentry point comes from ARB_shader_image_load_store. On a desktop context below
GL 4.2 the pointer is null, while
bSupportsBBoxcan still be true because itis set from
bSupportsFragmentStoresAndAtomics. Saving a state reads thebounding box and calls the null pointer.
This adds
bSupportsImageLoadStoreto the condition, the same checkUsePersistentStagingBuffers()in OGLTexture.cpp already uses for thatfunction. Drivers without it fall to the
glMapBufferRangepath below.Tested on Mesa v3d (Raspberry Pi 5, GL 3.1), where saving a state segfaulted
every time and now saves and loads a 55 MB state repeatedly. I have no other
GL 3.1 hardware to check it against.