summaryrefslogtreecommitdiff
path: root/src/video_core/shader
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2019-01-15 01:07:57 -0300
committerGravatar ReinUsesLisp2019-02-06 22:23:39 -0300
commitcfb20c4c9d863698b938aaad3d27cfe8e4eedb2b (patch)
tree1ba7045068bc52438b1e40548597c4f4cec62120 /src/video_core/shader
parentsettings: Hide shader cache behind a setting (diff)
downloadyuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar.gz
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.tar.xz
yuzu-cfb20c4c9d863698b938aaad3d27cfe8e4eedb2b.zip
gl_shader_disk_cache: Save GLSL and entries into the precompiled file
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:
236 236
237class ConstBuffer { 237class ConstBuffer {
238public: 238public:
239 explicit ConstBuffer(u32 max_offset, bool is_indirect)
240 : max_offset{max_offset}, is_indirect{is_indirect} {}
241
242 ConstBuffer() = default;
243
239 void MarkAsUsed(u64 offset) { 244 void MarkAsUsed(u64 offset) {
240 max_offset = std::max(max_offset, static_cast<u32>(offset)); 245 max_offset = std::max(max_offset, static_cast<u32>(offset));
241 } 246 }
@@ -252,6 +257,10 @@ public:
252 return max_offset + sizeof(float); 257 return max_offset + sizeof(float);
253 } 258 }
254 259
260 u32 GetMaxOffset() const {
261 return max_offset;
262 }
263
255private: 264private:
256 u32 max_offset{}; 265 u32 max_offset{};
257 bool is_indirect{}; 266 bool is_indirect{};