mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2025-08-12 15:42:33 -07:00
Remove memory allocations in some hot paths
This commit is contained in:
@@ -130,7 +130,7 @@ DeviceFD Module::Open(const std::string& device_name) {
|
||||
}
|
||||
|
||||
NvResult Module::Ioctl1(DeviceFD fd, Ioctl command, std::span<const u8> input,
|
||||
std::vector<u8>& output) {
|
||||
std::span<u8> output) {
|
||||
if (fd < 0) {
|
||||
LOG_ERROR(Service_NVDRV, "Invalid DeviceFD={}!", fd);
|
||||
return NvResult::InvalidState;
|
||||
@@ -147,7 +147,7 @@ NvResult Module::Ioctl1(DeviceFD fd, Ioctl command, std::span<const u8> input,
|
||||
}
|
||||
|
||||
NvResult Module::Ioctl2(DeviceFD fd, Ioctl command, std::span<const u8> input,
|
||||
std::span<const u8> inline_input, std::vector<u8>& output) {
|
||||
std::span<const u8> inline_input, std::span<u8> output) {
|
||||
if (fd < 0) {
|
||||
LOG_ERROR(Service_NVDRV, "Invalid DeviceFD={}!", fd);
|
||||
return NvResult::InvalidState;
|
||||
@@ -163,8 +163,8 @@ NvResult Module::Ioctl2(DeviceFD fd, Ioctl command, std::span<const u8> input,
|
||||
return itr->second->Ioctl2(fd, command, input, inline_input, output);
|
||||
}
|
||||
|
||||
NvResult Module::Ioctl3(DeviceFD fd, Ioctl command, std::span<const u8> input,
|
||||
std::vector<u8>& output, std::vector<u8>& inline_output) {
|
||||
NvResult Module::Ioctl3(DeviceFD fd, Ioctl command, std::span<const u8> input, std::span<u8> output,
|
||||
std::span<u8> inline_output) {
|
||||
if (fd < 0) {
|
||||
LOG_ERROR(Service_NVDRV, "Invalid DeviceFD={}!", fd);
|
||||
return NvResult::InvalidState;
|
||||
|
Reference in New Issue
Block a user