summaryrefslogtreecommitdiff
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorGravatar bunnei2020-02-01 20:41:40 -0500
committerGravatar GitHub2020-02-01 20:41:40 -0500
commitb5bbe7e752d5d36839a86638bfaa4b4c348497cd (patch)
treeb16b3f8ce5ec6233f9f822ad56418d74f0cd47ae /src/video_core/engines
parentMerge pull request #3268 from CJBok/deadzone (diff)
parentShader_IR: Address feedback. (diff)
downloadyuzu-b5bbe7e752d5d36839a86638bfaa4b4c348497cd.tar.gz
yuzu-b5bbe7e752d5d36839a86638bfaa4b4c348497cd.tar.xz
yuzu-b5bbe7e752d5d36839a86638bfaa4b4c348497cd.zip
Merge pull request #3282 from FernandoS27/indexed-samplers
Partially implement Indexed samplers in general and specific code in GLSL
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/const_buffer_engine_interface.h4
-rw-r--r--src/video_core/engines/kepler_compute.cpp8
-rw-r--r--src/video_core/engines/kepler_compute.h4
-rw-r--r--src/video_core/engines/maxwell_3d.cpp8
-rw-r--r--src/video_core/engines/maxwell_3d.h4
5 files changed, 28 insertions, 0 deletions
diff --git a/src/video_core/engines/const_buffer_engine_interface.h b/src/video_core/engines/const_buffer_engine_interface.h
index 44b8b8d22..d56a47710 100644
--- a/src/video_core/engines/const_buffer_engine_interface.h
+++ b/src/video_core/engines/const_buffer_engine_interface.h
@@ -9,6 +9,7 @@
9#include "common/common_types.h" 9#include "common/common_types.h"
10#include "video_core/engines/shader_bytecode.h" 10#include "video_core/engines/shader_bytecode.h"
11#include "video_core/engines/shader_type.h" 11#include "video_core/engines/shader_type.h"
12#include "video_core/guest_driver.h"
12#include "video_core/textures/texture.h" 13#include "video_core/textures/texture.h"
13 14
14namespace Tegra::Engines { 15namespace Tegra::Engines {
@@ -106,6 +107,9 @@ public:
106 virtual SamplerDescriptor AccessBindlessSampler(ShaderType stage, u64 const_buffer, 107 virtual SamplerDescriptor AccessBindlessSampler(ShaderType stage, u64 const_buffer,
107 u64 offset) const = 0; 108 u64 offset) const = 0;
108 virtual u32 GetBoundBuffer() const = 0; 109 virtual u32 GetBoundBuffer() const = 0;
110
111 virtual VideoCore::GuestDriverProfile& AccessGuestDriverProfile() = 0;
112 virtual const VideoCore::GuestDriverProfile& AccessGuestDriverProfile() const = 0;
109}; 113};
110 114
111} // 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 110406f2f..4b824aa4e 100644
--- a/src/video_core/engines/kepler_compute.cpp
+++ b/src/video_core/engines/kepler_compute.cpp
@@ -94,6 +94,14 @@ SamplerDescriptor KeplerCompute::AccessBindlessSampler(ShaderType stage, u64 con
94 return result; 94 return result;
95} 95}
96 96
97VideoCore::GuestDriverProfile& KeplerCompute::AccessGuestDriverProfile() {
98 return rasterizer.AccessGuestDriverProfile();
99}
100
101const VideoCore::GuestDriverProfile& KeplerCompute::AccessGuestDriverProfile() const {
102 return rasterizer.AccessGuestDriverProfile();
103}
104
97void KeplerCompute::ProcessLaunch() { 105void KeplerCompute::ProcessLaunch() {
98 const GPUVAddr launch_desc_loc = regs.launch_desc_loc.Address(); 106 const GPUVAddr launch_desc_loc = regs.launch_desc_loc.Address();
99 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 4ef3e0613..eeb79c56f 100644
--- a/src/video_core/engines/kepler_compute.h
+++ b/src/video_core/engines/kepler_compute.h
@@ -218,6 +218,10 @@ public:
218 return regs.tex_cb_index; 218 return regs.tex_cb_index;
219 } 219 }
220 220
221 VideoCore::GuestDriverProfile& AccessGuestDriverProfile() override;
222
223 const VideoCore::GuestDriverProfile& AccessGuestDriverProfile() const override;
224
221private: 225private:
222 Core::System& system; 226 Core::System& system;
223 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 58dfa8033..7cea146f0 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -784,4 +784,12 @@ SamplerDescriptor Maxwell3D::AccessBindlessSampler(ShaderType stage, u64 const_b
784 return result; 784 return result;
785} 785}
786 786
787VideoCore::GuestDriverProfile& Maxwell3D::AccessGuestDriverProfile() {
788 return rasterizer.AccessGuestDriverProfile();
789}
790
791const VideoCore::GuestDriverProfile& Maxwell3D::AccessGuestDriverProfile() const {
792 return rasterizer.AccessGuestDriverProfile();
793}
794
787} // 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 ee79260fc..8808bbf76 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -1306,6 +1306,10 @@ public:
1306 return regs.tex_cb_index; 1306 return regs.tex_cb_index;
1307 } 1307 }
1308 1308
1309 VideoCore::GuestDriverProfile& AccessGuestDriverProfile() override;
1310
1311 const VideoCore::GuestDriverProfile& AccessGuestDriverProfile() const override;
1312
1309 /// 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
1310 /// we've seen used. 1314 /// we've seen used.
1311 using MacroMemory = std::array<u32, 0x40000>; 1315 using MacroMemory = std::array<u32, 0x40000>;