1*35238bceSAndroid Build Coastguard Worker /*-------------------------------------------------------------------------
2*35238bceSAndroid Build Coastguard Worker * drawElements Quality Program OpenGL ES 3.1 Module
3*35238bceSAndroid Build Coastguard Worker * -------------------------------------------------
4*35238bceSAndroid Build Coastguard Worker *
5*35238bceSAndroid Build Coastguard Worker * Copyright 2017 The Android Open Source Project
6*35238bceSAndroid Build Coastguard Worker *
7*35238bceSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License");
8*35238bceSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License.
9*35238bceSAndroid Build Coastguard Worker * You may obtain a copy of the License at
10*35238bceSAndroid Build Coastguard Worker *
11*35238bceSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0
12*35238bceSAndroid Build Coastguard Worker *
13*35238bceSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software
14*35238bceSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS,
15*35238bceSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16*35238bceSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and
17*35238bceSAndroid Build Coastguard Worker * limitations under the License.
18*35238bceSAndroid Build Coastguard Worker *
19*35238bceSAndroid Build Coastguard Worker *//*!
20*35238bceSAndroid Build Coastguard Worker * \file
21*35238bceSAndroid Build Coastguard Worker * \brief Negative ShaderFramebufferFetch tests.
22*35238bceSAndroid Build Coastguard Worker *//*--------------------------------------------------------------------*/
23*35238bceSAndroid Build Coastguard Worker
24*35238bceSAndroid Build Coastguard Worker #include "es31fNegativeShaderFramebufferFetchTests.hpp"
25*35238bceSAndroid Build Coastguard Worker #include "gluContextInfo.hpp"
26*35238bceSAndroid Build Coastguard Worker #include "gluShaderProgram.hpp"
27*35238bceSAndroid Build Coastguard Worker #include "tcuStringTemplate.hpp"
28*35238bceSAndroid Build Coastguard Worker
29*35238bceSAndroid Build Coastguard Worker namespace deqp
30*35238bceSAndroid Build Coastguard Worker {
31*35238bceSAndroid Build Coastguard Worker
32*35238bceSAndroid Build Coastguard Worker using std::map;
33*35238bceSAndroid Build Coastguard Worker using std::string;
34*35238bceSAndroid Build Coastguard Worker
35*35238bceSAndroid Build Coastguard Worker namespace gles31
36*35238bceSAndroid Build Coastguard Worker {
37*35238bceSAndroid Build Coastguard Worker namespace Functional
38*35238bceSAndroid Build Coastguard Worker {
39*35238bceSAndroid Build Coastguard Worker namespace NegativeTestShared
40*35238bceSAndroid Build Coastguard Worker {
41*35238bceSAndroid Build Coastguard Worker namespace
42*35238bceSAndroid Build Coastguard Worker {
43*35238bceSAndroid Build Coastguard Worker
44*35238bceSAndroid Build Coastguard Worker static const char *vertexShaderSource = "${GLSL_VERSION_STRING}\n"
45*35238bceSAndroid Build Coastguard Worker "\n"
46*35238bceSAndroid Build Coastguard Worker "void main (void)\n"
47*35238bceSAndroid Build Coastguard Worker "{\n"
48*35238bceSAndroid Build Coastguard Worker " gl_Position = vec4(0.0);\n"
49*35238bceSAndroid Build Coastguard Worker "}\n";
50*35238bceSAndroid Build Coastguard Worker
51*35238bceSAndroid Build Coastguard Worker static const char *fragmentShaderSource = "${GLSL_VERSION_STRING}\n"
52*35238bceSAndroid Build Coastguard Worker "layout(location = 0) out mediump vec4 fragColor;\n"
53*35238bceSAndroid Build Coastguard Worker "\n"
54*35238bceSAndroid Build Coastguard Worker "void main (void)\n"
55*35238bceSAndroid Build Coastguard Worker "{\n"
56*35238bceSAndroid Build Coastguard Worker " fragColor = vec4(1.0);\n"
57*35238bceSAndroid Build Coastguard Worker "}\n";
58*35238bceSAndroid Build Coastguard Worker
checkExtensionSupport(NegativeTestContext & ctx,const char * extName)59*35238bceSAndroid Build Coastguard Worker static void checkExtensionSupport(NegativeTestContext &ctx, const char *extName)
60*35238bceSAndroid Build Coastguard Worker {
61*35238bceSAndroid Build Coastguard Worker if (!ctx.getContextInfo().isExtensionSupported(extName))
62*35238bceSAndroid Build Coastguard Worker throw tcu::NotSupportedError(string(extName) + " not supported");
63*35238bceSAndroid Build Coastguard Worker }
64*35238bceSAndroid Build Coastguard Worker
checkFramebufferFetchSupport(NegativeTestContext & ctx)65*35238bceSAndroid Build Coastguard Worker static void checkFramebufferFetchSupport(NegativeTestContext &ctx)
66*35238bceSAndroid Build Coastguard Worker {
67*35238bceSAndroid Build Coastguard Worker checkExtensionSupport(ctx, "GL_EXT_shader_framebuffer_fetch");
68*35238bceSAndroid Build Coastguard Worker }
69*35238bceSAndroid Build Coastguard Worker
70*35238bceSAndroid Build Coastguard Worker enum ProgramError
71*35238bceSAndroid Build Coastguard Worker {
72*35238bceSAndroid Build Coastguard Worker PROGRAM_ERROR_LINK = 0,
73*35238bceSAndroid Build Coastguard Worker PROGRAM_ERROR_COMPILE,
74*35238bceSAndroid Build Coastguard Worker PROGRAM_ERROR_COMPILE_OR_LINK,
75*35238bceSAndroid Build Coastguard Worker };
76*35238bceSAndroid Build Coastguard Worker
verifyProgramError(NegativeTestContext & ctx,const glu::ShaderProgram & program,ProgramError error,glu::ShaderType shaderType)77*35238bceSAndroid Build Coastguard Worker void verifyProgramError(NegativeTestContext &ctx, const glu::ShaderProgram &program, ProgramError error,
78*35238bceSAndroid Build Coastguard Worker glu::ShaderType shaderType)
79*35238bceSAndroid Build Coastguard Worker {
80*35238bceSAndroid Build Coastguard Worker bool testFailed = false;
81*35238bceSAndroid Build Coastguard Worker string message;
82*35238bceSAndroid Build Coastguard Worker
83*35238bceSAndroid Build Coastguard Worker ctx.getLog() << program;
84*35238bceSAndroid Build Coastguard Worker
85*35238bceSAndroid Build Coastguard Worker switch (error)
86*35238bceSAndroid Build Coastguard Worker {
87*35238bceSAndroid Build Coastguard Worker case PROGRAM_ERROR_LINK:
88*35238bceSAndroid Build Coastguard Worker {
89*35238bceSAndroid Build Coastguard Worker message = "Program was not expected to link.";
90*35238bceSAndroid Build Coastguard Worker testFailed = (program.getProgramInfo().linkOk);
91*35238bceSAndroid Build Coastguard Worker break;
92*35238bceSAndroid Build Coastguard Worker }
93*35238bceSAndroid Build Coastguard Worker case PROGRAM_ERROR_COMPILE:
94*35238bceSAndroid Build Coastguard Worker {
95*35238bceSAndroid Build Coastguard Worker message = "Program was not expected to compile.";
96*35238bceSAndroid Build Coastguard Worker testFailed = program.getShaderInfo(shaderType).compileOk;
97*35238bceSAndroid Build Coastguard Worker break;
98*35238bceSAndroid Build Coastguard Worker }
99*35238bceSAndroid Build Coastguard Worker case PROGRAM_ERROR_COMPILE_OR_LINK:
100*35238bceSAndroid Build Coastguard Worker {
101*35238bceSAndroid Build Coastguard Worker message = "Program was not expected to compile or link.";
102*35238bceSAndroid Build Coastguard Worker testFailed = (program.getProgramInfo().linkOk) && (program.getShaderInfo(shaderType).compileOk);
103*35238bceSAndroid Build Coastguard Worker break;
104*35238bceSAndroid Build Coastguard Worker }
105*35238bceSAndroid Build Coastguard Worker default:
106*35238bceSAndroid Build Coastguard Worker {
107*35238bceSAndroid Build Coastguard Worker DE_FATAL("Invalid program error type");
108*35238bceSAndroid Build Coastguard Worker break;
109*35238bceSAndroid Build Coastguard Worker }
110*35238bceSAndroid Build Coastguard Worker }
111*35238bceSAndroid Build Coastguard Worker
112*35238bceSAndroid Build Coastguard Worker if (testFailed)
113*35238bceSAndroid Build Coastguard Worker {
114*35238bceSAndroid Build Coastguard Worker ctx.getLog() << tcu::TestLog::Message << message << tcu::TestLog::EndMessage;
115*35238bceSAndroid Build Coastguard Worker ctx.fail(message);
116*35238bceSAndroid Build Coastguard Worker }
117*35238bceSAndroid Build Coastguard Worker }
118*35238bceSAndroid Build Coastguard Worker
last_frag_data_not_defined(NegativeTestContext & ctx)119*35238bceSAndroid Build Coastguard Worker void last_frag_data_not_defined(NegativeTestContext &ctx)
120*35238bceSAndroid Build Coastguard Worker {
121*35238bceSAndroid Build Coastguard Worker // this tests does not apply to GL4.5
122*35238bceSAndroid Build Coastguard Worker if (!glu::isContextTypeES(ctx.getRenderContext().getType()))
123*35238bceSAndroid Build Coastguard Worker return;
124*35238bceSAndroid Build Coastguard Worker
125*35238bceSAndroid Build Coastguard Worker checkFramebufferFetchSupport(ctx);
126*35238bceSAndroid Build Coastguard Worker
127*35238bceSAndroid Build Coastguard Worker const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
128*35238bceSAndroid Build Coastguard Worker map<string, string> args;
129*35238bceSAndroid Build Coastguard Worker args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) :
130*35238bceSAndroid Build Coastguard Worker getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
131*35238bceSAndroid Build Coastguard Worker
132*35238bceSAndroid Build Coastguard Worker const char *const fragShaderSource = "${GLSL_VERSION_STRING}\n"
133*35238bceSAndroid Build Coastguard Worker "#extension GL_EXT_shader_framebuffer_fetch : require\n"
134*35238bceSAndroid Build Coastguard Worker "layout(location = 0) out mediump vec4 fragColor;\n"
135*35238bceSAndroid Build Coastguard Worker "\n"
136*35238bceSAndroid Build Coastguard Worker "void main (void)\n"
137*35238bceSAndroid Build Coastguard Worker "{\n"
138*35238bceSAndroid Build Coastguard Worker " fragColor = gl_LastFragData[0];\n"
139*35238bceSAndroid Build Coastguard Worker "}\n";
140*35238bceSAndroid Build Coastguard Worker
141*35238bceSAndroid Build Coastguard Worker glu::ShaderProgram program(ctx.getRenderContext(),
142*35238bceSAndroid Build Coastguard Worker glu::ProgramSources()
143*35238bceSAndroid Build Coastguard Worker << glu::VertexSource(tcu::StringTemplate(vertexShaderSource).specialize(args))
144*35238bceSAndroid Build Coastguard Worker << glu::FragmentSource(tcu::StringTemplate(fragShaderSource).specialize(args)));
145*35238bceSAndroid Build Coastguard Worker
146*35238bceSAndroid Build Coastguard Worker ctx.beginSection(
147*35238bceSAndroid Build Coastguard Worker "A link error is generated if the built-in fragment outputs of ES 2.0 are used in #version 300 es shaders");
148*35238bceSAndroid Build Coastguard Worker verifyProgramError(ctx, program, PROGRAM_ERROR_LINK, glu::SHADERTYPE_FRAGMENT);
149*35238bceSAndroid Build Coastguard Worker ctx.endSection();
150*35238bceSAndroid Build Coastguard Worker }
151*35238bceSAndroid Build Coastguard Worker
last_frag_data_readonly(NegativeTestContext & ctx)152*35238bceSAndroid Build Coastguard Worker void last_frag_data_readonly(NegativeTestContext &ctx)
153*35238bceSAndroid Build Coastguard Worker {
154*35238bceSAndroid Build Coastguard Worker return; /// TEMP - not sure what to do, this test crashes on es3.1 and gl4.5 context
155*35238bceSAndroid Build Coastguard Worker
156*35238bceSAndroid Build Coastguard Worker checkFramebufferFetchSupport(ctx);
157*35238bceSAndroid Build Coastguard Worker
158*35238bceSAndroid Build Coastguard Worker map<string, string> args;
159*35238bceSAndroid Build Coastguard Worker args["GLSL_VERSION_STRING"] = getGLSLVersionDeclaration(glu::GLSL_VERSION_100_ES);
160*35238bceSAndroid Build Coastguard Worker
161*35238bceSAndroid Build Coastguard Worker const char *const fragShaderSource = "${GLSL_VERSION_STRING}\n"
162*35238bceSAndroid Build Coastguard Worker "#extension GL_EXT_shader_framebuffer_fetch : require\n"
163*35238bceSAndroid Build Coastguard Worker "\n"
164*35238bceSAndroid Build Coastguard Worker "void main (void)\n"
165*35238bceSAndroid Build Coastguard Worker "{\n"
166*35238bceSAndroid Build Coastguard Worker " gl_LastFragData[0] = vec4(1.0);\n"
167*35238bceSAndroid Build Coastguard Worker " gl_FragColor = gl_LastFragData[0];\n"
168*35238bceSAndroid Build Coastguard Worker "}\n";
169*35238bceSAndroid Build Coastguard Worker
170*35238bceSAndroid Build Coastguard Worker glu::ShaderProgram program(ctx.getRenderContext(),
171*35238bceSAndroid Build Coastguard Worker glu::ProgramSources()
172*35238bceSAndroid Build Coastguard Worker << glu::VertexSource(tcu::StringTemplate(vertexShaderSource).specialize(args))
173*35238bceSAndroid Build Coastguard Worker << glu::FragmentSource(tcu::StringTemplate(fragShaderSource).specialize(args)));
174*35238bceSAndroid Build Coastguard Worker
175*35238bceSAndroid Build Coastguard Worker ctx.beginSection(
176*35238bceSAndroid Build Coastguard Worker "A compile-time or link error is generated if the built-in fragment outputs of ES 2.0 are written to.");
177*35238bceSAndroid Build Coastguard Worker verifyProgramError(ctx, program, PROGRAM_ERROR_COMPILE_OR_LINK, glu::SHADERTYPE_FRAGMENT);
178*35238bceSAndroid Build Coastguard Worker ctx.endSection();
179*35238bceSAndroid Build Coastguard Worker }
180*35238bceSAndroid Build Coastguard Worker
invalid_inout_version(NegativeTestContext & ctx)181*35238bceSAndroid Build Coastguard Worker void invalid_inout_version(NegativeTestContext &ctx)
182*35238bceSAndroid Build Coastguard Worker {
183*35238bceSAndroid Build Coastguard Worker checkFramebufferFetchSupport(ctx);
184*35238bceSAndroid Build Coastguard Worker
185*35238bceSAndroid Build Coastguard Worker map<string, string> args;
186*35238bceSAndroid Build Coastguard Worker args["GLSL_VERSION_STRING"] = getGLSLVersionDeclaration(glu::GLSL_VERSION_100_ES);
187*35238bceSAndroid Build Coastguard Worker
188*35238bceSAndroid Build Coastguard Worker const char *const fragShaderSource = "${GLSL_VERSION_STRING}\n"
189*35238bceSAndroid Build Coastguard Worker "#extension GL_EXT_shader_framebuffer_fetch : require\n"
190*35238bceSAndroid Build Coastguard Worker "inout highp vec4 fragColor;\n"
191*35238bceSAndroid Build Coastguard Worker "\n"
192*35238bceSAndroid Build Coastguard Worker "void main (void)\n"
193*35238bceSAndroid Build Coastguard Worker "{\n"
194*35238bceSAndroid Build Coastguard Worker " highp float product = dot(vec3(0.5), fragColor.rgb);\n"
195*35238bceSAndroid Build Coastguard Worker " gl_FragColor = vec4(product);\n"
196*35238bceSAndroid Build Coastguard Worker "}\n";
197*35238bceSAndroid Build Coastguard Worker
198*35238bceSAndroid Build Coastguard Worker glu::ShaderProgram program(ctx.getRenderContext(),
199*35238bceSAndroid Build Coastguard Worker glu::ProgramSources()
200*35238bceSAndroid Build Coastguard Worker << glu::VertexSource(tcu::StringTemplate(vertexShaderSource).specialize(args))
201*35238bceSAndroid Build Coastguard Worker << glu::FragmentSource(tcu::StringTemplate(fragShaderSource).specialize(args)));
202*35238bceSAndroid Build Coastguard Worker
203*35238bceSAndroid Build Coastguard Worker ctx.beginSection("A compile-time or link error is generated if user-defined inout arrays are used in earlier "
204*35238bceSAndroid Build Coastguard Worker "versions of GLSL before ES 3.0");
205*35238bceSAndroid Build Coastguard Worker verifyProgramError(ctx, program, PROGRAM_ERROR_COMPILE_OR_LINK, glu::SHADERTYPE_FRAGMENT);
206*35238bceSAndroid Build Coastguard Worker ctx.endSection();
207*35238bceSAndroid Build Coastguard Worker }
208*35238bceSAndroid Build Coastguard Worker
invalid_redeclaration_inout(NegativeTestContext & ctx)209*35238bceSAndroid Build Coastguard Worker void invalid_redeclaration_inout(NegativeTestContext &ctx)
210*35238bceSAndroid Build Coastguard Worker {
211*35238bceSAndroid Build Coastguard Worker // this case does not apply to GL4.5
212*35238bceSAndroid Build Coastguard Worker if (!glu::isContextTypeES(ctx.getRenderContext().getType()))
213*35238bceSAndroid Build Coastguard Worker return;
214*35238bceSAndroid Build Coastguard Worker
215*35238bceSAndroid Build Coastguard Worker checkFramebufferFetchSupport(ctx);
216*35238bceSAndroid Build Coastguard Worker
217*35238bceSAndroid Build Coastguard Worker const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
218*35238bceSAndroid Build Coastguard Worker map<string, string> args;
219*35238bceSAndroid Build Coastguard Worker args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) :
220*35238bceSAndroid Build Coastguard Worker getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
221*35238bceSAndroid Build Coastguard Worker
222*35238bceSAndroid Build Coastguard Worker const char *const fragShaderSource = "${GLSL_VERSION_STRING}\n"
223*35238bceSAndroid Build Coastguard Worker "#extension GL_EXT_shader_framebuffer_fetch : require\n"
224*35238bceSAndroid Build Coastguard Worker "layout(location = 0) out mediump vec4 fragColor;\n"
225*35238bceSAndroid Build Coastguard Worker "inout highp float gl_FragDepth;\n"
226*35238bceSAndroid Build Coastguard Worker "\n"
227*35238bceSAndroid Build Coastguard Worker "void main (void)\n"
228*35238bceSAndroid Build Coastguard Worker "{\n"
229*35238bceSAndroid Build Coastguard Worker " gl_FragDepth += 0.5f;\n"
230*35238bceSAndroid Build Coastguard Worker " fragColor = vec4(1.0f);\n"
231*35238bceSAndroid Build Coastguard Worker "}\n";
232*35238bceSAndroid Build Coastguard Worker
233*35238bceSAndroid Build Coastguard Worker glu::ShaderProgram program(ctx.getRenderContext(),
234*35238bceSAndroid Build Coastguard Worker glu::ProgramSources()
235*35238bceSAndroid Build Coastguard Worker << glu::VertexSource(tcu::StringTemplate(vertexShaderSource).specialize(args))
236*35238bceSAndroid Build Coastguard Worker << glu::FragmentSource(tcu::StringTemplate(fragShaderSource).specialize(args)));
237*35238bceSAndroid Build Coastguard Worker
238*35238bceSAndroid Build Coastguard Worker ctx.beginSection("A compile-time or link error is generated if re-declaring an existing fragment output such as "
239*35238bceSAndroid Build Coastguard Worker "gl_FragDepth as inout");
240*35238bceSAndroid Build Coastguard Worker verifyProgramError(ctx, program, PROGRAM_ERROR_COMPILE_OR_LINK, glu::SHADERTYPE_FRAGMENT);
241*35238bceSAndroid Build Coastguard Worker ctx.endSection();
242*35238bceSAndroid Build Coastguard Worker }
243*35238bceSAndroid Build Coastguard Worker
invalid_vertex_inout(NegativeTestContext & ctx)244*35238bceSAndroid Build Coastguard Worker void invalid_vertex_inout(NegativeTestContext &ctx)
245*35238bceSAndroid Build Coastguard Worker {
246*35238bceSAndroid Build Coastguard Worker // this case does not apply to GL4.5
247*35238bceSAndroid Build Coastguard Worker if (!glu::isContextTypeES(ctx.getRenderContext().getType()))
248*35238bceSAndroid Build Coastguard Worker return;
249*35238bceSAndroid Build Coastguard Worker
250*35238bceSAndroid Build Coastguard Worker checkFramebufferFetchSupport(ctx);
251*35238bceSAndroid Build Coastguard Worker
252*35238bceSAndroid Build Coastguard Worker const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
253*35238bceSAndroid Build Coastguard Worker map<string, string> args;
254*35238bceSAndroid Build Coastguard Worker args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) :
255*35238bceSAndroid Build Coastguard Worker getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
256*35238bceSAndroid Build Coastguard Worker
257*35238bceSAndroid Build Coastguard Worker const char *const vertShaderSource = "${GLSL_VERSION_STRING}\n"
258*35238bceSAndroid Build Coastguard Worker "#extension GL_EXT_shader_framebuffer_fetch : require\n"
259*35238bceSAndroid Build Coastguard Worker "inout mediump vec4 v_color;\n"
260*35238bceSAndroid Build Coastguard Worker "\n"
261*35238bceSAndroid Build Coastguard Worker "void main (void)\n"
262*35238bceSAndroid Build Coastguard Worker "{\n"
263*35238bceSAndroid Build Coastguard Worker "}\n";
264*35238bceSAndroid Build Coastguard Worker
265*35238bceSAndroid Build Coastguard Worker glu::ShaderProgram program(ctx.getRenderContext(),
266*35238bceSAndroid Build Coastguard Worker glu::ProgramSources()
267*35238bceSAndroid Build Coastguard Worker << glu::VertexSource(tcu::StringTemplate(vertShaderSource).specialize(args))
268*35238bceSAndroid Build Coastguard Worker << glu::FragmentSource(tcu::StringTemplate(fragmentShaderSource).specialize(args)));
269*35238bceSAndroid Build Coastguard Worker
270*35238bceSAndroid Build Coastguard Worker ctx.beginSection(
271*35238bceSAndroid Build Coastguard Worker "A compile-time error or link error is generated if inout variables are declared in the vertex shader\n");
272*35238bceSAndroid Build Coastguard Worker verifyProgramError(ctx, program, PROGRAM_ERROR_COMPILE_OR_LINK, glu::SHADERTYPE_VERTEX);
273*35238bceSAndroid Build Coastguard Worker ctx.endSection();
274*35238bceSAndroid Build Coastguard Worker }
275*35238bceSAndroid Build Coastguard Worker
276*35238bceSAndroid Build Coastguard Worker } // namespace
277*35238bceSAndroid Build Coastguard Worker
getNegativeShaderFramebufferFetchTestFunctions(void)278*35238bceSAndroid Build Coastguard Worker std::vector<FunctionContainer> getNegativeShaderFramebufferFetchTestFunctions(void)
279*35238bceSAndroid Build Coastguard Worker {
280*35238bceSAndroid Build Coastguard Worker const FunctionContainer funcs[] = {
281*35238bceSAndroid Build Coastguard Worker {last_frag_data_not_defined, "last_frag_data_not_defined",
282*35238bceSAndroid Build Coastguard Worker "The built-in gl_LastFragData not defined in #version 300 es shaders"},
283*35238bceSAndroid Build Coastguard Worker {last_frag_data_readonly, "last_frag_data_readonly", "Invalid write to readonly builtin in gl_LastFragData"},
284*35238bceSAndroid Build Coastguard Worker {invalid_inout_version, "invalid_inout_version",
285*35238bceSAndroid Build Coastguard Worker "Invalid use of user-defined inout arrays in versions before GLSL #version 300 es."},
286*35238bceSAndroid Build Coastguard Worker {invalid_redeclaration_inout, "invalid_redeclaration_inout",
287*35238bceSAndroid Build Coastguard Worker "Existing fragment shader built-ins cannot be redeclared as inout arrays"},
288*35238bceSAndroid Build Coastguard Worker {invalid_vertex_inout, "invalid_vertex_inout",
289*35238bceSAndroid Build Coastguard Worker "User defined inout arrays are not allowed in the vertex shader"},
290*35238bceSAndroid Build Coastguard Worker };
291*35238bceSAndroid Build Coastguard Worker
292*35238bceSAndroid Build Coastguard Worker return std::vector<FunctionContainer>(DE_ARRAY_BEGIN(funcs), DE_ARRAY_END(funcs));
293*35238bceSAndroid Build Coastguard Worker }
294*35238bceSAndroid Build Coastguard Worker
295*35238bceSAndroid Build Coastguard Worker } // namespace NegativeTestShared
296*35238bceSAndroid Build Coastguard Worker } // namespace Functional
297*35238bceSAndroid Build Coastguard Worker } // namespace gles31
298*35238bceSAndroid Build Coastguard Worker } // namespace deqp
299