early-access version 3703
This commit is contained in:
@@ -271,12 +271,10 @@ NvResult nvhost_as_gpu::Remap(std::span<const u8> input, std::span<u8> output) {
|
||||
|
||||
LOG_DEBUG(Service_NVDRV, "called, num_entries=0x{:X}", num_entries);
|
||||
|
||||
static Common::ScratchBuffer<IoctlRemapEntry> entries;
|
||||
std::scoped_lock lock(mutex);
|
||||
entries.resize_destructive(num_entries);
|
||||
std::memcpy(entries.data(), input.data(), input.size());
|
||||
|
||||
std::scoped_lock lock(mutex);
|
||||
|
||||
if (!vm.initialised) {
|
||||
return NvResult::BadValue;
|
||||
}
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#include "common/address_space.h"
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/common_types.h"
|
||||
#include "common/scratch_buffer.h"
|
||||
#include "common/swap.h"
|
||||
#include "core/hle/service/nvdrv/core/nvmap.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvdevice.h"
|
||||
@@ -212,6 +213,7 @@ private:
|
||||
bool initialised{};
|
||||
} vm;
|
||||
std::shared_ptr<Tegra::MemoryManager> gmmu;
|
||||
Common::ScratchBuffer<IoctlRemapEntry> entries;
|
||||
|
||||
// s32 channel{};
|
||||
// u32 big_page_size{VM::DEFAULT_BIG_PAGE_SIZE};
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#include <memory>
|
||||
#include <span>
|
||||
#include <vector>
|
||||
#include <boost/container/small_vector.hpp>
|
||||
|
||||
#include "common/alignment.h"
|
||||
#include "common/assert.h"
|
||||
@@ -117,10 +118,7 @@ private:
|
||||
|
||||
class OutputParcel final {
|
||||
public:
|
||||
OutputParcel() {
|
||||
m_data_buffer.reserve(0x1000);
|
||||
m_object_buffer.reserve(0x100);
|
||||
}
|
||||
OutputParcel() = default;
|
||||
|
||||
template <typename T>
|
||||
void Write(const T& val) {
|
||||
@@ -170,7 +168,7 @@ public:
|
||||
private:
|
||||
template <typename T>
|
||||
requires(std::is_trivially_copyable_v<T>)
|
||||
void WriteImpl(const T& val, std::vector<u8>& buffer) {
|
||||
void WriteImpl(const T& val, boost::container::small_vector<u8, 0x200>& buffer) {
|
||||
const size_t aligned_size = Common::AlignUp(sizeof(T), 4);
|
||||
const size_t old_size = buffer.size();
|
||||
buffer.resize(old_size + aligned_size);
|
||||
@@ -179,8 +177,8 @@ private:
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<u8> m_data_buffer;
|
||||
std::vector<u8> m_object_buffer;
|
||||
boost::container::small_vector<u8, 0x200> m_data_buffer;
|
||||
boost::container::small_vector<u8, 0x200> m_object_buffer;
|
||||
};
|
||||
|
||||
} // namespace Service::android
|
||||
|
Reference in New Issue
Block a user