summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2018-01-21 00:59:10 +1000
committerStenzek <stenzek@gmail.com>2018-02-22 19:08:52 +1000
commit3fd4142f361bd6af2c147faf48e1d1d62d170067 (patch)
tree824e1fe80fab472c0073232ac7580a4132ce3e9a /Source/Core/VideoBackends/OGL/ProgramShaderCache.h
parentfca9c28f38e46b78bf65c3b427a21560e5fb42b7 (diff)
OGL: Track state of last bound vertex array object
This reduces the overhead of calling glBindVertexArray() every time RestoreAPIState() is called, even when it is redundant.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/ProgramShaderCache.h')
-rw-r--r--Source/Core/VideoBackends/OGL/ProgramShaderCache.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
index 83f9d0e817..6d3f95954e 100644
--- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
+++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
@@ -98,7 +98,6 @@ public:
static SHADER* SetUberShader(PrimitiveType primitive_type, const GLVertexFormat* vertex_format);
static void BindVertexFormat(const GLVertexFormat* vertex_format);
static void InvalidateVertexFormat();
- static void BindLastVertexFormat();
static bool CompileShader(SHADER& shader, const std::string& vcode, const std::string& pcode,
const std::string& gcode = "");
@@ -191,6 +190,7 @@ private:
typedef std::map<SHADERUID, PCacheEntry> PCache;
typedef std::map<UBERSHADERUID, PCacheEntry> UberPCache;
+ static void CreateAttributelessVAO();
static GLuint CreateProgramFromBinary(const u8* value, u32 value_size);
static bool CreateCacheEntryFromBinary(PCacheEntry* entry, const u8* value, u32 value_size);
static void LoadProgramBinaries();
@@ -210,7 +210,10 @@ private:
static std::unique_ptr<SharedContextAsyncShaderCompiler> s_async_compiler;
static u32 s_ubo_buffer_size;
static s32 s_ubo_align;
- static u32 s_last_VAO;
+
+ static GLuint s_attributeless_VBO;
+ static GLuint s_attributeless_VAO;
+ static GLuint s_last_VAO;
};
} // namespace OGL