Shader recompiler: Add UBO

This commit is contained in:
wheremyfoodat 2024-07-15 04:10:47 +03:00
parent fe4bbea2ef
commit c8eb1c1128
6 changed files with 105 additions and 22 deletions

View file

@ -67,7 +67,12 @@ class RendererGL final : public Renderer {
OpenGL::Framebuffer screenFramebuffer;
OpenGL::Texture blankTexture;
std::unordered_map<PICA::FragmentConfig, OpenGL::Program> shaderCache;
// Cached recompiled fragment shader
struct CachedProgram {
OpenGL::Program program;
uint uboBinding;
};
std::unordered_map<PICA::FragmentConfig, CachedProgram> shaderCache;
OpenGL::Framebuffer getColourFBO();
OpenGL::Texture getTexture(Texture& tex);