diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-15 05:07:57 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-02-07 02:23:39 +0100 |
commit | cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b (patch) | |
tree | 1ba7045068bc52438b1e40548597c4f4cec62120 /src/video_core/shader/shader_ir.h | |
parent | settings: Hide shader cache behind a setting (diff) | |
download | yuzu-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 '')
-rw-r--r-- | src/video_core/shader/shader_ir.h | 9 |
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{}; |