Finalize MESA_map_buffer_client_pointer - #680
Merged
Merged
Conversation
Contributor
Author
|
It probably makes most sense to introduce a usage/flag to glBufferData/glBufferStorage to enable client pointer mapping for the buffer. I'll work on implementing this in Zink, where we can't remap. |
As discussed in PR (KhronosGroup#678), introduce a flag to specifiy whether all possibly client pointer ranges should be released, or just the one the driver isn't holding onto anymore, as releasing everything is slow and should be reserved for OOM situations. This changes the ABI, as PR (KhronosGroup#678) was merged before it was ready, and we don't yet have any consumers.
…tores. Enables the driver to pool resources with shared client range space into one BO. Otherwise implementations may have to either reshuffle memory at map-time, or support concurrent mappings for the same memory.
Guy1524
force-pushed
the
client_pointer_release_all
branch
from
July 29, 2026 13:10
6a1e65c to
c6e7072
Compare
Guy1524
marked this pull request as ready for review
July 29, 2026 13:24
Contributor
Author
|
Mesa/Zink implementation: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/43297 |
Contributor
Author
|
Looks good to me. |
zmike
approved these changes
Aug 3, 2026
Contributor
|
@oddhack please merge |
oddhack
added a commit
that referenced
this pull request
Aug 3, 2026
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.
Changes the ABI, as #678 was accidentally merged before ready, and there are no users of this extension yet.
Add RELEASE_ALL flag previously discussed (Add MESA_map_buffer_client_pointer. #678 (comment))
Require a storage flag for MAP_CLIENT_POINTER_MESA usage, so that sub-allocated buffers with backing BOs on client pointer ranges are possible without remapping.
Specify shared state properties of client pointer ranges. This is important since Wine is moving towards sharing all GL contexts, and the client pointer ranges shouldn't be locked to only one of these contexts.
I've done this by specifying that an incoming client pointer range is at first client state, which can then be consumed by MapRange, (if a mapping isn't provided for the backing BO by another thread first). But the semantics around when a range is consumed are wishy washy.
Alternatively, we could make all added ranges server side state, which would be easier to spec, but on the driver side introduces some needless code.