summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Subv2018-02-11 21:34:20 -0500
committerGravatar Subv2018-02-11 22:42:48 -0500
commite01a8f218707b6f3ed0f111c432440b07ea5b6ff (patch)
treef5a95dc16a129a5c1a8a4d1309dfbbc3e4ccdb3f /src/core
parentnvdrv: Make the GPU memory manager available to nvhost-gpu. (diff)
downloadyuzu-e01a8f218707b6f3ed0f111c432440b07ea5b6ff.tar.gz
yuzu-e01a8f218707b6f3ed0f111c432440b07ea5b6ff.tar.xz
yuzu-e01a8f218707b6f3ed0f111c432440b07ea5b6ff.zip
GPU: Added a command processor to decode the GPU pushbuffers and forward the commands to their respective engines.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h2
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp4
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_gpu.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
index 44ffddcd9..301a8a79f 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
@@ -21,7 +21,7 @@ class nvmap;
21class nvhost_as_gpu final : public nvdevice { 21class nvhost_as_gpu final : public nvdevice {
22public: 22public:
23 nvhost_as_gpu(std::shared_ptr<nvmap> nvmap_dev, std::shared_ptr<MemoryManager> memory_manager) 23 nvhost_as_gpu(std::shared_ptr<nvmap> nvmap_dev, std::shared_ptr<MemoryManager> memory_manager)
24 : nvdevice(), nvmap_dev(std::move(nvmap_dev)), memory_manager(std::move(memory_manager)) {} 24 : nvmap_dev(std::move(nvmap_dev)), memory_manager(std::move(memory_manager)) {}
25 ~nvhost_as_gpu() override = default; 25 ~nvhost_as_gpu() override = default;
26 26
27 u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override; 27 u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override;
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp
index 229048d37..1c3079889 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp
@@ -6,6 +6,7 @@
6#include "common/assert.h" 6#include "common/assert.h"
7#include "common/logging/log.h" 7#include "common/logging/log.h"
8#include "core/hle/service/nvdrv/devices/nvhost_gpu.h" 8#include "core/hle/service/nvdrv/devices/nvhost_gpu.h"
9#include "video_core/command_processor.h"
9 10
10namespace Service { 11namespace Service {
11namespace Nvidia { 12namespace Nvidia {
@@ -130,7 +131,8 @@ u32 nvhost_gpu::SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& outp
130 std::memcpy(&entries[0], &input.data()[sizeof(IoctlSubmitGpfifo)], 131 std::memcpy(&entries[0], &input.data()[sizeof(IoctlSubmitGpfifo)],
131 params.num_entries * sizeof(IoctlGpfifoEntry)); 132 params.num_entries * sizeof(IoctlGpfifoEntry));
132 for (auto entry : entries) { 133 for (auto entry : entries) {
133 VAddr va_addr = entry.Address(); 134 VAddr va_addr = memory_manager->PhysicalToVirtualAddress(entry.Address());
135 Tegra::CommandProcessor::ProcessCommandList(va_addr, entry.sz);
134 // TODO(ogniK): Process these 136 // TODO(ogniK): Process these
135 } 137 }
136 params.fence_out.id = 0; 138 params.fence_out.id = 0;
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h
index 5b40eaa88..6f9b90b05 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h
@@ -22,7 +22,7 @@ constexpr u32 NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO(0x8);
22class nvhost_gpu final : public nvdevice { 22class nvhost_gpu final : public nvdevice {
23public: 23public:
24 nvhost_gpu(std::shared_ptr<nvmap> nvmap_dev, std::shared_ptr<MemoryManager> memory_manager) 24 nvhost_gpu(std::shared_ptr<nvmap> nvmap_dev, std::shared_ptr<MemoryManager> memory_manager)
25 : nvdevice(), nvmap_dev(std::move(nvmap_dev)), memory_manager(std::move(memory_manager)) {} 25 : nvmap_dev(std::move(nvmap_dev)), memory_manager(std::move(memory_manager)) {}
26 ~nvhost_gpu() override = default; 26 ~nvhost_gpu() override = default;
27 27
28 u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override; 28 u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override;