Permalink
Browse files

video-gliden64: more test fixes for nexus 6p this time focused on OpenGL

ES 3.1
  • Loading branch information...
fzurita committed Mar 9, 2016
1 parent ec7da6e commit 57b388837cc3774c09bb6f36d20e10bcdb1ae4ec
@@ -291,6 +291,25 @@ ShaderCombiner::ShaderCombiner(Combiner & _color, Combiner & _alpha, const gDPCo
if (usesTexture ())
{
strFragmentShader.assign (fragment_shader_header_common_variables);
+
+#ifdef GL_MULTISAMPLING_SUPPORT
+ if (config.video.multisampling > 0)
+ {
+ if(usesTile(0) || usesTile(1))
+ {
+ strFragmentShader.append (fragment_shader_header_common_variables_ms_enabled);
+ }
+ if(usesTile(0))
+ {
+ strFragmentShader.append (fragment_shader_header_common_variables_ms_tex0);
+ }
+ if(usesTile(1))
+ {
+ strFragmentShader.append (fragment_shader_header_common_variables_ms_tex1);
+ }
+ }
+#endif
+
strFragmentShader.append (fragment_shader_header_noise);
strFragmentShader.append (fragment_shader_header_noise_dither);
@@ -303,7 +322,10 @@ ShaderCombiner::ShaderCombiner(Combiner & _color, Combiner & _alpha, const gDPCo
strFragmentShader.append (fragment_shader_header_readTex);
#ifdef GL_MULTISAMPLING_SUPPORT
if (config.video.multisampling > 0)
- strFragmentShader.append(fragment_shader_header_readTexMS);
+ {
+ strFragmentShader.append(fragment_shader_header_readTexMS);
+ }
+
#endif
}
#ifdef GL_IMAGE_TEXTURES_SUPPORT
@@ -449,11 +471,6 @@ ShaderCombiner::ShaderCombiner(Combiner & _color, Combiner & _alpha, const gDPCo
pos += max;
}
}
- else
- {
- LOG(LOG_ERROR, "NO Error in fragment shader");
-
- }
m_program = glCreateProgram();
_locate_attributes();
@@ -146,11 +146,6 @@ static const char* fragment_shader_header_common_variables =
MAIN_SHADER_VERSION
"uniform sampler2D uTex0; \n"
"uniform sampler2D uTex1; \n"
-#ifdef GL_MULTISAMPLING_SUPPORT
-"uniform lowp sampler2DMS uMSTex0; \n"
-"uniform lowp sampler2DMS uMSTex1; \n"
-"uniform lowp ivec2 uMSTexEnabled; \n"
-#endif
"layout (std140) uniform ColorsBlock {\n"
" lowp vec4 uFogColor; \n"
" lowp vec4 uCenterColor; \n"
@@ -185,6 +180,19 @@ MAIN_SHADER_VERSION
"out lowp vec4 fragColor; \n"
;
+#ifdef GL_MULTISAMPLING_SUPPORT
+static const char* fragment_shader_header_common_variables_ms_enabled =
+"uniform lowp ivec2 uMSTexEnabled; \n";
+
+static const char* fragment_shader_header_common_variables_ms_tex0 =
+"uniform lowp sampler2DMS uMSTex0; \n";
+
+static const char* fragment_shader_header_common_variables_ms_tex1 =
+"uniform lowp sampler2DMS uMSTex1; \n";
+#endif
+
+
+
static const char* fragment_shader_header_common_variables_notex =
MAIN_SHADER_VERSION
"layout (std140) uniform ColorsBlock {\n"

0 comments on commit 57b3888

Please sign in to comment.