From 842d37257578f189333914d9f6509fac9355eeca Mon Sep 17 00:00:00 2001 From: GregF Date: Mon, 3 Nov 2014 16:52:56 -0700 Subject: [PATCH] In test Textured Triangle, change gl_FragColor to user outColor with location 0. --- tests/compiler_render_tests.cpp | 36 ++------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/tests/compiler_render_tests.cpp b/tests/compiler_render_tests.cpp index d5a631d9..2bb801d5 100644 --- a/tests/compiler_render_tests.cpp +++ b/tests/compiler_render_tests.cpp @@ -1765,45 +1765,13 @@ TEST_F(XglRenderTest, TexturedTriangle) "#extension GL_ARB_shading_language_420pack : enable\n" "layout (location = 0) in vec2 samplePos;\n" "layout (binding = 0) uniform sampler2D surface;\n" - "void main() {\n" - " vec4 texColor = textureLod(surface, samplePos, 0.0);\n" - " gl_FragColor = texColor;\n" - "}\n"; - - XglTestFramework::m_use_bil = true; - DrawTexturedTriangle(vertShaderText, fragShaderText); -} - -TEST_F(XglRenderTest, TexTriWithLocFragOut) -{ - // The expected result from this test is a red and green checkered triangle - static const char *vertShaderText = - "#version 130\n" - "out vec2 samplePos;\n" - "void main() {\n" - " vec2 vertices[3];" - " vertices[0] = vec2(-0.5, -0.5);\n" - " vertices[1] = vec2( 0.5, -0.5);\n" - " vertices[2] = vec2( 0.5, 0.5);\n" - " vec2 positions[3];" - " positions[0] = vec2( 0.0, 0.0);\n" - " positions[1] = vec2( 1.0, 0.0);\n" - " positions[2] = vec2( 1.0, 1.0);\n" - " samplePos = positions[gl_VertexID % 3];\n" - " gl_Position = vec4(vertices[gl_VertexID % 3], 0.0, 1.0);\n" - "}\n"; - - static const char *fragShaderText = - "#version 140\n" - "#extension GL_ARB_separate_shader_objects : enable\n" - "#extension GL_ARB_shading_language_420pack : enable\n" - "in vec2 samplePos;\n" "layout (location=0) out vec4 outColor;\n" - "uniform sampler2D surface;\n" "void main() {\n" " vec4 texColor = textureLod(surface, samplePos, 0.0);\n" " outColor = texColor;\n" "}\n"; + + XglTestFramework::m_use_bil = true; DrawTexturedTriangle(vertShaderText, fragShaderText); }