summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-01-15 05:07:57 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-02-07 02:23:39 +0100
commitcfb20c4c9d863698b938aaad3d27cfe8e4eedb2b (patch)
tree1ba7045068bc52438b1e40548597c4f4cec62120 /src/video_core/shader
parentsettings: Hide shader cache behind a setting (diff)
downloadyuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar.gz
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar.bz2
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar.lz
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar.xz
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar.zst
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.zip
Diffstat (limited to 'src/video_core/shader')
-rw-r--r--src/video_core/shader/shader_ir.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h
index 6e42e3dfb..ef0f3a106 100644
--- a/src/video_core/shader/shader_ir.h
+++ b/src/video_core/shader/shader_ir.h
@@ -236,6 +236,11 @@ private:
class ConstBuffer {
public:
+ explicit ConstBuffer(u32 max_offset, bool is_indirect)
+ : max_offset{max_offset}, is_indirect{is_indirect} {}
+
+ ConstBuffer() = default;
+
void MarkAsUsed(u64 offset) {
max_offset = std::max(max_offset, static_cast<u32>(offset));
}
@@ -252,6 +257,10 @@ public:
return max_offset + sizeof(float);
}
+ u32 GetMaxOffset() const {
+ return max_offset;
+ }
+
private:
u32 max_offset{};
bool is_indirect{};