gl_shader_disk_cache: Save GLSL and entries into the precompiled file

This commit is contained in:
ReinUsesLisp 2019-01-15 01:07:57 -03:00
parent e78da8dc1f
commit cfb20c4c9d
9 changed files with 234 additions and 135 deletions

View file

@ -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{};