mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
OpenGL: use shader 420pack if available to staticly bind ubo location
Bindung locations after compiling a shader stalls the driver. So if we manage not to bind anything after compilation, the lag would be reduced much.
This commit is contained in:
@ -84,7 +84,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
|
||||
|
||||
// uniforms
|
||||
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
|
||||
out.Write("layout(std140) uniform VSBlock {\n");
|
||||
out.Write("layout(std140%s) uniform VSBlock {\n", g_ActiveConfig.backend_info.bSupportShadingLanguage420pack ? ", binding = 2" : "");
|
||||
|
||||
DeclareUniform(out, api_type, g_ActiveConfig.backend_info.bSupportsGLSLUBO, C_POSNORMALMATRIX, "float4", I_POSNORMALMATRIX"[6]");
|
||||
DeclareUniform(out, api_type, g_ActiveConfig.backend_info.bSupportsGLSLUBO, C_PROJECTION, "float4", I_PROJECTION"[4]");
|
||||
|
Reference in New Issue
Block a user