mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Moved some of the new shader uid stuff to a common header file.
This commit is contained in:
@ -42,7 +42,7 @@ GLuint VertexShaderCache::CurrentShader;
|
||||
bool VertexShaderCache::ShaderEnabled;
|
||||
|
||||
VertexShaderCache::VSCacheEntry* VertexShaderCache::last_entry = NULL;
|
||||
ShaderUid VertexShaderCache::last_uid;
|
||||
VertexShaderUid VertexShaderCache::last_uid;
|
||||
|
||||
static int s_nMaxVertexInstructions;
|
||||
|
||||
@ -75,8 +75,8 @@ void VertexShaderCache::Shutdown()
|
||||
VERTEXSHADER* VertexShaderCache::SetShader(u32 components)
|
||||
{
|
||||
// Possible optimization: Don't always generate the shader uid, but keep track of changes in BPStructs instead
|
||||
ShaderUid uid;
|
||||
GenerateShaderUid(uid, components, API_OPENGL);
|
||||
VertexShaderUid uid;
|
||||
GetVertexShaderUid(uid, components, API_OPENGL);
|
||||
if (last_entry)
|
||||
{
|
||||
if (uid == last_uid)
|
||||
@ -101,8 +101,8 @@ VERTEXSHADER* VertexShaderCache::SetShader(u32 components)
|
||||
// Make an entry in the table
|
||||
VSCacheEntry& entry = vshaders[uid];
|
||||
last_entry = &entry;
|
||||
ShaderCode code;
|
||||
GenerateShaderCode(code, components, API_OPENGL);
|
||||
VertexShaderCode code;
|
||||
GenerateVertexShaderCode(code, components, API_OPENGL);
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
if (g_ActiveConfig.iLog & CONF_SAVESHADERS && code) {
|
||||
|
Reference in New Issue
Block a user