From 145c3ac89e14c5400e617d4af08c3b8c251cf7c8 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sun, 13 Jan 2019 22:36:52 -0300 Subject: gl_shader_disk_cache: Add file and move BaseBindings declaration --- .../renderer_opengl/gl_shader_disk_cache.h | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/video_core/renderer_opengl/gl_shader_disk_cache.h (limited to 'src/video_core/renderer_opengl/gl_shader_disk_cache.h') diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.h b/src/video_core/renderer_opengl/gl_shader_disk_cache.h new file mode 100644 index 000000000..cb40e9926 --- /dev/null +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.h @@ -0,0 +1,41 @@ +// Copyright 2019 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include + +#include "common/common_types.h" +#include "video_core/engines/maxwell_3d.h" + +namespace OpenGL { + +using ProgramCode = std::vector; +using Maxwell = Tegra::Engines::Maxwell3D::Regs; + +struct BaseBindings { +private: + auto Tie() const { + return std::tie(cbuf, gmem, sampler); + } + +public: + u32 cbuf{}; + u32 gmem{}; + u32 sampler{}; + + bool operator<(const BaseBindings& rhs) const { + return Tie() < rhs.Tie(); + } + + bool operator==(const BaseBindings& rhs) const { + return Tie() == rhs.Tie(); + } + + bool operator!=(const BaseBindings& rhs) const { + return !this->operator==(rhs); + } +}; + +} // namespace OpenGL \ No newline at end of file -- cgit v1.2.3