diff options
author | Ameer J <52414509+ameerj@users.noreply.github.com> | 2021-10-25 01:35:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 01:35:00 +0200 |
commit | 3c8c17be4df4e1ec940de2746025626315a7f475 (patch) | |
tree | 17f66d0f8a4f8927ecb33edc483bffbbcc722481 /src | |
parent | Merge pull request #7222 from FernandoS27/fix-indixed-textures-again (diff) | |
parent | Fixup channel submit IOCTL syncpoint parameters (diff) | |
download | yuzu-3c8c17be4df4e1ec940de2746025626315a7f475.tar yuzu-3c8c17be4df4e1ec940de2746025626315a7f475.tar.gz yuzu-3c8c17be4df4e1ec940de2746025626315a7f475.tar.bz2 yuzu-3c8c17be4df4e1ec940de2746025626315a7f475.tar.lz yuzu-3c8c17be4df4e1ec940de2746025626315a7f475.tar.xz yuzu-3c8c17be4df4e1ec940de2746025626315a7f475.tar.zst yuzu-3c8c17be4df4e1ec940de2746025626315a7f475.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp | 17 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h | 13 |
2 files changed, 9 insertions, 21 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 845de724d..e61261f98 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp @@ -69,8 +69,7 @@ NvResult nvhost_nvdec_common::Submit(const std::vector<u8>& input, std::vector<u std::vector<Reloc> relocs(params.relocation_count); std::vector<u32> reloc_shifts(params.relocation_count); std::vector<SyncptIncr> syncpt_increments(params.syncpoint_count); - std::vector<SyncptIncr> wait_checks(params.syncpoint_count); - std::vector<Fence> fences(params.fence_count); + std::vector<u32> fence_thresholds(params.fence_count); // Slice input into their respective buffers std::size_t offset = sizeof(IoctlSubmit); @@ -78,15 +77,13 @@ NvResult nvhost_nvdec_common::Submit(const std::vector<u8>& input, std::vector<u offset += SliceVectors(input, relocs, params.relocation_count, offset); offset += SliceVectors(input, reloc_shifts, params.relocation_count, offset); offset += SliceVectors(input, syncpt_increments, params.syncpoint_count, offset); - offset += SliceVectors(input, wait_checks, params.syncpoint_count, offset); - offset += SliceVectors(input, fences, params.fence_count, offset); + offset += SliceVectors(input, fence_thresholds, params.fence_count, offset); auto& gpu = system.GPU(); if (gpu.UseNvdec()) { for (std::size_t i = 0; i < syncpt_increments.size(); i++) { const SyncptIncr& syncpt_incr = syncpt_increments[i]; - fences[i].id = syncpt_incr.id; - fences[i].value = + fence_thresholds[i] = syncpoint_manager.IncreaseSyncpoint(syncpt_incr.id, syncpt_incr.increments); } } @@ -98,11 +95,6 @@ NvResult nvhost_nvdec_common::Submit(const std::vector<u8>& input, std::vector<u cmdlist.size() * sizeof(u32)); gpu.PushCommandBuffer(cmdlist); } - if (gpu.UseNvdec()) { - fences[0].value = syncpoint_manager.IncreaseSyncpoint(fences[0].id, 1); - Tegra::ChCommandHeaderList cmdlist{{(4 << 28) | fences[0].id}}; - gpu.PushCommandBuffer(cmdlist); - } std::memcpy(output.data(), ¶ms, sizeof(IoctlSubmit)); // Some games expect command_buffers to be written back offset = sizeof(IoctlSubmit); @@ -110,8 +102,7 @@ NvResult nvhost_nvdec_common::Submit(const std::vector<u8>& input, std::vector<u offset += WriteVectors(output, relocs, offset); offset += WriteVectors(output, reloc_shifts, offset); offset += WriteVectors(output, syncpt_increments, offset); - offset += WriteVectors(output, wait_checks, offset); - offset += WriteVectors(output, fences, offset); + offset += WriteVectors(output, fence_thresholds, offset); return NvResult::Success; } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h index af59f00d2..ae4199b79 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h @@ -56,19 +56,16 @@ protected: s32 target{}; s32 target_offset{}; }; - static_assert(sizeof(Reloc) == 0x10, "CommandBuffer has incorrect size"); + static_assert(sizeof(Reloc) == 0x10, "Reloc has incorrect size"); struct SyncptIncr { u32 id{}; u32 increments{}; + u32 unk0{}; + u32 unk1{}; + u32 unk2{}; }; - static_assert(sizeof(SyncptIncr) == 0x8, "CommandBuffer has incorrect size"); - - struct Fence { - u32 id{}; - u32 value{}; - }; - static_assert(sizeof(Fence) == 0x8, "CommandBuffer has incorrect size"); + static_assert(sizeof(SyncptIncr) == 0x14, "SyncptIncr has incorrect size"); struct IoctlGetSyncpoint { // Input |