mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
nvhost_nvdec_common: Read Submit ioctl data from object addr
Fixes Mario Golf intro video decoding.
This commit is contained in:
parent
3f601ed8bc
commit
8943f2158d
|
@ -93,15 +93,9 @@ NvResult nvhost_nvdec_common::Submit(const std::vector<u8>& input, std::vector<u
|
||||||
for (const auto& cmd_buffer : command_buffers) {
|
for (const auto& cmd_buffer : command_buffers) {
|
||||||
const auto object = nvmap_dev->GetObject(cmd_buffer.memory_id);
|
const auto object = nvmap_dev->GetObject(cmd_buffer.memory_id);
|
||||||
ASSERT_OR_EXECUTE(object, return NvResult::InvalidState;);
|
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);
|
Tegra::ChCommandHeaderList cmdlist(cmd_buffer.word_count);
|
||||||
gpu.MemoryManager().ReadBlock(map->StartAddr() + cmd_buffer.offset, cmdlist.data(),
|
system.Memory().ReadBlock(object->addr + cmd_buffer.offset, cmdlist.data(),
|
||||||
cmdlist.size() * sizeof(u32));
|
cmdlist.size() * sizeof(u32));
|
||||||
gpu.PushCommandBuffer(cmdlist);
|
gpu.PushCommandBuffer(cmdlist);
|
||||||
}
|
}
|
||||||
if (gpu.UseNvdec()) {
|
if (gpu.UseNvdec()) {
|
||||||
|
|
Loading…
Reference in a new issue