diff options
author | Fernando S <fsahmkow27@gmail.com> | 2021-10-06 20:02:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-06 20:02:31 +0200 |
commit | f84328934f5e09894a69d9fa1d2f6a34c715321b (patch) | |
tree | eafe64da6ca2bb195cf5523d3fa13f89f117f897 /src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | |
parent | Merge pull request #7090 from Moonlacer/tas_spacing_addition (diff) | |
parent | nvflinger: Use jthread and stop_token for VSync thread (diff) | |
download | yuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.tar yuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.tar.gz yuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.tar.bz2 yuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.tar.lz yuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.tar.xz yuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.tar.zst yuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.zip |
Diffstat (limited to 'src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index c0a380088..54ac105d5 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp @@ -13,6 +13,14 @@ #include "video_core/memory_manager.h" namespace Service::Nvidia::Devices { +namespace { +Tegra::CommandHeader BuildFenceAction(Tegra::GPU::FenceOperation op, u32 syncpoint_id) { + Tegra::GPU::FenceAction result{}; + result.op.Assign(op); + result.syncpoint_id.Assign(syncpoint_id); + return {result.raw}; +} +} // namespace nvhost_gpu::nvhost_gpu(Core::System& system_, std::shared_ptr<nvmap> nvmap_dev_, SyncpointManager& syncpoint_manager_) @@ -187,7 +195,7 @@ static std::vector<Tegra::CommandHeader> BuildWaitCommandList(Fence fence) { {fence.value}, Tegra::BuildCommandHeader(Tegra::BufferMethods::FenceAction, 1, Tegra::SubmissionMode::Increasing), - Tegra::GPU::FenceAction::Build(Tegra::GPU::FenceOperation::Acquire, fence.id), + BuildFenceAction(Tegra::GPU::FenceOperation::Acquire, fence.id), }; } @@ -200,8 +208,7 @@ static std::vector<Tegra::CommandHeader> BuildIncrementCommandList(Fence fence, for (u32 count = 0; count < add_increment; ++count) { result.emplace_back(Tegra::BuildCommandHeader(Tegra::BufferMethods::FenceAction, 1, Tegra::SubmissionMode::Increasing)); - result.emplace_back( - Tegra::GPU::FenceAction::Build(Tegra::GPU::FenceOperation::Increment, fence.id)); + result.emplace_back(BuildFenceAction(Tegra::GPU::FenceOperation::Increment, fence.id)); } return result; |