summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_sampler_cache.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-04-02 21:58:08 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-04-02 21:58:08 +0200
commit576ad9a012a22615ad430dd898b47a8d59b9ee3f (patch)
tree761b2f2f14df046be865cb9820b80ec3811bdfed /src/video_core/renderer_opengl/gl_sampler_cache.h
parentvideo_core: Abstract vk_sampler_cache into a templated class (diff)
downloadyuzu-576ad9a012a22615ad430dd898b47a8d59b9ee3f.tar
yuzu-576ad9a012a22615ad430dd898b47a8d59b9ee3f.tar.gz
yuzu-576ad9a012a22615ad430dd898b47a8d59b9ee3f.tar.bz2
yuzu-576ad9a012a22615ad430dd898b47a8d59b9ee3f.tar.lz
yuzu-576ad9a012a22615ad430dd898b47a8d59b9ee3f.tar.xz
yuzu-576ad9a012a22615ad430dd898b47a8d59b9ee3f.tar.zst
yuzu-576ad9a012a22615ad430dd898b47a8d59b9ee3f.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_sampler_cache.h')
-rw-r--r--src/video_core/renderer_opengl/gl_sampler_cache.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_sampler_cache.h b/src/video_core/renderer_opengl/gl_sampler_cache.h
new file mode 100644
index 000000000..defbc2d81
--- /dev/null
+++ b/src/video_core/renderer_opengl/gl_sampler_cache.h
@@ -0,0 +1,25 @@
+// Copyright 2019 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <glad/glad.h>
+
+#include "video_core/renderer_opengl/gl_resource_manager.h"
+#include "video_core/sampler_cache.h"
+
+namespace OpenGL {
+
+class SamplerCacheOpenGL final : public VideoCommon::SamplerCache<GLuint, OGLSampler> {
+public:
+ explicit SamplerCacheOpenGL();
+ ~SamplerCacheOpenGL();
+
+protected:
+ OGLSampler CreateSampler(const Tegra::Texture::TSCEntry& tsc) const;
+
+ GLuint ToSamplerType(const OGLSampler& sampler) const;
+};
+
+} // namespace OpenGL