Add helper to import an external fence#24
Merged
fincs merged 2 commits intodevkitPro:masterfrom Jan 29, 2025
Merged
Conversation
fincs
reviewed
Jan 27, 2025
include/deko3d.h
Outdated
| DkResult dkMemBlockFlushCpuCache(DkMemBlock obj, uint32_t offset, uint32_t size); | ||
|
|
||
| DkResult dkFenceWait(DkFence* obj, int64_t timeout_ns); | ||
| DkFence dkFenceImport(uint32_t id, uint32_t value); |
Member
There was a problem hiding this comment.
Minor nitpick: I think this should be void dkFenceImport(DkFence* obj, uint32_t id, uint32_t value) instead. Plus, I'm wondering if it may be worth passing in a pointer to a libnx NvFence or NvMultiFence object instead of id/value directly.
Contributor
Author
There was a problem hiding this comment.
I'm ok with your first suggestion.
As for the second point, the thing is that deko3d.h currently doesn't import the libnx header.
Contributor
Author
There was a problem hiding this comment.
I applied your suggestion regarding the function signature
Member
There was a problem hiding this comment.
That is true. In any case, I don't expect this to be a commonly used function, so I think for now it's ok to leave it with id/value pair.
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.
During hardware-accelerated video playback, in order to remove a synchronization roundtrip between the decode engine and the GPU, waiting on a Host1x syncpt from the GPU is necessary.
Fortunately, deko3d already has such a mechanism for display sync, so we can simply reuse that code.