gl_rasterizer: Implement global memory management

This commit is contained in:
ReinUsesLisp
2019-01-05 01:01:38 -03:00
parent 3b84e04af1
commit 9f803299de
6 changed files with 140 additions and 4 deletions

View File

@@ -76,6 +76,9 @@ public:
/// Gets the GL program resource location for the specified resource, caching as needed
GLuint GetProgramResourceIndex(const GLShader::ConstBufferEntry& buffer);
/// Gets the GL program resource location for the specified resource, caching as needed
GLuint GetProgramResourceIndex(const GLShader::GlobalMemoryEntry& global_mem);
/// Gets the GL uniform location for the specified resource, caching as needed
GLint GetUniformLocation(const GLShader::SamplerEntry& sampler);
@@ -107,7 +110,8 @@ private:
OGLProgram triangles_adjacency;
} geometry_programs;
std::map<u32, GLuint> resource_cache;
std::map<u32, GLuint> cbuf_resource_cache;
std::map<u32, GLuint> gmem_resource_cache;
std::map<u32, GLint> uniform_cache;
};