Merge pull request #3209 from Tilka/small_cleanup
Another small video cleanup
This commit is contained in:
commit
dabb411a4c
|
@ -27,7 +27,7 @@ namespace DX11
|
|||
PixelShaderCache::PSCache PixelShaderCache::PixelShaders;
|
||||
const PixelShaderCache::PSCacheEntry* PixelShaderCache::last_entry;
|
||||
PixelShaderUid PixelShaderCache::last_uid;
|
||||
UidChecker<PixelShaderUid,PixelShaderCode> PixelShaderCache::pixel_uid_checker;
|
||||
UidChecker<PixelShaderUid, ShaderCode> PixelShaderCache::pixel_uid_checker;
|
||||
|
||||
LinearDiskCache<PixelShaderUid, u8> g_ps_disk_cache;
|
||||
|
||||
|
@ -531,7 +531,7 @@ bool PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components)
|
|||
GetPixelShaderUid(uid, dstAlphaMode, API_D3D, components);
|
||||
if (g_ActiveConfig.bEnableShaderDebugging)
|
||||
{
|
||||
PixelShaderCode code;
|
||||
ShaderCode code;
|
||||
GeneratePixelShaderCode(code, dstAlphaMode, API_D3D, components);
|
||||
pixel_uid_checker.AddToIndexAndCheck(code, uid, "Pixel", "p");
|
||||
}
|
||||
|
@ -561,7 +561,7 @@ bool PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components)
|
|||
}
|
||||
|
||||
// Need to compile a new shader
|
||||
PixelShaderCode code;
|
||||
ShaderCode code;
|
||||
GeneratePixelShaderCode(code, dstAlphaMode, API_D3D, components);
|
||||
|
||||
D3DBlob* pbytecode;
|
||||
|
|
|
@ -53,7 +53,7 @@ private:
|
|||
static const PSCacheEntry* last_entry;
|
||||
static PixelShaderUid last_uid;
|
||||
|
||||
static UidChecker<PixelShaderUid,PixelShaderCode> pixel_uid_checker;
|
||||
static UidChecker<PixelShaderUid, ShaderCode> pixel_uid_checker;
|
||||
};
|
||||
|
||||
} // namespace DX11
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace DX11 {
|
|||
VertexShaderCache::VSCache VertexShaderCache::vshaders;
|
||||
const VertexShaderCache::VSCacheEntry *VertexShaderCache::last_entry;
|
||||
VertexShaderUid VertexShaderCache::last_uid;
|
||||
UidChecker<VertexShaderUid,VertexShaderCode> VertexShaderCache::vertex_uid_checker;
|
||||
UidChecker<VertexShaderUid, ShaderCode> VertexShaderCache::vertex_uid_checker;
|
||||
|
||||
static ID3D11VertexShader* SimpleVertexShader = nullptr;
|
||||
static ID3D11VertexShader* ClearVertexShader = nullptr;
|
||||
|
@ -190,7 +190,7 @@ bool VertexShaderCache::SetShader(u32 components)
|
|||
GetVertexShaderUid(uid, components, API_D3D);
|
||||
if (g_ActiveConfig.bEnableShaderDebugging)
|
||||
{
|
||||
VertexShaderCode code;
|
||||
ShaderCode code;
|
||||
GenerateVertexShaderCode(code, components, API_D3D);
|
||||
vertex_uid_checker.AddToIndexAndCheck(code, uid, "Vertex", "v");
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ bool VertexShaderCache::SetShader(u32 components)
|
|||
return (entry.shader != nullptr);
|
||||
}
|
||||
|
||||
VertexShaderCode code;
|
||||
ShaderCode code;
|
||||
GenerateVertexShaderCode(code, components, API_D3D);
|
||||
|
||||
D3DBlob* pbytecode = nullptr;
|
||||
|
|
|
@ -59,7 +59,7 @@ private:
|
|||
static const VSCacheEntry* last_entry;
|
||||
static VertexShaderUid last_uid;
|
||||
|
||||
static UidChecker<VertexShaderUid,VertexShaderCode> vertex_uid_checker;
|
||||
static UidChecker<VertexShaderUid, ShaderCode> vertex_uid_checker;
|
||||
};
|
||||
|
||||
} // namespace DX11
|
||||
|
|
|
@ -36,9 +36,9 @@ static GLuint CurrentProgram = 0;
|
|||
ProgramShaderCache::PCache ProgramShaderCache::pshaders;
|
||||
ProgramShaderCache::PCacheEntry* ProgramShaderCache::last_entry;
|
||||
SHADERUID ProgramShaderCache::last_uid;
|
||||
UidChecker<PixelShaderUid,PixelShaderCode> ProgramShaderCache::pixel_uid_checker;
|
||||
UidChecker<VertexShaderUid,VertexShaderCode> ProgramShaderCache::vertex_uid_checker;
|
||||
UidChecker<GeometryShaderUid,ShaderCode> ProgramShaderCache::geometry_uid_checker;
|
||||
UidChecker<PixelShaderUid, ShaderCode> ProgramShaderCache::pixel_uid_checker;
|
||||
UidChecker<VertexShaderUid, ShaderCode> ProgramShaderCache::vertex_uid_checker;
|
||||
UidChecker<GeometryShaderUid, ShaderCode> ProgramShaderCache::geometry_uid_checker;
|
||||
|
||||
static char s_glsl_header[1024] = "";
|
||||
|
||||
|
@ -211,8 +211,8 @@ SHADER* ProgramShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components
|
|||
last_entry = &newentry;
|
||||
newentry.in_cache = 0;
|
||||
|
||||
VertexShaderCode vcode;
|
||||
PixelShaderCode pcode;
|
||||
ShaderCode vcode;
|
||||
ShaderCode pcode;
|
||||
ShaderCode gcode;
|
||||
GenerateVertexShaderCode(vcode, components, API_OPENGL);
|
||||
GeneratePixelShaderCode(pcode, dstAlphaMode, API_OPENGL, components);
|
||||
|
@ -404,11 +404,11 @@ void ProgramShaderCache::GetShaderId(SHADERUID* uid, DSTALPHA_MODE dstAlphaMode,
|
|||
|
||||
if (g_ActiveConfig.bEnableShaderDebugging)
|
||||
{
|
||||
PixelShaderCode pcode;
|
||||
ShaderCode pcode;
|
||||
GeneratePixelShaderCode(pcode, dstAlphaMode, API_OPENGL, components);
|
||||
pixel_uid_checker.AddToIndexAndCheck(pcode, uid->puid, "Pixel", "p");
|
||||
|
||||
VertexShaderCode vcode;
|
||||
ShaderCode vcode;
|
||||
GenerateVertexShaderCode(vcode, components, API_OPENGL);
|
||||
vertex_uid_checker.AddToIndexAndCheck(vcode, uid->vuid, "Vertex", "v");
|
||||
|
||||
|
|
|
@ -111,9 +111,9 @@ private:
|
|||
static PCacheEntry* last_entry;
|
||||
static SHADERUID last_uid;
|
||||
|
||||
static UidChecker<PixelShaderUid,PixelShaderCode> pixel_uid_checker;
|
||||
static UidChecker<VertexShaderUid,VertexShaderCode> vertex_uid_checker;
|
||||
static UidChecker<GeometryShaderUid,ShaderCode> geometry_uid_checker;
|
||||
static UidChecker<PixelShaderUid, ShaderCode> pixel_uid_checker;
|
||||
static UidChecker<VertexShaderUid, ShaderCode> vertex_uid_checker;
|
||||
static UidChecker<GeometryShaderUid, ShaderCode> geometry_uid_checker;
|
||||
|
||||
static u32 s_ubo_buffer_size;
|
||||
static s32 s_ubo_align;
|
||||
|
|
|
@ -1173,9 +1173,9 @@ void GetPixelShaderUid(PixelShaderUid& object, DSTALPHA_MODE dstAlphaMode, API_T
|
|||
GeneratePixelShader<PixelShaderUid>(object, dstAlphaMode, ApiType, components);
|
||||
}
|
||||
|
||||
void GeneratePixelShaderCode(PixelShaderCode& object, DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u32 components)
|
||||
void GeneratePixelShaderCode(ShaderCode& object, DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u32 components)
|
||||
{
|
||||
GeneratePixelShader<PixelShaderCode>(object, dstAlphaMode, ApiType, components);
|
||||
GeneratePixelShader<ShaderCode>(object, dstAlphaMode, ApiType, components);
|
||||
}
|
||||
|
||||
void GetPixelShaderConstantProfile(PixelShaderConstantProfile& object, DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u32 components)
|
||||
|
|
|
@ -114,9 +114,8 @@ struct pixel_shader_uid_data
|
|||
#pragma pack()
|
||||
|
||||
typedef ShaderUid<pixel_shader_uid_data> PixelShaderUid;
|
||||
typedef ShaderCode PixelShaderCode; // TODO: Obsolete
|
||||
typedef ShaderConstantProfile PixelShaderConstantProfile; // TODO: Obsolete
|
||||
|
||||
void GeneratePixelShaderCode(PixelShaderCode& object, DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u32 components);
|
||||
void GeneratePixelShaderCode(ShaderCode& object, DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u32 components);
|
||||
void GetPixelShaderUid(PixelShaderUid& object, DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u32 components);
|
||||
void GetPixelShaderConstantProfile(PixelShaderConstantProfile& object, DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u32 components);
|
||||
|
|
|
@ -399,7 +399,7 @@ void GetVertexShaderUid(VertexShaderUid& object, u32 components, API_TYPE api_ty
|
|||
GenerateVertexShader<VertexShaderUid>(object, components, api_type);
|
||||
}
|
||||
|
||||
void GenerateVertexShaderCode(VertexShaderCode& object, u32 components, API_TYPE api_type)
|
||||
void GenerateVertexShaderCode(ShaderCode& object, u32 components, API_TYPE api_type)
|
||||
{
|
||||
GenerateVertexShader<VertexShaderCode>(object, components, api_type);
|
||||
GenerateVertexShader<ShaderCode>(object, components, api_type);
|
||||
}
|
||||
|
|
|
@ -59,7 +59,6 @@ struct vertex_shader_uid_data
|
|||
#pragma pack()
|
||||
|
||||
typedef ShaderUid<vertex_shader_uid_data> VertexShaderUid;
|
||||
typedef ShaderCode VertexShaderCode; // TODO: Obsolete..
|
||||
|
||||
void GetVertexShaderUid(VertexShaderUid& object, u32 components, API_TYPE api_type);
|
||||
void GenerateVertexShaderCode(VertexShaderCode& object, u32 components, API_TYPE api_type);
|
||||
void GenerateVertexShaderCode(ShaderCode& object, u32 components, API_TYPE api_type);
|
||||
|
|
Loading…
Reference in New Issue