summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_cache.h
diff options
context:
space:
mode:
authorMarkus Wick <markus@selfnet.de>2018-09-04 20:55:34 +0200
committerMarkus Wick <markus@selfnet.de>2018-09-04 21:04:41 +0200
commit99a71580c4356c51bcb5f18b10be55f1e62a65e5 (patch)
tree8e32bd63d0d5e0297208959bbb9b6851ab39ba8f /src/video_core/renderer_opengl/gl_shader_cache.h
parentMerge pull request #1238 from lioncash/explicit (diff)
downloadyuzu-99a71580c4356c51bcb5f18b10be55f1e62a65e5.tar
yuzu-99a71580c4356c51bcb5f18b10be55f1e62a65e5.tar.gz
yuzu-99a71580c4356c51bcb5f18b10be55f1e62a65e5.tar.bz2
yuzu-99a71580c4356c51bcb5f18b10be55f1e62a65e5.tar.lz
yuzu-99a71580c4356c51bcb5f18b10be55f1e62a65e5.tar.xz
yuzu-99a71580c4356c51bcb5f18b10be55f1e62a65e5.tar.zst
yuzu-99a71580c4356c51bcb5f18b10be55f1e62a65e5.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_cache.h')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.h b/src/video_core/renderer_opengl/gl_shader_cache.h
index 759987604..6e6febcbc 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.h
+++ b/src/video_core/renderer_opengl/gl_shader_cache.h
@@ -4,8 +4,8 @@
#pragma once
+#include <map>
#include <memory>
-#include <unordered_map>
#include "common/common_types.h"
#include "video_core/rasterizer_cache.h"
@@ -43,10 +43,10 @@ public:
}
/// Gets the GL program resource location for the specified resource, caching as needed
- GLuint GetProgramResourceIndex(const std::string& name);
+ GLuint GetProgramResourceIndex(const GLShader::ConstBufferEntry& buffer);
/// Gets the GL uniform location for the specified resource, caching as needed
- GLint GetUniformLocation(const std::string& name);
+ GLint GetUniformLocation(const GLShader::SamplerEntry& sampler);
private:
VAddr addr;
@@ -55,8 +55,8 @@ private:
GLShader::ShaderEntries entries;
OGLProgram program;
- std::unordered_map<std::string, GLuint> resource_cache;
- std::unordered_map<std::string, GLint> uniform_cache;
+ std::map<u32, GLuint> resource_cache;
+ std::map<u32, GLint> uniform_cache;
};
class ShaderCacheOpenGL final : public RasterizerCache<Shader> {