summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/const_buffer_locker.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-01-03 23:15:24 +0100
committerFernandoS27 <fsahmkow27@gmail.com>2020-01-24 21:43:29 +0100
commit1e4b6bef6f1b278bdc99170b76f33179a2eff26f (patch)
tree1f61df883d015efc725638d811c76ea82723861d /src/video_core/shader/const_buffer_locker.h
parentGPU: Implement guest driver profile and deduce texture handler sizes. (diff)
downloadyuzu-1e4b6bef6f1b278bdc99170b76f33179a2eff26f.tar
yuzu-1e4b6bef6f1b278bdc99170b76f33179a2eff26f.tar.gz
yuzu-1e4b6bef6f1b278bdc99170b76f33179a2eff26f.tar.bz2
yuzu-1e4b6bef6f1b278bdc99170b76f33179a2eff26f.tar.lz
yuzu-1e4b6bef6f1b278bdc99170b76f33179a2eff26f.tar.xz
yuzu-1e4b6bef6f1b278bdc99170b76f33179a2eff26f.tar.zst
yuzu-1e4b6bef6f1b278bdc99170b76f33179a2eff26f.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/shader/const_buffer_locker.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/video_core/shader/const_buffer_locker.h b/src/video_core/shader/const_buffer_locker.h
index 78d9d7037..f26cce2ce 100644
--- a/src/video_core/shader/const_buffer_locker.h
+++ b/src/video_core/shader/const_buffer_locker.h
@@ -41,6 +41,8 @@ public:
std::optional<Tegra::Engines::SamplerDescriptor> ObtainBindlessSampler(u32 buffer, u32 offset);
+ std::optional<u32> ObtainBoundBuffer();
+
/// Inserts a key.
void InsertKey(u32 buffer, u32 offset, u32 value);
@@ -50,6 +52,10 @@ public:
/// Inserts a bindless sampler key.
void InsertBindlessSampler(u32 buffer, u32 offset, Tegra::Engines::SamplerDescriptor sampler);
+ /// Set the bound buffer for this locker.
+
+ void SetBoundBuffer(u32 buffer);
+
/// Checks keys and samplers against engine's current const buffers. Returns true if they are
/// the same value, false otherwise;
bool IsConsistent() const;
@@ -72,6 +78,10 @@ public:
return bindless_samplers;
}
+ u32 GetBoundBuffer() const {
+ return bound_buffer;
+ }
+
VideoCore::GuestDriverProfile* AccessGuestDriverProfile() {
if (engine) {
return &(engine->AccessGuestDriverProfile());
@@ -85,6 +95,8 @@ private:
KeyMap keys;
BoundSamplerMap bound_samplers;
BindlessSamplerMap bindless_samplers;
+ bool bound_buffer_saved{};
+ u32 bound_buffer{};
};
} // namespace VideoCommon::Shader