diff options
| author | 2020-01-08 10:28:29 -0400 | |
|---|---|---|
| committer | 2020-01-24 16:43:30 -0400 | |
| commit | b97608ca646962a6f5a217b9477bdd86eed5e48f (patch) | |
| tree | 28f43af9ca1f3dc4b97542a6bdaab95af687e036 | |
| parent | Shader_IR: Address Feedback (diff) | |
| download | yuzu-b97608ca646962a6f5a217b9477bdd86eed5e48f.tar.gz yuzu-b97608ca646962a6f5a217b9477bdd86eed5e48f.tar.xz yuzu-b97608ca646962a6f5a217b9477bdd86eed5e48f.zip | |
Shader_IR: Allow constant access of guest driver.
| -rw-r--r-- | src/video_core/engines/const_buffer_engine_interface.h | 1 | ||||
| -rw-r--r-- | src/video_core/engines/kepler_compute.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/engines/kepler_compute.h | 2 | ||||
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/engines/maxwell_3d.h | 2 | ||||
| -rw-r--r-- | src/video_core/rasterizer_interface.h | 4 | ||||
| -rw-r--r-- | src/video_core/shader/const_buffer_locker.h | 2 |
7 files changed, 18 insertions, 1 deletions
diff --git a/src/video_core/engines/const_buffer_engine_interface.h b/src/video_core/engines/const_buffer_engine_interface.h index c29156e34..d56a47710 100644 --- a/src/video_core/engines/const_buffer_engine_interface.h +++ b/src/video_core/engines/const_buffer_engine_interface.h | |||
| @@ -109,6 +109,7 @@ public: | |||
| 109 | virtual u32 GetBoundBuffer() const = 0; | 109 | virtual u32 GetBoundBuffer() const = 0; |
| 110 | 110 | ||
| 111 | virtual VideoCore::GuestDriverProfile& AccessGuestDriverProfile() = 0; | 111 | virtual VideoCore::GuestDriverProfile& AccessGuestDriverProfile() = 0; |
| 112 | virtual const VideoCore::GuestDriverProfile& AccessGuestDriverProfile() const = 0; | ||
| 112 | }; | 113 | }; |
| 113 | 114 | ||
| 114 | } // namespace Tegra::Engines | 115 | } // namespace Tegra::Engines |
diff --git a/src/video_core/engines/kepler_compute.cpp b/src/video_core/engines/kepler_compute.cpp index f177ae938..4b824aa4e 100644 --- a/src/video_core/engines/kepler_compute.cpp +++ b/src/video_core/engines/kepler_compute.cpp | |||
| @@ -98,6 +98,10 @@ VideoCore::GuestDriverProfile& KeplerCompute::AccessGuestDriverProfile() { | |||
| 98 | return rasterizer.AccessGuestDriverProfile(); | 98 | return rasterizer.AccessGuestDriverProfile(); |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | const VideoCore::GuestDriverProfile& KeplerCompute::AccessGuestDriverProfile() const { | ||
| 102 | return rasterizer.AccessGuestDriverProfile(); | ||
| 103 | } | ||
| 104 | |||
| 101 | void KeplerCompute::ProcessLaunch() { | 105 | void KeplerCompute::ProcessLaunch() { |
| 102 | const GPUVAddr launch_desc_loc = regs.launch_desc_loc.Address(); | 106 | const GPUVAddr launch_desc_loc = regs.launch_desc_loc.Address(); |
| 103 | memory_manager.ReadBlockUnsafe(launch_desc_loc, &launch_description, | 107 | memory_manager.ReadBlockUnsafe(launch_desc_loc, &launch_description, |
diff --git a/src/video_core/engines/kepler_compute.h b/src/video_core/engines/kepler_compute.h index 99c82a9af..eeb79c56f 100644 --- a/src/video_core/engines/kepler_compute.h +++ b/src/video_core/engines/kepler_compute.h | |||
| @@ -220,6 +220,8 @@ public: | |||
| 220 | 220 | ||
| 221 | VideoCore::GuestDriverProfile& AccessGuestDriverProfile() override; | 221 | VideoCore::GuestDriverProfile& AccessGuestDriverProfile() override; |
| 222 | 222 | ||
| 223 | const VideoCore::GuestDriverProfile& AccessGuestDriverProfile() const override; | ||
| 224 | |||
| 223 | private: | 225 | private: |
| 224 | Core::System& system; | 226 | Core::System& system; |
| 225 | VideoCore::RasterizerInterface& rasterizer; | 227 | VideoCore::RasterizerInterface& rasterizer; |
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 8167864c0..7cea146f0 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp | |||
| @@ -788,4 +788,8 @@ VideoCore::GuestDriverProfile& Maxwell3D::AccessGuestDriverProfile() { | |||
| 788 | return rasterizer.AccessGuestDriverProfile(); | 788 | return rasterizer.AccessGuestDriverProfile(); |
| 789 | } | 789 | } |
| 790 | 790 | ||
| 791 | const VideoCore::GuestDriverProfile& Maxwell3D::AccessGuestDriverProfile() const { | ||
| 792 | return rasterizer.AccessGuestDriverProfile(); | ||
| 793 | } | ||
| 794 | |||
| 791 | } // namespace Tegra::Engines | 795 | } // namespace Tegra::Engines |
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 08ef95410..8808bbf76 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h | |||
| @@ -1308,6 +1308,8 @@ public: | |||
| 1308 | 1308 | ||
| 1309 | VideoCore::GuestDriverProfile& AccessGuestDriverProfile() override; | 1309 | VideoCore::GuestDriverProfile& AccessGuestDriverProfile() override; |
| 1310 | 1310 | ||
| 1311 | const VideoCore::GuestDriverProfile& AccessGuestDriverProfile() const override; | ||
| 1312 | |||
| 1311 | /// Memory for macro code - it's undetermined how big this is, however 1MB is much larger than | 1313 | /// Memory for macro code - it's undetermined how big this is, however 1MB is much larger than |
| 1312 | /// we've seen used. | 1314 | /// we've seen used. |
| 1313 | using MacroMemory = std::array<u32, 0x40000>; | 1315 | using MacroMemory = std::array<u32, 0x40000>; |
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h index 149f79af3..1b0cc56f1 100644 --- a/src/video_core/rasterizer_interface.h +++ b/src/video_core/rasterizer_interface.h | |||
| @@ -84,6 +84,10 @@ public: | |||
| 84 | return guest_driver_profile; | 84 | return guest_driver_profile; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | const GuestDriverProfile& AccessGuestDriverProfile() const { | ||
| 88 | return guest_driver_profile; | ||
| 89 | } | ||
| 90 | |||
| 87 | private: | 91 | private: |
| 88 | GuestDriverProfile guest_driver_profile{}; | 92 | GuestDriverProfile guest_driver_profile{}; |
| 89 | }; | 93 | }; |
diff --git a/src/video_core/shader/const_buffer_locker.h b/src/video_core/shader/const_buffer_locker.h index c7b72fa5e..f5655ac64 100644 --- a/src/video_core/shader/const_buffer_locker.h +++ b/src/video_core/shader/const_buffer_locker.h | |||
| @@ -81,7 +81,7 @@ public: | |||
| 81 | return bound_buffer; | 81 | return bound_buffer; |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | VideoCore::GuestDriverProfile* AccessGuestDriverProfile() { | 84 | VideoCore::GuestDriverProfile* AccessGuestDriverProfile() const { |
| 85 | if (engine) { | 85 | if (engine) { |
| 86 | return &(engine->AccessGuestDriverProfile()); | 86 | return &(engine->AccessGuestDriverProfile()); |
| 87 | } | 87 | } |