-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add memoryMapPlaced and memoryMapRangePlaced features of VK_EXT_map_memory_placed extension #2514
Conversation
implements the memoryMapPlaced and memoryMapRangePlaced features
intersects does not do what I thought it does
I don't think this is correct. The offset and size are both DeviceSize or u64. They are added together as positive numbers.
The idea with non-exhaustive structs is that we can add fields without it being a breaking change. |
Can you please fix the string literals spanning more than 100 columns? You can see examples of how to do it in the same file. |
this is actually really nice for reading
I've updated the interface to no longer use |
I've updated the PR but seems like the windows actions has crashed and its blocking the check from completing. |
I guess that is also more self-documenting, true that. |
Updated to remove the extra branch. Kept the feature gate. I did do
instead of
as a non-zero |
I'm afraid that that condition is incorrect, because those sets of features can be en/disabled without using |
Err, more specifically, you would have to check that |
Yes, I believe this is correct. Previously, placed_address implied the flag and |
That made me realize, flags.contains(MemoryMapFlags::PLACED) && offset + size == self.allocation_size() |
What if |
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
|
In case you are talking about the case when |
i've concluded that this choice is roughly semantically equivalent and this comes down to opinion. I can't be bothered to have an opinion here, imo this is a bikeshed. also it is temporary. until the docs are updated and the impls are updated. also i don't even really care about the ranged version of this feature, implemented it mostly for completeness than anything else
Ultimately I've concluded this decision is an opinion and I care more about merging than having a debate. Updated to exactly what you asked for. If there are further minor changes, the branch has maintainer edits on, please feel free to edit directly. Really curious what the docs ppl end up concluding. |
Yes, I can't wait to see what will come of it. My gut tells me that they'll make it consistent. Worst case is they refuse and we have to expose |
I updated the PR in light of the latest updates to the spec and fixed the last remaining unresolved comment since you seemed a bit defeated. I opted for the additional |
Ah hey yeah @marc0246 no worries, honestly I tried the copy way you suggested and was finding the performance to be acceptable. I decided to focus on correctness for now in my emulation project and worry about performance later. I was planning to come back and update this eventually but it kept getting pushed below the cutline. If this is important to you I'm happy for you to take it over. If its not, I'll get to it eventually. |
Could you merge in the changes from the latest master? I'm encountering a bug that you fixed in another PR, and that's preventing me from testing this currently. |
Thank you! Sorry it took so long. |
No worries! Thank you! |
Overview
Implements the memoryMapPlaced and memoryMapRangePlaced features of the
VK_EXT_map_memory_placed
extension (docs, proposal).Adds a field,
MemoryMapInfo.placed_address
for use withDeviceMemory::map
andDeviceMemory::map_unchecked
specifying an address.Testing
As
VK_EXT_map_memory_placed
is currently not yet released in any implementation, I've tested this using a trunk revision of mesa (https://gitlab.freedesktop.org/mesa/mesa/-/commit/6b383ca810bb853f11c127d9e1d284dc4dcb0992). Mesa 24.1 coming out in the beginning of May is scheduled to include this extension.Here are the instructions I used to run the tests locally. These will not make global system changes.
Questions
gfx_dev_and_queue
will early return, silently passing if a feature or extension requested is not available.Would adding a field to a struct (in this caseThe non-exhaustive allows for non-breaking change.MemoryMapInfo.placed_address
) be considered a breaking change? Wasn't sure so I erred on the conservative side and am assuming yes.Am I using the right vuids? See the inline comments for specifics.Discussing in inline comments.Changelog