|
|
|
@ -1,3 +1,6 @@ |
|
|
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2014 The Android Open Source Project
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
@ -97,6 +100,14 @@ Status BufferQueueConsumer::AcquireBuffer(BufferItem* out_buffer, |
|
|
|
slots[slot].needs_cleanup_on_release = false; |
|
|
|
slots[slot].buffer_state = BufferState::Acquired; |
|
|
|
|
|
|
|
// Mark tracked buffer history records as acquired
|
|
|
|
for (auto& buffer_history_record : core->buffer_history) { |
|
|
|
if (buffer_history_record.frame_number == core->frame_counter) { |
|
|
|
buffer_history_record.state = BufferState::Acquired; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// TODO: for now, avoid resetting the fence, so that when we next return this
|
|
|
|
// slot to the producer, it will wait for the fence to pass. We should fix this
|
|
|
|
// by properly waiting for the fence in the BufferItemConsumer.
|
|
|
|
@ -320,7 +331,7 @@ void BufferQueueConsumer::Transact(u32 code, std::span<const u8> parcel_data, |
|
|
|
|
|
|
|
const auto serialized = parcel_out.Serialize(); |
|
|
|
std::memcpy(parcel_reply.data(), serialized.data(), |
|
|
|
std::min(parcel_reply.size(), serialized.size())); |
|
|
|
(std::min)(parcel_reply.size(), serialized.size())); |
|
|
|
} |
|
|
|
|
|
|
|
Kernel::KReadableEvent* BufferQueueConsumer::GetNativeHandle(u32 type_id) { |
|
|
|
|