mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-04 14:02:45 +01:00
Nvflinger: correct duplication.
This commit is contained in:
parent
9982cff98b
commit
8a372035db
4 changed files with 5 additions and 5 deletions
|
@ -207,14 +207,14 @@ void NvMap::UnpinHandle(Handle::Id handle) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NvMap::DuplicateHandle(Handle::Id handle) {
|
void NvMap::DuplicateHandle(Handle::Id handle, bool internal_session) {
|
||||||
auto handle_description{GetHandle(handle)};
|
auto handle_description{GetHandle(handle)};
|
||||||
if (!handle_description) {
|
if (!handle_description) {
|
||||||
LOG_CRITICAL(Service_NVDRV, "Unregistered handle!");
|
LOG_CRITICAL(Service_NVDRV, "Unregistered handle!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto result = handle_description->Duplicate(false);
|
auto result = handle_description->Duplicate(internal_session);
|
||||||
if (result != NvResult::Success) {
|
if (result != NvResult::Success) {
|
||||||
LOG_CRITICAL(Service_NVDRV, "Could not duplicate handle!");
|
LOG_CRITICAL(Service_NVDRV, "Could not duplicate handle!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* @brief Tries to duplicate a handle
|
* @brief Tries to duplicate a handle
|
||||||
*/
|
*/
|
||||||
void DuplicateHandle(Handle::Id handle);
|
void DuplicateHandle(Handle::Id handle, bool internal_session = false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Tries to free a handle and remove a single dupe
|
* @brief Tries to free a handle and remove a single dupe
|
||||||
|
|
|
@ -136,7 +136,7 @@ Status BufferQueueConsumer::ReleaseBuffer(s32 slot, u64 frame_number, const Fenc
|
||||||
|
|
||||||
slots[slot].buffer_state = BufferState::Free;
|
slots[slot].buffer_state = BufferState::Free;
|
||||||
|
|
||||||
nvmap.FreeHandle(slots[slot].graphic_buffer->BufferId(), false);
|
nvmap.FreeHandle(slots[slot].graphic_buffer->BufferId(), true);
|
||||||
|
|
||||||
listener = core->connected_producer_listener;
|
listener = core->connected_producer_listener;
|
||||||
|
|
||||||
|
|
|
@ -532,7 +532,7 @@ Status BufferQueueProducer::QueueBuffer(s32 slot, const QueueBufferInput& input,
|
||||||
item.is_droppable = core->dequeue_buffer_cannot_block || async;
|
item.is_droppable = core->dequeue_buffer_cannot_block || async;
|
||||||
item.swap_interval = swap_interval;
|
item.swap_interval = swap_interval;
|
||||||
|
|
||||||
nvmap.DuplicateHandle(item.graphic_buffer->BufferId());
|
nvmap.DuplicateHandle(item.graphic_buffer->BufferId(), true);
|
||||||
|
|
||||||
sticky_transform = sticky_transform_;
|
sticky_transform = sticky_transform_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue