mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Add initial support for GLSL ES 3.10.
GLSL ES 3.10 adds implicit support for the binding layout qualifier that we use. Changes our GLSL version enums to bit values so we can check for both ES versions easily.
This commit is contained in:
@ -223,7 +223,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
|
||||
out.Write("\n");
|
||||
|
||||
if (ApiType == API_OPENGL)
|
||||
out.Write("layout(std140%s) uniform PSBlock {\n", g_ActiveConfig.backend_info.bSupportShadingLanguage420pack ? ", binding = 1" : "");
|
||||
out.Write("layout(std140%s) uniform PSBlock {\n", g_ActiveConfig.backend_info.bSupportsBindingLayout ? ", binding = 1" : "");
|
||||
|
||||
DeclareUniform(out, ApiType, C_COLORS, "int4", I_COLORS"[4]");
|
||||
DeclareUniform(out, ApiType, C_KCOLORS, "int4", I_KCOLORS"[4]");
|
||||
|
@ -83,7 +83,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
|
||||
|
||||
// uniforms
|
||||
if (api_type == API_OPENGL)
|
||||
out.Write("layout(std140%s) uniform VSBlock {\n", g_ActiveConfig.backend_info.bSupportShadingLanguage420pack ? ", binding = 2" : "");
|
||||
out.Write("layout(std140%s) uniform VSBlock {\n", g_ActiveConfig.backend_info.bSupportsBindingLayout ? ", binding = 2" : "");
|
||||
|
||||
DeclareUniform(out, api_type, C_POSNORMALMATRIX, "float4", I_POSNORMALMATRIX"[6]");
|
||||
DeclareUniform(out, api_type, C_PROJECTION, "float4", I_PROJECTION"[4]");
|
||||
|
@ -152,7 +152,7 @@ struct VideoConfig final
|
||||
bool bSupportsSeparateAlphaFunction;
|
||||
bool bSupportsOversizedViewports;
|
||||
bool bSupportsEarlyZ; // needed by PixelShaderGen, so must stay in VideoCommon
|
||||
bool bSupportShadingLanguage420pack; // needed by ShaderGen, so must stay in VideoCommon
|
||||
bool bSupportsBindingLayout; // Needed by ShaderGen, so must stay in VideoCommon
|
||||
} backend_info;
|
||||
|
||||
// Utility
|
||||
|
Reference in New Issue
Block a user