diff options
| author | 2021-07-14 23:56:24 -0400 | |
|---|---|---|
| committer | 2021-07-14 23:56:24 -0400 | |
| commit | 8943f2158d0e8a9f708612f1b0ea7051a6b0ddff (patch) | |
| tree | 6f439e1ddde075330dc369bf9716a14c8a758907 | |
| parent | nvhost_nvdec_common: Fix {Slice/Write}Vectors return (diff) | |
| download | yuzu-8943f2158d0e8a9f708612f1b0ea7051a6b0ddff.tar.gz yuzu-8943f2158d0e8a9f708612f1b0ea7051a6b0ddff.tar.xz yuzu-8943f2158d0e8a9f708612f1b0ea7051a6b0ddff.zip | |
nvhost_nvdec_common: Read Submit ioctl data from object addr
Fixes Mario Golf intro video decoding.
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp index f045008eb..1403a39d0 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<u | |||
| 93 | for (const auto& cmd_buffer : command_buffers) { | 93 | for (const auto& cmd_buffer : command_buffers) { |
| 94 | const auto object = nvmap_dev->GetObject(cmd_buffer.memory_id); | 94 | const auto object = nvmap_dev->GetObject(cmd_buffer.memory_id); |
| 95 | ASSERT_OR_EXECUTE(object, return NvResult::InvalidState;); | 95 | ASSERT_OR_EXECUTE(object, return NvResult::InvalidState;); |
| 96 | const auto map = FindBufferMap(object->dma_map_addr); | ||
| 97 | if (!map) { | ||
| 98 | LOG_ERROR(Service_NVDRV, "Tried to submit an invalid offset 0x{:X} dma 0x{:X}", | ||
| 99 | object->addr, object->dma_map_addr); | ||
| 100 | return NvResult::Success; | ||
| 101 | } | ||
| 102 | Tegra::ChCommandHeaderList cmdlist(cmd_buffer.word_count); | 96 | Tegra::ChCommandHeaderList cmdlist(cmd_buffer.word_count); |
| 103 | gpu.MemoryManager().ReadBlock(map->StartAddr() + cmd_buffer.offset, cmdlist.data(), | 97 | system.Memory().ReadBlock(object->addr + cmd_buffer.offset, cmdlist.data(), |
| 104 | cmdlist.size() * sizeof(u32)); | 98 | cmdlist.size() * sizeof(u32)); |
| 105 | gpu.PushCommandBuffer(cmdlist); | 99 | gpu.PushCommandBuffer(cmdlist); |
| 106 | } | 100 | } |
| 107 | if (gpu.UseNvdec()) { | 101 | if (gpu.UseNvdec()) { |