diff options
| author | 2019-06-18 16:58:29 -0400 | |
|---|---|---|
| committer | 2019-07-05 15:49:31 -0400 | |
| commit | b391e5f6386eecf6170b544245e3e4e31427913c (patch) | |
| tree | 8a6cb553577e6f0e5f059d212fecee9e32fdc08d /src/core/hle | |
| parent | NVServices: Make NVEvents Automatic according to documentation. (diff) | |
| download | yuzu-b391e5f6386eecf6170b544245e3e4e31427913c.tar.gz yuzu-b391e5f6386eecf6170b544245e3e4e31427913c.tar.xz yuzu-b391e5f6386eecf6170b544245e3e4e31427913c.zip | |
NVFlinger: Correct GCC compile error
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | 1 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_gpu.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/interface.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/nvflinger/buffer_queue.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 16 |
6 files changed, 16 insertions, 17 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index ffa6e75c7..a5a4f8c7b 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | |||
| @@ -174,6 +174,7 @@ u32 nvhost_ctrl::IocCtrlEventSignal(const std::vector<u8>& input, std::vector<u8 | |||
| 174 | if (gpu.CancelSyncptInterrupt(events_interface.assigned_syncpt[event_id], | 174 | if (gpu.CancelSyncptInterrupt(events_interface.assigned_syncpt[event_id], |
| 175 | events_interface.assigned_value[event_id])) { | 175 | events_interface.assigned_value[event_id])) { |
| 176 | events_interface.LiberateEvent(event_id); | 176 | events_interface.LiberateEvent(event_id); |
| 177 | events_interface.events[event_id].writable->Signal(); | ||
| 177 | } | 178 | } |
| 178 | } | 179 | } |
| 179 | return NvResult::Success; | 180 | return NvResult::Success; |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index b9e13fae9..241dac881 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | |||
| @@ -122,9 +122,9 @@ u32 nvhost_gpu::AllocGPFIFOEx2(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 122 | params.unk3); | 122 | params.unk3); |
| 123 | 123 | ||
| 124 | auto& gpu = system.GPU(); | 124 | auto& gpu = system.GPU(); |
| 125 | params.fence_out.id = channels; | 125 | params.fence_out.id = assigned_syncpoints; |
| 126 | params.fence_out.value = gpu.GetSyncpointValue(channels); | 126 | params.fence_out.value = gpu.GetSyncpointValue(assigned_syncpoints); |
| 127 | channels++; | 127 | assigned_syncpoints++; |
| 128 | std::memcpy(output.data(), ¶ms, output.size()); | 128 | std::memcpy(output.data(), ¶ms, output.size()); |
| 129 | return 0; | 129 | return 0; |
| 130 | } | 130 | } |
| @@ -169,8 +169,6 @@ u32 nvhost_gpu::SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& outp | |||
| 169 | } | 169 | } |
| 170 | gpu.PushGPUEntries(std::move(entries)); | 170 | gpu.PushGPUEntries(std::move(entries)); |
| 171 | 171 | ||
| 172 | // TODO(Blinkhawk): Figure how thoios fence is set | ||
| 173 | // params.fence_out.value = 0; | ||
| 174 | std::memcpy(output.data(), ¶ms, sizeof(IoctlSubmitGpfifo)); | 172 | std::memcpy(output.data(), ¶ms, sizeof(IoctlSubmitGpfifo)); |
| 175 | return 0; | 173 | return 0; |
| 176 | } | 174 | } |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h index edc37ff3a..3ad8e1db1 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h | |||
| @@ -191,7 +191,7 @@ private: | |||
| 191 | u32 ChannelSetTimeout(const std::vector<u8>& input, std::vector<u8>& output); | 191 | u32 ChannelSetTimeout(const std::vector<u8>& input, std::vector<u8>& output); |
| 192 | 192 | ||
| 193 | std::shared_ptr<nvmap> nvmap_dev; | 193 | std::shared_ptr<nvmap> nvmap_dev; |
| 194 | u32 channels{}; | 194 | u32 assigned_syncpoints{}; |
| 195 | }; | 195 | }; |
| 196 | 196 | ||
| 197 | } // namespace Service::Nvidia::Devices | 197 | } // namespace Service::Nvidia::Devices |
diff --git a/src/core/hle/service/nvdrv/interface.cpp b/src/core/hle/service/nvdrv/interface.cpp index 45912153d..6f7c7502a 100644 --- a/src/core/hle/service/nvdrv/interface.cpp +++ b/src/core/hle/service/nvdrv/interface.cpp | |||
| @@ -57,8 +57,8 @@ void NVDRV::Ioctl(Kernel::HLERequestContext& ctx) { | |||
| 57 | ctrl.fresh_call = false; | 57 | ctrl.fresh_call = false; |
| 58 | ctx.SleepClientThread( | 58 | ctx.SleepClientThread( |
| 59 | "NVServices::DelayedResponse", ctrl.timeout, | 59 | "NVServices::DelayedResponse", ctrl.timeout, |
| 60 | [this, ctrl = ctrl](Kernel::SharedPtr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx, | 60 | [this, ctrl = ctrl](Kernel::SharedPtr<Kernel::Thread> thread, |
| 61 | Kernel::ThreadWakeupReason reason) { | 61 | Kernel::HLERequestContext& ctx, Kernel::ThreadWakeupReason reason) { |
| 62 | IPC::RequestParser rp{ctx}; | 62 | IPC::RequestParser rp{ctx}; |
| 63 | u32 fd = rp.Pop<u32>(); | 63 | u32 fd = rp.Pop<u32>(); |
| 64 | u32 command = rp.Pop<u32>(); | 64 | u32 command = rp.Pop<u32>(); |
diff --git a/src/core/hle/service/nvflinger/buffer_queue.h b/src/core/hle/service/nvflinger/buffer_queue.h index be993ee61..356bedb81 100644 --- a/src/core/hle/service/nvflinger/buffer_queue.h +++ b/src/core/hle/service/nvflinger/buffer_queue.h | |||
| @@ -4,9 +4,9 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <list> | ||
| 7 | #include <optional> | 8 | #include <optional> |
| 8 | #include <vector> | 9 | #include <vector> |
| 9 | #include <list> | ||
| 10 | 10 | ||
| 11 | #include "common/common_funcs.h" | 11 | #include "common/common_funcs.h" |
| 12 | #include "common/math_util.h" | 12 | #include "common/math_util.h" |
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index a7937b490..70441f6a2 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp | |||
| @@ -37,14 +37,14 @@ NVFlinger::NVFlinger(Core::Timing::CoreTiming& core_timing) : core_timing{core_t | |||
| 37 | displays.emplace_back(4, "Null"); | 37 | displays.emplace_back(4, "Null"); |
| 38 | 38 | ||
| 39 | // Schedule the screen composition events | 39 | // Schedule the screen composition events |
| 40 | //const auto ticks = Settings::values.force_30fps_mode ? frame_ticks_30fps : frame_ticks; | 40 | // const auto ticks = Settings::values.force_30fps_mode ? frame_ticks_30fps : frame_ticks; |
| 41 | 41 | ||
| 42 | composition_event = core_timing.RegisterEvent( | 42 | composition_event = core_timing.RegisterEvent("ScreenComposition", [this](u64 userdata, |
| 43 | "ScreenComposition", [this](u64 userdata, s64 cycles_late) { | 43 | s64 cycles_late) { |
| 44 | Compose(); | 44 | Compose(); |
| 45 | const auto ticks = Settings::values.force_30fps_mode ? frame_ticks_30fps : GetNextTicks(); | 45 | const auto ticks = Settings::values.force_30fps_mode ? frame_ticks_30fps : GetNextTicks(); |
| 46 | this->core_timing.ScheduleEvent(std::max(0LL,ticks - cycles_late), composition_event); | 46 | this->core_timing.ScheduleEvent(std::max<s64>(0LL, ticks - cycles_late), composition_event); |
| 47 | }); | 47 | }); |
| 48 | 48 | ||
| 49 | core_timing.ScheduleEvent(frame_ticks, composition_event); | 49 | core_timing.ScheduleEvent(frame_ticks, composition_event); |
| 50 | } | 50 | } |