VERY experimental Nintendo Switch 2 emulator
C++
nvhost_nvdec_common: Read Submit ioctl data from object addr
ameerjf4ea325867d4
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cppindex f045008eb3..1403a39d0f 100644--- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp+++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp@@ -93,15 +93,9 @@ NvResult nvhost_nvdec_common::Submit(const std::vector<u8>& input, std::vector<ufor (const auto& cmd_buffer : command_buffers) {const auto object = nvmap_dev->GetObject(cmd_buffer.memory_id);ASSERT_OR_EXECUTE(object, return NvResult::InvalidState;);- const auto map = FindBufferMap(object->dma_map_addr);- if (!map) {- LOG_ERROR(Service_NVDRV, "Tried to submit an invalid offset 0x{:X} dma 0x{:X}",- object->addr, object->dma_map_addr);- return NvResult::Success;- }Tegra::ChCommandHeaderList cmdlist(cmd_buffer.word_count);- gpu.MemoryManager().ReadBlock(map->StartAddr() + cmd_buffer.offset, cmdlist.data(),- cmdlist.size() * sizeof(u32));+ system.Memory().ReadBlock(object->addr + cmd_buffer.offset, cmdlist.data(),+ cmdlist.size() * sizeof(u32));gpu.PushCommandBuffer(cmdlist);}if (gpu.UseNvdec()) {