diff options
author | bunnei <bunneidev@gmail.com> | 2018-06-06 05:34:37 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-06-07 00:09:05 +0200 |
commit | 4112aa68a673db4a8b73bc53270fdfa7f68532bf (patch) | |
tree | 8b40b7928a58138b883236942d777651b5a9fe4c /src/video_core/renderer_opengl/gl_shader_gen.h | |
parent | gl_shader_decompiler: Refactor uniform handling to allow different decodings. (diff) | |
download | yuzu-4112aa68a673db4a8b73bc53270fdfa7f68532bf.tar yuzu-4112aa68a673db4a8b73bc53270fdfa7f68532bf.tar.gz yuzu-4112aa68a673db4a8b73bc53270fdfa7f68532bf.tar.bz2 yuzu-4112aa68a673db4a8b73bc53270fdfa7f68532bf.tar.lz yuzu-4112aa68a673db4a8b73bc53270fdfa7f68532bf.tar.xz yuzu-4112aa68a673db4a8b73bc53270fdfa7f68532bf.tar.zst yuzu-4112aa68a673db4a8b73bc53270fdfa7f68532bf.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_gen.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.h b/src/video_core/renderer_opengl/gl_shader_gen.h index 458032b5c..ad795610c 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.h +++ b/src/video_core/renderer_opengl/gl_shader_gen.h @@ -22,17 +22,28 @@ class ConstBufferEntry { using Maxwell = Tegra::Engines::Maxwell3D::Regs; public: - void MarkAsUsed(unsigned index, unsigned offset, Maxwell::ShaderStage stage) { + void MarkAsUsed(u64 index, u64 offset, Maxwell::ShaderStage stage) { is_used = true; - this->index = index; + this->index = static_cast<unsigned>(index); + this->stage = stage; + max_offset = std::max(max_offset, static_cast<unsigned>(offset)); + } + + void MarkAsUsedIndirect(u64 index, Maxwell::ShaderStage stage) { + is_used = true; + is_indirect = true; + this->index = static_cast<unsigned>(index); this->stage = stage; - max_offset = std::max(max_offset, offset); } bool IsUsed() const { return is_used; } + bool IsIndirect() const { + return is_indirect; + } + unsigned GetIndex() const { return index; } @@ -51,6 +62,7 @@ private: }; bool is_used{}; + bool is_indirect{}; unsigned index{}; unsigned max_offset{}; Maxwell::ShaderStage stage; |