diff options
| author | 2020-11-23 18:38:13 -0500 | |
|---|---|---|
| committer | 2021-02-13 13:07:56 -0500 | |
| commit | 3c37d66c28b7150c076091b1a5f7b4206ff71761 (patch) | |
| tree | a94842cf676becde88f9bde3411504fa736b01c3 | |
| parent | streamline cdma_pusher/command_classes (diff) | |
| download | yuzu-3c37d66c28b7150c076091b1a5f7b4206ff71761.tar.gz yuzu-3c37d66c28b7150c076091b1a5f7b4206ff71761.tar.xz yuzu-3c37d66c28b7150c076091b1a5f7b4206ff71761.zip | |
Address PR feedback
Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_vic.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/cdma_pusher.cpp | 9 | ||||
| -rw-r--r-- | src/video_core/cdma_pusher.h | 4 |
4 files changed, 7 insertions, 12 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp index 36970f828..ecba1dba1 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp | |||
| @@ -34,8 +34,7 @@ NvResult nvhost_nvdec::Ioctl1(Ioctl command, const std::vector<u8>& input, | |||
| 34 | case 0xa: { | 34 | case 0xa: { |
| 35 | if (command.length == 0x1c) { | 35 | if (command.length == 0x1c) { |
| 36 | LOG_INFO(Service_NVDRV, "NVDEC video stream ended"); | 36 | LOG_INFO(Service_NVDRV, "NVDEC video stream ended"); |
| 37 | Tegra::ChCommandHeaderList cmdlist(1); | 37 | Tegra::ChCommandHeaderList cmdlist{{0xDEADB33F}}; |
| 38 | cmdlist[0] = Tegra::ChCommandHeader{0xDEADB33F}; | ||
| 39 | system.GPU().PushCommandBuffer(cmdlist); | 38 | system.GPU().PushCommandBuffer(cmdlist); |
| 40 | } | 39 | } |
| 41 | return UnmapBuffer(input, output); | 40 | return UnmapBuffer(input, output); |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp index a29abd15b..70849a9bd 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp | |||
| @@ -30,8 +30,7 @@ NvResult nvhost_vic::Ioctl1(Ioctl command, const std::vector<u8>& input, std::ve | |||
| 30 | return MapBuffer(input, output); | 30 | return MapBuffer(input, output); |
| 31 | case 0xa: { | 31 | case 0xa: { |
| 32 | if (command.length == 0x1c) { | 32 | if (command.length == 0x1c) { |
| 33 | Tegra::ChCommandHeaderList cmdlist(1); | 33 | Tegra::ChCommandHeaderList cmdlist{{0xDEADB33F}}; |
| 34 | cmdlist[0] = Tegra::ChCommandHeader{0xDEADB33F}; | ||
| 35 | system.GPU().PushCommandBuffer(cmdlist); | 34 | system.GPU().PushCommandBuffer(cmdlist); |
| 36 | } | 35 | } |
| 37 | return UnmapBuffer(input, output); | 36 | return UnmapBuffer(input, output); |
diff --git a/src/video_core/cdma_pusher.cpp b/src/video_core/cdma_pusher.cpp index d80e74225..e1f00c4da 100644 --- a/src/video_core/cdma_pusher.cpp +++ b/src/video_core/cdma_pusher.cpp | |||
| @@ -103,8 +103,8 @@ void CDmaPusher::ExecuteCommand(u32 state_offset, u32 data) { | |||
| 103 | case ThiMethod::SetMethod1: | 103 | case ThiMethod::SetMethod1: |
| 104 | LOG_DEBUG(Service_NVDRV, "NVDEC method 0x{:X}", | 104 | LOG_DEBUG(Service_NVDRV, "NVDEC method 0x{:X}", |
| 105 | static_cast<u32>(nvdec_thi_state.method_0)); | 105 | static_cast<u32>(nvdec_thi_state.method_0)); |
| 106 | nvdec_processor->ProcessMethod( | 106 | nvdec_processor->ProcessMethod(static_cast<Nvdec::Method>(nvdec_thi_state.method_0), |
| 107 | static_cast<Tegra::Nvdec::Method>(nvdec_thi_state.method_0), data); | 107 | data); |
| 108 | break; | 108 | break; |
| 109 | default: | 109 | default: |
| 110 | break; | 110 | break; |
| @@ -128,8 +128,7 @@ void CDmaPusher::ExecuteCommand(u32 state_offset, u32 data) { | |||
| 128 | case ThiMethod::SetMethod1: | 128 | case ThiMethod::SetMethod1: |
| 129 | LOG_DEBUG(Service_NVDRV, "VIC method 0x{:X}, Args=({})", | 129 | LOG_DEBUG(Service_NVDRV, "VIC method 0x{:X}, Args=({})", |
| 130 | static_cast<u32>(vic_thi_state.method_0), data); | 130 | static_cast<u32>(vic_thi_state.method_0), data); |
| 131 | vic_processor->ProcessMethod(static_cast<Tegra::Vic::Method>(vic_thi_state.method_0), | 131 | vic_processor->ProcessMethod(static_cast<Vic::Method>(vic_thi_state.method_0), data); |
| 132 | data); | ||
| 133 | break; | 132 | break; |
| 134 | default: | 133 | default: |
| 135 | break; | 134 | break; |
| @@ -138,7 +137,7 @@ void CDmaPusher::ExecuteCommand(u32 state_offset, u32 data) { | |||
| 138 | case ChClassId::Host1x: | 137 | case ChClassId::Host1x: |
| 139 | // This device is mainly for syncpoint synchronization | 138 | // This device is mainly for syncpoint synchronization |
| 140 | LOG_DEBUG(Service_NVDRV, "Host1X Class Method"); | 139 | LOG_DEBUG(Service_NVDRV, "Host1X Class Method"); |
| 141 | host1x_processor->ProcessMethod(static_cast<Tegra::Host1x::Method>(offset), data); | 140 | host1x_processor->ProcessMethod(static_cast<Host1x::Method>(offset), data); |
| 142 | break; | 141 | break; |
| 143 | default: | 142 | default: |
| 144 | UNIMPLEMENTED_MSG("Current class not implemented {:X}", static_cast<u32>(current_class)); | 143 | UNIMPLEMENTED_MSG("Current class not implemented {:X}", static_cast<u32>(current_class)); |
diff --git a/src/video_core/cdma_pusher.h b/src/video_core/cdma_pusher.h index e16eb2254..1bada44dd 100644 --- a/src/video_core/cdma_pusher.h +++ b/src/video_core/cdma_pusher.h | |||
| @@ -5,9 +5,7 @@ | |||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <memory> | 7 | #include <memory> |
| 8 | #include <unordered_map> | ||
| 9 | #include <vector> | 8 | #include <vector> |
| 10 | #include <queue> | ||
| 11 | 9 | ||
| 12 | #include "common/bit_field.h" | 10 | #include "common/bit_field.h" |
| 13 | #include "common/common_types.h" | 11 | #include "common/common_types.h" |
| @@ -16,9 +14,9 @@ | |||
| 16 | namespace Tegra { | 14 | namespace Tegra { |
| 17 | 15 | ||
| 18 | class GPU; | 16 | class GPU; |
| 17 | class Host1x; | ||
| 19 | class Nvdec; | 18 | class Nvdec; |
| 20 | class Vic; | 19 | class Vic; |
| 21 | class Host1x; | ||
| 22 | 20 | ||
| 23 | enum class ChSubmissionMode : u32 { | 21 | enum class ChSubmissionMode : u32 { |
| 24 | SetClass = 0, | 22 | SetClass = 0, |