1*35238bceSAndroid Build Coastguard Worker /*-------------------------------------------------------------------------
2*35238bceSAndroid Build Coastguard Worker * drawElements Quality Program OpenGL ES 3.0 Module
3*35238bceSAndroid Build Coastguard Worker * -------------------------------------------------
4*35238bceSAndroid Build Coastguard Worker *
5*35238bceSAndroid Build Coastguard Worker * Copyright 2014 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 Fbo state query tests.
22*35238bceSAndroid Build Coastguard Worker *//*--------------------------------------------------------------------*/
23*35238bceSAndroid Build Coastguard Worker
24*35238bceSAndroid Build Coastguard Worker #include "es3fFboStateQueryTests.hpp"
25*35238bceSAndroid Build Coastguard Worker #include "glsStateQueryUtil.hpp"
26*35238bceSAndroid Build Coastguard Worker #include "es3fApiCase.hpp"
27*35238bceSAndroid Build Coastguard Worker #include "gluRenderContext.hpp"
28*35238bceSAndroid Build Coastguard Worker #include "glwEnums.hpp"
29*35238bceSAndroid Build Coastguard Worker #include "glwFunctions.hpp"
30*35238bceSAndroid Build Coastguard Worker #include "tcuRenderTarget.hpp"
31*35238bceSAndroid Build Coastguard Worker #include "deMath.h"
32*35238bceSAndroid Build Coastguard Worker
33*35238bceSAndroid Build Coastguard Worker using namespace glw; // GLint and other GL types
34*35238bceSAndroid Build Coastguard Worker using deqp::gls::StateQueryUtil::StateQueryMemoryWriteGuard;
35*35238bceSAndroid Build Coastguard Worker
36*35238bceSAndroid Build Coastguard Worker namespace deqp
37*35238bceSAndroid Build Coastguard Worker {
38*35238bceSAndroid Build Coastguard Worker namespace gles3
39*35238bceSAndroid Build Coastguard Worker {
40*35238bceSAndroid Build Coastguard Worker namespace Functional
41*35238bceSAndroid Build Coastguard Worker {
42*35238bceSAndroid Build Coastguard Worker namespace
43*35238bceSAndroid Build Coastguard Worker {
44*35238bceSAndroid Build Coastguard Worker
checkAttachmentComponentSizeAtLeast(tcu::TestContext & testCtx,glu::CallLogWrapper & gl,GLenum target,GLenum attachment,int r,int g,int b,int a,int d,int s)45*35238bceSAndroid Build Coastguard Worker void checkAttachmentComponentSizeAtLeast(tcu::TestContext &testCtx, glu::CallLogWrapper &gl, GLenum target,
46*35238bceSAndroid Build Coastguard Worker GLenum attachment, int r, int g, int b, int a, int d, int s)
47*35238bceSAndroid Build Coastguard Worker {
48*35238bceSAndroid Build Coastguard Worker using tcu::TestLog;
49*35238bceSAndroid Build Coastguard Worker
50*35238bceSAndroid Build Coastguard Worker const int referenceSizes[] = {r, g, b, a, d, s};
51*35238bceSAndroid Build Coastguard Worker const GLenum paramNames[] = {GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE,
52*35238bceSAndroid Build Coastguard Worker GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE, GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE,
53*35238bceSAndroid Build Coastguard Worker GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE, GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE};
54*35238bceSAndroid Build Coastguard Worker
55*35238bceSAndroid Build Coastguard Worker DE_STATIC_ASSERT(DE_LENGTH_OF_ARRAY(referenceSizes) == DE_LENGTH_OF_ARRAY(paramNames));
56*35238bceSAndroid Build Coastguard Worker
57*35238bceSAndroid Build Coastguard Worker for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(referenceSizes); ++ndx)
58*35238bceSAndroid Build Coastguard Worker {
59*35238bceSAndroid Build Coastguard Worker if (referenceSizes[ndx] == -1)
60*35238bceSAndroid Build Coastguard Worker continue;
61*35238bceSAndroid Build Coastguard Worker
62*35238bceSAndroid Build Coastguard Worker StateQueryMemoryWriteGuard<GLint> state;
63*35238bceSAndroid Build Coastguard Worker gl.glGetFramebufferAttachmentParameteriv(target, attachment, paramNames[ndx], &state);
64*35238bceSAndroid Build Coastguard Worker
65*35238bceSAndroid Build Coastguard Worker if (!state.verifyValidity(testCtx))
66*35238bceSAndroid Build Coastguard Worker {
67*35238bceSAndroid Build Coastguard Worker gl.glGetError(); // just log the error
68*35238bceSAndroid Build Coastguard Worker continue;
69*35238bceSAndroid Build Coastguard Worker }
70*35238bceSAndroid Build Coastguard Worker
71*35238bceSAndroid Build Coastguard Worker if (state < referenceSizes[ndx])
72*35238bceSAndroid Build Coastguard Worker {
73*35238bceSAndroid Build Coastguard Worker testCtx.getLog() << TestLog::Message << "// ERROR: Expected greater or equal to " << referenceSizes[ndx]
74*35238bceSAndroid Build Coastguard Worker << "; got " << state << TestLog::EndMessage;
75*35238bceSAndroid Build Coastguard Worker if (testCtx.getTestResult() == QP_TEST_RESULT_PASS)
76*35238bceSAndroid Build Coastguard Worker testCtx.setTestResult(QP_TEST_RESULT_FAIL, "got invalid value");
77*35238bceSAndroid Build Coastguard Worker }
78*35238bceSAndroid Build Coastguard Worker }
79*35238bceSAndroid Build Coastguard Worker }
80*35238bceSAndroid Build Coastguard Worker
checkAttachmentComponentSizeExactly(tcu::TestContext & testCtx,glu::CallLogWrapper & gl,GLenum target,GLenum attachment,int r,int g,int b,int a,int d,int s)81*35238bceSAndroid Build Coastguard Worker void checkAttachmentComponentSizeExactly(tcu::TestContext &testCtx, glu::CallLogWrapper &gl, GLenum target,
82*35238bceSAndroid Build Coastguard Worker GLenum attachment, int r, int g, int b, int a, int d, int s)
83*35238bceSAndroid Build Coastguard Worker {
84*35238bceSAndroid Build Coastguard Worker using tcu::TestLog;
85*35238bceSAndroid Build Coastguard Worker
86*35238bceSAndroid Build Coastguard Worker const int referenceSizes[] = {r, g, b, a, d, s};
87*35238bceSAndroid Build Coastguard Worker const GLenum paramNames[] = {GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE,
88*35238bceSAndroid Build Coastguard Worker GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE, GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE,
89*35238bceSAndroid Build Coastguard Worker GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE, GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE};
90*35238bceSAndroid Build Coastguard Worker
91*35238bceSAndroid Build Coastguard Worker DE_STATIC_ASSERT(DE_LENGTH_OF_ARRAY(referenceSizes) == DE_LENGTH_OF_ARRAY(paramNames));
92*35238bceSAndroid Build Coastguard Worker
93*35238bceSAndroid Build Coastguard Worker for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(referenceSizes); ++ndx)
94*35238bceSAndroid Build Coastguard Worker {
95*35238bceSAndroid Build Coastguard Worker if (referenceSizes[ndx] == -1)
96*35238bceSAndroid Build Coastguard Worker continue;
97*35238bceSAndroid Build Coastguard Worker
98*35238bceSAndroid Build Coastguard Worker StateQueryMemoryWriteGuard<GLint> state;
99*35238bceSAndroid Build Coastguard Worker gl.glGetFramebufferAttachmentParameteriv(target, attachment, paramNames[ndx], &state);
100*35238bceSAndroid Build Coastguard Worker
101*35238bceSAndroid Build Coastguard Worker if (!state.verifyValidity(testCtx))
102*35238bceSAndroid Build Coastguard Worker {
103*35238bceSAndroid Build Coastguard Worker gl.glGetError(); // just log the error
104*35238bceSAndroid Build Coastguard Worker continue;
105*35238bceSAndroid Build Coastguard Worker }
106*35238bceSAndroid Build Coastguard Worker
107*35238bceSAndroid Build Coastguard Worker if (state != referenceSizes[ndx])
108*35238bceSAndroid Build Coastguard Worker {
109*35238bceSAndroid Build Coastguard Worker testCtx.getLog() << TestLog::Message << "// ERROR: Expected " << referenceSizes[ndx] << "; got " << state
110*35238bceSAndroid Build Coastguard Worker << TestLog::EndMessage;
111*35238bceSAndroid Build Coastguard Worker if (testCtx.getTestResult() == QP_TEST_RESULT_PASS)
112*35238bceSAndroid Build Coastguard Worker testCtx.setTestResult(QP_TEST_RESULT_FAIL, "got invalid value");
113*35238bceSAndroid Build Coastguard Worker }
114*35238bceSAndroid Build Coastguard Worker }
115*35238bceSAndroid Build Coastguard Worker }
116*35238bceSAndroid Build Coastguard Worker
checkIntEquals(tcu::TestContext & testCtx,GLint got,GLint expected)117*35238bceSAndroid Build Coastguard Worker void checkIntEquals(tcu::TestContext &testCtx, GLint got, GLint expected)
118*35238bceSAndroid Build Coastguard Worker {
119*35238bceSAndroid Build Coastguard Worker using tcu::TestLog;
120*35238bceSAndroid Build Coastguard Worker
121*35238bceSAndroid Build Coastguard Worker if (got != expected)
122*35238bceSAndroid Build Coastguard Worker {
123*35238bceSAndroid Build Coastguard Worker testCtx.getLog() << TestLog::Message << "// ERROR: Expected " << expected << "; got " << got
124*35238bceSAndroid Build Coastguard Worker << TestLog::EndMessage;
125*35238bceSAndroid Build Coastguard Worker if (testCtx.getTestResult() == QP_TEST_RESULT_PASS)
126*35238bceSAndroid Build Coastguard Worker testCtx.setTestResult(QP_TEST_RESULT_FAIL, "got invalid value");
127*35238bceSAndroid Build Coastguard Worker }
128*35238bceSAndroid Build Coastguard Worker }
129*35238bceSAndroid Build Coastguard Worker
checkIntEqualsAny(tcu::TestContext & testCtx,GLint got,GLint expected0,GLint expected1)130*35238bceSAndroid Build Coastguard Worker void checkIntEqualsAny(tcu::TestContext &testCtx, GLint got, GLint expected0, GLint expected1)
131*35238bceSAndroid Build Coastguard Worker {
132*35238bceSAndroid Build Coastguard Worker using tcu::TestLog;
133*35238bceSAndroid Build Coastguard Worker
134*35238bceSAndroid Build Coastguard Worker if (got != expected0 && got != expected1)
135*35238bceSAndroid Build Coastguard Worker {
136*35238bceSAndroid Build Coastguard Worker testCtx.getLog() << TestLog::Message << "// ERROR: Expected " << expected0 << " or " << expected1 << "; got "
137*35238bceSAndroid Build Coastguard Worker << got << TestLog::EndMessage;
138*35238bceSAndroid Build Coastguard Worker if (testCtx.getTestResult() == QP_TEST_RESULT_PASS)
139*35238bceSAndroid Build Coastguard Worker testCtx.setTestResult(QP_TEST_RESULT_FAIL, "got invalid value");
140*35238bceSAndroid Build Coastguard Worker }
141*35238bceSAndroid Build Coastguard Worker }
142*35238bceSAndroid Build Coastguard Worker
checkAttachmentParam(tcu::TestContext & testCtx,glu::CallLogWrapper & gl,GLenum target,GLenum attachment,GLenum pname,GLenum reference)143*35238bceSAndroid Build Coastguard Worker void checkAttachmentParam(tcu::TestContext &testCtx, glu::CallLogWrapper &gl, GLenum target, GLenum attachment,
144*35238bceSAndroid Build Coastguard Worker GLenum pname, GLenum reference)
145*35238bceSAndroid Build Coastguard Worker {
146*35238bceSAndroid Build Coastguard Worker StateQueryMemoryWriteGuard<GLint> state;
147*35238bceSAndroid Build Coastguard Worker gl.glGetFramebufferAttachmentParameteriv(target, attachment, pname, &state);
148*35238bceSAndroid Build Coastguard Worker
149*35238bceSAndroid Build Coastguard Worker if (state.verifyValidity(testCtx))
150*35238bceSAndroid Build Coastguard Worker checkIntEquals(testCtx, state, reference);
151*35238bceSAndroid Build Coastguard Worker }
152*35238bceSAndroid Build Coastguard Worker
checkColorAttachmentParam(tcu::TestContext & testCtx,glu::CallLogWrapper & gl,GLenum target,GLenum pname,GLenum reference)153*35238bceSAndroid Build Coastguard Worker void checkColorAttachmentParam(tcu::TestContext &testCtx, glu::CallLogWrapper &gl, GLenum target, GLenum pname,
154*35238bceSAndroid Build Coastguard Worker GLenum reference)
155*35238bceSAndroid Build Coastguard Worker {
156*35238bceSAndroid Build Coastguard Worker checkAttachmentParam(testCtx, gl, target, GL_COLOR_ATTACHMENT0, pname, reference);
157*35238bceSAndroid Build Coastguard Worker }
158*35238bceSAndroid Build Coastguard Worker
159*35238bceSAndroid Build Coastguard Worker class DefaultFramebufferCase : public ApiCase
160*35238bceSAndroid Build Coastguard Worker {
161*35238bceSAndroid Build Coastguard Worker public:
DefaultFramebufferCase(Context & context,const char * name,const char * description,GLenum framebufferTarget)162*35238bceSAndroid Build Coastguard Worker DefaultFramebufferCase(Context &context, const char *name, const char *description, GLenum framebufferTarget)
163*35238bceSAndroid Build Coastguard Worker : ApiCase(context, name, description)
164*35238bceSAndroid Build Coastguard Worker , m_framebufferTarget(framebufferTarget)
165*35238bceSAndroid Build Coastguard Worker {
166*35238bceSAndroid Build Coastguard Worker }
167*35238bceSAndroid Build Coastguard Worker
test(void)168*35238bceSAndroid Build Coastguard Worker void test(void)
169*35238bceSAndroid Build Coastguard Worker {
170*35238bceSAndroid Build Coastguard Worker const bool hasColorBuffer = m_context.getRenderTarget().getPixelFormat().redBits > 0 ||
171*35238bceSAndroid Build Coastguard Worker m_context.getRenderTarget().getPixelFormat().greenBits > 0 ||
172*35238bceSAndroid Build Coastguard Worker m_context.getRenderTarget().getPixelFormat().blueBits > 0 ||
173*35238bceSAndroid Build Coastguard Worker m_context.getRenderTarget().getPixelFormat().alphaBits > 0;
174*35238bceSAndroid Build Coastguard Worker const GLenum attachments[] = {
175*35238bceSAndroid Build Coastguard Worker (GLenum)(glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::core(4, 5)) ? GL_FRONT :
176*35238bceSAndroid Build Coastguard Worker GL_BACK),
177*35238bceSAndroid Build Coastguard Worker GL_DEPTH, GL_STENCIL};
178*35238bceSAndroid Build Coastguard Worker const bool attachmentExists[] = {hasColorBuffer, m_context.getRenderTarget().getDepthBits() > 0,
179*35238bceSAndroid Build Coastguard Worker m_context.getRenderTarget().getStencilBits() > 0};
180*35238bceSAndroid Build Coastguard Worker
181*35238bceSAndroid Build Coastguard Worker for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(attachments); ++ndx)
182*35238bceSAndroid Build Coastguard Worker {
183*35238bceSAndroid Build Coastguard Worker StateQueryMemoryWriteGuard<GLint> state;
184*35238bceSAndroid Build Coastguard Worker glGetFramebufferAttachmentParameteriv(m_framebufferTarget, attachments[ndx],
185*35238bceSAndroid Build Coastguard Worker GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &state);
186*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
187*35238bceSAndroid Build Coastguard Worker
188*35238bceSAndroid Build Coastguard Worker if (state.verifyValidity(m_testCtx))
189*35238bceSAndroid Build Coastguard Worker {
190*35238bceSAndroid Build Coastguard Worker if (attachmentExists[ndx])
191*35238bceSAndroid Build Coastguard Worker {
192*35238bceSAndroid Build Coastguard Worker checkIntEquals(m_testCtx, state, GL_FRAMEBUFFER_DEFAULT);
193*35238bceSAndroid Build Coastguard Worker }
194*35238bceSAndroid Build Coastguard Worker else
195*35238bceSAndroid Build Coastguard Worker {
196*35238bceSAndroid Build Coastguard Worker // \note [jarkko] FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE "identifes the type of object which contains the attached image". However, it
197*35238bceSAndroid Build Coastguard Worker // is unclear if an object of type FRAMEBUFFER_DEFAULT can contain a null image (or a 0-bits-per-pixel image). Accept both
198*35238bceSAndroid Build Coastguard Worker // FRAMEBUFFER_DEFAULT and NONE as valid results in these cases.
199*35238bceSAndroid Build Coastguard Worker checkIntEqualsAny(m_testCtx, state, GL_FRAMEBUFFER_DEFAULT, GL_NONE);
200*35238bceSAndroid Build Coastguard Worker }
201*35238bceSAndroid Build Coastguard Worker }
202*35238bceSAndroid Build Coastguard Worker }
203*35238bceSAndroid Build Coastguard Worker }
204*35238bceSAndroid Build Coastguard Worker
205*35238bceSAndroid Build Coastguard Worker private:
206*35238bceSAndroid Build Coastguard Worker GLenum m_framebufferTarget;
207*35238bceSAndroid Build Coastguard Worker };
208*35238bceSAndroid Build Coastguard Worker
209*35238bceSAndroid Build Coastguard Worker class AttachmentObjectCase : public ApiCase
210*35238bceSAndroid Build Coastguard Worker {
211*35238bceSAndroid Build Coastguard Worker public:
AttachmentObjectCase(Context & context,const char * name,const char * description)212*35238bceSAndroid Build Coastguard Worker AttachmentObjectCase(Context &context, const char *name, const char *description)
213*35238bceSAndroid Build Coastguard Worker : ApiCase(context, name, description)
214*35238bceSAndroid Build Coastguard Worker {
215*35238bceSAndroid Build Coastguard Worker }
216*35238bceSAndroid Build Coastguard Worker
test(void)217*35238bceSAndroid Build Coastguard Worker void test(void)
218*35238bceSAndroid Build Coastguard Worker {
219*35238bceSAndroid Build Coastguard Worker GLuint framebufferID = 0;
220*35238bceSAndroid Build Coastguard Worker glGenFramebuffers(1, &framebufferID);
221*35238bceSAndroid Build Coastguard Worker glBindFramebuffer(GL_FRAMEBUFFER, framebufferID);
222*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
223*35238bceSAndroid Build Coastguard Worker
224*35238bceSAndroid Build Coastguard Worker // initial
225*35238bceSAndroid Build Coastguard Worker {
226*35238bceSAndroid Build Coastguard Worker checkAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
227*35238bceSAndroid Build Coastguard Worker GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, GL_NONE);
228*35238bceSAndroid Build Coastguard Worker checkAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
229*35238bceSAndroid Build Coastguard Worker GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, 0);
230*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
231*35238bceSAndroid Build Coastguard Worker }
232*35238bceSAndroid Build Coastguard Worker
233*35238bceSAndroid Build Coastguard Worker // texture
234*35238bceSAndroid Build Coastguard Worker {
235*35238bceSAndroid Build Coastguard Worker GLuint textureID = 0;
236*35238bceSAndroid Build Coastguard Worker glGenTextures(1, &textureID);
237*35238bceSAndroid Build Coastguard Worker glBindTexture(GL_TEXTURE_2D, textureID);
238*35238bceSAndroid Build Coastguard Worker glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 128, 128, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL);
239*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
240*35238bceSAndroid Build Coastguard Worker
241*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureID, 0);
242*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
243*35238bceSAndroid Build Coastguard Worker
244*35238bceSAndroid Build Coastguard Worker checkColorAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE,
245*35238bceSAndroid Build Coastguard Worker GL_TEXTURE);
246*35238bceSAndroid Build Coastguard Worker checkColorAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME,
247*35238bceSAndroid Build Coastguard Worker textureID);
248*35238bceSAndroid Build Coastguard Worker
249*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
250*35238bceSAndroid Build Coastguard Worker glDeleteTextures(1, &textureID);
251*35238bceSAndroid Build Coastguard Worker }
252*35238bceSAndroid Build Coastguard Worker
253*35238bceSAndroid Build Coastguard Worker // rb
254*35238bceSAndroid Build Coastguard Worker {
255*35238bceSAndroid Build Coastguard Worker GLuint renderbufferID = 0;
256*35238bceSAndroid Build Coastguard Worker glGenRenderbuffers(1, &renderbufferID);
257*35238bceSAndroid Build Coastguard Worker glBindRenderbuffer(GL_RENDERBUFFER, renderbufferID);
258*35238bceSAndroid Build Coastguard Worker glRenderbufferStorage(GL_RENDERBUFFER, GL_RGB8, 128, 128);
259*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
260*35238bceSAndroid Build Coastguard Worker
261*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderbufferID);
262*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
263*35238bceSAndroid Build Coastguard Worker
264*35238bceSAndroid Build Coastguard Worker checkColorAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE,
265*35238bceSAndroid Build Coastguard Worker GL_RENDERBUFFER);
266*35238bceSAndroid Build Coastguard Worker checkColorAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME,
267*35238bceSAndroid Build Coastguard Worker renderbufferID);
268*35238bceSAndroid Build Coastguard Worker
269*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, 0);
270*35238bceSAndroid Build Coastguard Worker glDeleteRenderbuffers(1, &renderbufferID);
271*35238bceSAndroid Build Coastguard Worker }
272*35238bceSAndroid Build Coastguard Worker
273*35238bceSAndroid Build Coastguard Worker glDeleteFramebuffers(1, &framebufferID);
274*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
275*35238bceSAndroid Build Coastguard Worker }
276*35238bceSAndroid Build Coastguard Worker };
277*35238bceSAndroid Build Coastguard Worker
278*35238bceSAndroid Build Coastguard Worker class AttachmentTextureLevelCase : public ApiCase
279*35238bceSAndroid Build Coastguard Worker {
280*35238bceSAndroid Build Coastguard Worker public:
AttachmentTextureLevelCase(Context & context,const char * name,const char * description)281*35238bceSAndroid Build Coastguard Worker AttachmentTextureLevelCase(Context &context, const char *name, const char *description)
282*35238bceSAndroid Build Coastguard Worker : ApiCase(context, name, description)
283*35238bceSAndroid Build Coastguard Worker {
284*35238bceSAndroid Build Coastguard Worker }
285*35238bceSAndroid Build Coastguard Worker
test(void)286*35238bceSAndroid Build Coastguard Worker void test(void)
287*35238bceSAndroid Build Coastguard Worker {
288*35238bceSAndroid Build Coastguard Worker GLuint framebufferID = 0;
289*35238bceSAndroid Build Coastguard Worker glGenFramebuffers(1, &framebufferID);
290*35238bceSAndroid Build Coastguard Worker glBindFramebuffer(GL_FRAMEBUFFER, framebufferID);
291*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
292*35238bceSAndroid Build Coastguard Worker
293*35238bceSAndroid Build Coastguard Worker for (int mipmapLevel = 0; mipmapLevel < 7; ++mipmapLevel)
294*35238bceSAndroid Build Coastguard Worker {
295*35238bceSAndroid Build Coastguard Worker GLuint textureID = 0;
296*35238bceSAndroid Build Coastguard Worker glGenTextures(1, &textureID);
297*35238bceSAndroid Build Coastguard Worker glBindTexture(GL_TEXTURE_2D, textureID);
298*35238bceSAndroid Build Coastguard Worker glTexStorage2D(GL_TEXTURE_2D, 7, GL_RGB8, 128, 128);
299*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
300*35238bceSAndroid Build Coastguard Worker
301*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureID, mipmapLevel);
302*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
303*35238bceSAndroid Build Coastguard Worker
304*35238bceSAndroid Build Coastguard Worker checkColorAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL,
305*35238bceSAndroid Build Coastguard Worker mipmapLevel);
306*35238bceSAndroid Build Coastguard Worker
307*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
308*35238bceSAndroid Build Coastguard Worker glDeleteTextures(1, &textureID);
309*35238bceSAndroid Build Coastguard Worker }
310*35238bceSAndroid Build Coastguard Worker
311*35238bceSAndroid Build Coastguard Worker glDeleteFramebuffers(1, &framebufferID);
312*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
313*35238bceSAndroid Build Coastguard Worker }
314*35238bceSAndroid Build Coastguard Worker };
315*35238bceSAndroid Build Coastguard Worker
316*35238bceSAndroid Build Coastguard Worker class AttachmentTextureCubeMapFaceCase : public ApiCase
317*35238bceSAndroid Build Coastguard Worker {
318*35238bceSAndroid Build Coastguard Worker public:
AttachmentTextureCubeMapFaceCase(Context & context,const char * name,const char * description)319*35238bceSAndroid Build Coastguard Worker AttachmentTextureCubeMapFaceCase(Context &context, const char *name, const char *description)
320*35238bceSAndroid Build Coastguard Worker : ApiCase(context, name, description)
321*35238bceSAndroid Build Coastguard Worker {
322*35238bceSAndroid Build Coastguard Worker }
323*35238bceSAndroid Build Coastguard Worker
test(void)324*35238bceSAndroid Build Coastguard Worker void test(void)
325*35238bceSAndroid Build Coastguard Worker {
326*35238bceSAndroid Build Coastguard Worker GLuint framebufferID = 0;
327*35238bceSAndroid Build Coastguard Worker glGenFramebuffers(1, &framebufferID);
328*35238bceSAndroid Build Coastguard Worker glBindFramebuffer(GL_FRAMEBUFFER, framebufferID);
329*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
330*35238bceSAndroid Build Coastguard Worker
331*35238bceSAndroid Build Coastguard Worker {
332*35238bceSAndroid Build Coastguard Worker GLuint textureID = 0;
333*35238bceSAndroid Build Coastguard Worker glGenTextures(1, &textureID);
334*35238bceSAndroid Build Coastguard Worker glBindTexture(GL_TEXTURE_CUBE_MAP, textureID);
335*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
336*35238bceSAndroid Build Coastguard Worker
337*35238bceSAndroid Build Coastguard Worker glTexStorage2D(GL_TEXTURE_CUBE_MAP, 1, GL_RGB8, 128, 128);
338*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
339*35238bceSAndroid Build Coastguard Worker
340*35238bceSAndroid Build Coastguard Worker const GLenum faces[] = {GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
341*35238bceSAndroid Build Coastguard Worker GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
342*35238bceSAndroid Build Coastguard Worker GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z};
343*35238bceSAndroid Build Coastguard Worker
344*35238bceSAndroid Build Coastguard Worker for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(faces); ++ndx)
345*35238bceSAndroid Build Coastguard Worker {
346*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, faces[ndx], textureID, 0);
347*35238bceSAndroid Build Coastguard Worker checkColorAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER,
348*35238bceSAndroid Build Coastguard Worker GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE, faces[ndx]);
349*35238bceSAndroid Build Coastguard Worker }
350*35238bceSAndroid Build Coastguard Worker
351*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
352*35238bceSAndroid Build Coastguard Worker glDeleteTextures(1, &textureID);
353*35238bceSAndroid Build Coastguard Worker }
354*35238bceSAndroid Build Coastguard Worker
355*35238bceSAndroid Build Coastguard Worker glDeleteFramebuffers(1, &framebufferID);
356*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
357*35238bceSAndroid Build Coastguard Worker }
358*35238bceSAndroid Build Coastguard Worker };
359*35238bceSAndroid Build Coastguard Worker
360*35238bceSAndroid Build Coastguard Worker class AttachmentTextureLayerCase : public ApiCase
361*35238bceSAndroid Build Coastguard Worker {
362*35238bceSAndroid Build Coastguard Worker public:
AttachmentTextureLayerCase(Context & context,const char * name,const char * description)363*35238bceSAndroid Build Coastguard Worker AttachmentTextureLayerCase(Context &context, const char *name, const char *description)
364*35238bceSAndroid Build Coastguard Worker : ApiCase(context, name, description)
365*35238bceSAndroid Build Coastguard Worker {
366*35238bceSAndroid Build Coastguard Worker }
367*35238bceSAndroid Build Coastguard Worker
test(void)368*35238bceSAndroid Build Coastguard Worker void test(void)
369*35238bceSAndroid Build Coastguard Worker {
370*35238bceSAndroid Build Coastguard Worker GLuint framebufferID = 0;
371*35238bceSAndroid Build Coastguard Worker glGenFramebuffers(1, &framebufferID);
372*35238bceSAndroid Build Coastguard Worker glBindFramebuffer(GL_FRAMEBUFFER, framebufferID);
373*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
374*35238bceSAndroid Build Coastguard Worker
375*35238bceSAndroid Build Coastguard Worker // tex3d
376*35238bceSAndroid Build Coastguard Worker {
377*35238bceSAndroid Build Coastguard Worker GLuint textureID = 0;
378*35238bceSAndroid Build Coastguard Worker glGenTextures(1, &textureID);
379*35238bceSAndroid Build Coastguard Worker glBindTexture(GL_TEXTURE_3D, textureID);
380*35238bceSAndroid Build Coastguard Worker glTexStorage3D(GL_TEXTURE_3D, 1, GL_RGBA8, 16, 16, 16);
381*35238bceSAndroid Build Coastguard Worker
382*35238bceSAndroid Build Coastguard Worker for (int layer = 0; layer < 16; ++layer)
383*35238bceSAndroid Build Coastguard Worker {
384*35238bceSAndroid Build Coastguard Worker glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, textureID, 0, layer);
385*35238bceSAndroid Build Coastguard Worker checkColorAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER,
386*35238bceSAndroid Build Coastguard Worker layer);
387*35238bceSAndroid Build Coastguard Worker }
388*35238bceSAndroid Build Coastguard Worker
389*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
390*35238bceSAndroid Build Coastguard Worker glDeleteTextures(1, &textureID);
391*35238bceSAndroid Build Coastguard Worker }
392*35238bceSAndroid Build Coastguard Worker // tex2d array
393*35238bceSAndroid Build Coastguard Worker {
394*35238bceSAndroid Build Coastguard Worker GLuint textureID = 0;
395*35238bceSAndroid Build Coastguard Worker glGenTextures(1, &textureID);
396*35238bceSAndroid Build Coastguard Worker glBindTexture(GL_TEXTURE_2D_ARRAY, textureID);
397*35238bceSAndroid Build Coastguard Worker glTexStorage3D(GL_TEXTURE_2D_ARRAY, 1, GL_RGBA8, 16, 16, 16);
398*35238bceSAndroid Build Coastguard Worker
399*35238bceSAndroid Build Coastguard Worker for (int layer = 0; layer < 16; ++layer)
400*35238bceSAndroid Build Coastguard Worker {
401*35238bceSAndroid Build Coastguard Worker glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, textureID, 0, layer);
402*35238bceSAndroid Build Coastguard Worker checkColorAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER,
403*35238bceSAndroid Build Coastguard Worker layer);
404*35238bceSAndroid Build Coastguard Worker }
405*35238bceSAndroid Build Coastguard Worker
406*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
407*35238bceSAndroid Build Coastguard Worker glDeleteTextures(1, &textureID);
408*35238bceSAndroid Build Coastguard Worker }
409*35238bceSAndroid Build Coastguard Worker
410*35238bceSAndroid Build Coastguard Worker glDeleteFramebuffers(1, &framebufferID);
411*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
412*35238bceSAndroid Build Coastguard Worker }
413*35238bceSAndroid Build Coastguard Worker };
414*35238bceSAndroid Build Coastguard Worker
415*35238bceSAndroid Build Coastguard Worker class AttachmentTextureColorCodingCase : public ApiCase
416*35238bceSAndroid Build Coastguard Worker {
417*35238bceSAndroid Build Coastguard Worker public:
AttachmentTextureColorCodingCase(Context & context,const char * name,const char * description)418*35238bceSAndroid Build Coastguard Worker AttachmentTextureColorCodingCase(Context &context, const char *name, const char *description)
419*35238bceSAndroid Build Coastguard Worker : ApiCase(context, name, description)
420*35238bceSAndroid Build Coastguard Worker {
421*35238bceSAndroid Build Coastguard Worker }
422*35238bceSAndroid Build Coastguard Worker
test(void)423*35238bceSAndroid Build Coastguard Worker void test(void)
424*35238bceSAndroid Build Coastguard Worker {
425*35238bceSAndroid Build Coastguard Worker GLuint framebufferID = 0;
426*35238bceSAndroid Build Coastguard Worker glGenFramebuffers(1, &framebufferID);
427*35238bceSAndroid Build Coastguard Worker glBindFramebuffer(GL_FRAMEBUFFER, framebufferID);
428*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
429*35238bceSAndroid Build Coastguard Worker
430*35238bceSAndroid Build Coastguard Worker // rgb8 color
431*35238bceSAndroid Build Coastguard Worker {
432*35238bceSAndroid Build Coastguard Worker GLuint renderbufferID = 0;
433*35238bceSAndroid Build Coastguard Worker glGenRenderbuffers(1, &renderbufferID);
434*35238bceSAndroid Build Coastguard Worker glBindRenderbuffer(GL_RENDERBUFFER, renderbufferID);
435*35238bceSAndroid Build Coastguard Worker glRenderbufferStorage(GL_RENDERBUFFER, GL_RGB8, 128, 128);
436*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
437*35238bceSAndroid Build Coastguard Worker
438*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderbufferID);
439*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
440*35238bceSAndroid Build Coastguard Worker
441*35238bceSAndroid Build Coastguard Worker checkColorAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING,
442*35238bceSAndroid Build Coastguard Worker GL_LINEAR);
443*35238bceSAndroid Build Coastguard Worker
444*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, 0);
445*35238bceSAndroid Build Coastguard Worker glDeleteRenderbuffers(1, &renderbufferID);
446*35238bceSAndroid Build Coastguard Worker }
447*35238bceSAndroid Build Coastguard Worker
448*35238bceSAndroid Build Coastguard Worker // srgb8_alpha8 color
449*35238bceSAndroid Build Coastguard Worker {
450*35238bceSAndroid Build Coastguard Worker GLuint renderbufferID = 0;
451*35238bceSAndroid Build Coastguard Worker glGenRenderbuffers(1, &renderbufferID);
452*35238bceSAndroid Build Coastguard Worker glBindRenderbuffer(GL_RENDERBUFFER, renderbufferID);
453*35238bceSAndroid Build Coastguard Worker glRenderbufferStorage(GL_RENDERBUFFER, GL_SRGB8_ALPHA8, 128, 128);
454*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
455*35238bceSAndroid Build Coastguard Worker
456*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderbufferID);
457*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
458*35238bceSAndroid Build Coastguard Worker
459*35238bceSAndroid Build Coastguard Worker checkColorAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING,
460*35238bceSAndroid Build Coastguard Worker GL_SRGB);
461*35238bceSAndroid Build Coastguard Worker
462*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, 0);
463*35238bceSAndroid Build Coastguard Worker glDeleteRenderbuffers(1, &renderbufferID);
464*35238bceSAndroid Build Coastguard Worker }
465*35238bceSAndroid Build Coastguard Worker
466*35238bceSAndroid Build Coastguard Worker // depth
467*35238bceSAndroid Build Coastguard Worker {
468*35238bceSAndroid Build Coastguard Worker GLuint renderbufferID = 0;
469*35238bceSAndroid Build Coastguard Worker glGenRenderbuffers(1, &renderbufferID);
470*35238bceSAndroid Build Coastguard Worker glBindRenderbuffer(GL_RENDERBUFFER, renderbufferID);
471*35238bceSAndroid Build Coastguard Worker glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, 128, 128);
472*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
473*35238bceSAndroid Build Coastguard Worker
474*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, renderbufferID);
475*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
476*35238bceSAndroid Build Coastguard Worker
477*35238bceSAndroid Build Coastguard Worker checkAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
478*35238bceSAndroid Build Coastguard Worker GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, GL_LINEAR);
479*35238bceSAndroid Build Coastguard Worker
480*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, 0);
481*35238bceSAndroid Build Coastguard Worker glDeleteRenderbuffers(1, &renderbufferID);
482*35238bceSAndroid Build Coastguard Worker }
483*35238bceSAndroid Build Coastguard Worker
484*35238bceSAndroid Build Coastguard Worker glDeleteFramebuffers(1, &framebufferID);
485*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
486*35238bceSAndroid Build Coastguard Worker }
487*35238bceSAndroid Build Coastguard Worker };
488*35238bceSAndroid Build Coastguard Worker
489*35238bceSAndroid Build Coastguard Worker class AttachmentTextureComponentTypeCase : public ApiCase
490*35238bceSAndroid Build Coastguard Worker {
491*35238bceSAndroid Build Coastguard Worker public:
AttachmentTextureComponentTypeCase(Context & context,const char * name,const char * description)492*35238bceSAndroid Build Coastguard Worker AttachmentTextureComponentTypeCase(Context &context, const char *name, const char *description)
493*35238bceSAndroid Build Coastguard Worker : ApiCase(context, name, description)
494*35238bceSAndroid Build Coastguard Worker {
495*35238bceSAndroid Build Coastguard Worker }
496*35238bceSAndroid Build Coastguard Worker
test(void)497*35238bceSAndroid Build Coastguard Worker void test(void)
498*35238bceSAndroid Build Coastguard Worker {
499*35238bceSAndroid Build Coastguard Worker GLuint framebufferID = 0;
500*35238bceSAndroid Build Coastguard Worker glGenFramebuffers(1, &framebufferID);
501*35238bceSAndroid Build Coastguard Worker glBindFramebuffer(GL_FRAMEBUFFER, framebufferID);
502*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
503*35238bceSAndroid Build Coastguard Worker
504*35238bceSAndroid Build Coastguard Worker // color-renderable required texture formats
505*35238bceSAndroid Build Coastguard Worker const struct RequiredColorFormat
506*35238bceSAndroid Build Coastguard Worker {
507*35238bceSAndroid Build Coastguard Worker GLenum internalFormat;
508*35238bceSAndroid Build Coastguard Worker GLenum componentType;
509*35238bceSAndroid Build Coastguard Worker } requiredColorformats[] = {{GL_R8, GL_UNSIGNED_NORMALIZED},
510*35238bceSAndroid Build Coastguard Worker {GL_RG8, GL_UNSIGNED_NORMALIZED},
511*35238bceSAndroid Build Coastguard Worker {GL_RGB8, GL_UNSIGNED_NORMALIZED},
512*35238bceSAndroid Build Coastguard Worker {GL_RGB565, GL_UNSIGNED_NORMALIZED},
513*35238bceSAndroid Build Coastguard Worker {GL_RGBA4, GL_UNSIGNED_NORMALIZED},
514*35238bceSAndroid Build Coastguard Worker {GL_RGB5_A1, GL_UNSIGNED_NORMALIZED},
515*35238bceSAndroid Build Coastguard Worker {GL_RGBA8, GL_UNSIGNED_NORMALIZED},
516*35238bceSAndroid Build Coastguard Worker {GL_RGB10_A2, GL_UNSIGNED_NORMALIZED},
517*35238bceSAndroid Build Coastguard Worker {GL_RGB10_A2UI, GL_UNSIGNED_INT},
518*35238bceSAndroid Build Coastguard Worker {GL_SRGB8_ALPHA8, GL_UNSIGNED_NORMALIZED},
519*35238bceSAndroid Build Coastguard Worker {GL_R8I, GL_INT},
520*35238bceSAndroid Build Coastguard Worker {GL_R8UI, GL_UNSIGNED_INT},
521*35238bceSAndroid Build Coastguard Worker {GL_R16I, GL_INT},
522*35238bceSAndroid Build Coastguard Worker {GL_R16UI, GL_UNSIGNED_INT},
523*35238bceSAndroid Build Coastguard Worker {GL_R32I, GL_INT},
524*35238bceSAndroid Build Coastguard Worker {GL_R32UI, GL_UNSIGNED_INT},
525*35238bceSAndroid Build Coastguard Worker {GL_RG8I, GL_INT},
526*35238bceSAndroid Build Coastguard Worker {GL_RG8UI, GL_UNSIGNED_INT},
527*35238bceSAndroid Build Coastguard Worker {GL_RG16I, GL_INT},
528*35238bceSAndroid Build Coastguard Worker {GL_RG16UI, GL_UNSIGNED_INT},
529*35238bceSAndroid Build Coastguard Worker {GL_RG32I, GL_INT},
530*35238bceSAndroid Build Coastguard Worker {GL_RG32UI, GL_UNSIGNED_INT},
531*35238bceSAndroid Build Coastguard Worker {GL_RGBA8I, GL_INT},
532*35238bceSAndroid Build Coastguard Worker {GL_RGBA8UI, GL_UNSIGNED_INT},
533*35238bceSAndroid Build Coastguard Worker {GL_RGBA16I, GL_INT},
534*35238bceSAndroid Build Coastguard Worker {GL_RGBA16UI, GL_UNSIGNED_INT},
535*35238bceSAndroid Build Coastguard Worker {GL_RGBA32I, GL_INT},
536*35238bceSAndroid Build Coastguard Worker {GL_RGBA32UI, GL_UNSIGNED_INT}};
537*35238bceSAndroid Build Coastguard Worker
538*35238bceSAndroid Build Coastguard Worker for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(requiredColorformats); ++ndx)
539*35238bceSAndroid Build Coastguard Worker {
540*35238bceSAndroid Build Coastguard Worker const GLenum colorFormat = requiredColorformats[ndx].internalFormat;
541*35238bceSAndroid Build Coastguard Worker
542*35238bceSAndroid Build Coastguard Worker GLuint textureID = 0;
543*35238bceSAndroid Build Coastguard Worker glGenTextures(1, &textureID);
544*35238bceSAndroid Build Coastguard Worker glBindTexture(GL_TEXTURE_2D, textureID);
545*35238bceSAndroid Build Coastguard Worker glTexStorage2D(GL_TEXTURE_2D, 1, colorFormat, 128, 128);
546*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
547*35238bceSAndroid Build Coastguard Worker
548*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureID, 0);
549*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
550*35238bceSAndroid Build Coastguard Worker
551*35238bceSAndroid Build Coastguard Worker checkColorAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE,
552*35238bceSAndroid Build Coastguard Worker requiredColorformats[ndx].componentType);
553*35238bceSAndroid Build Coastguard Worker
554*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
555*35238bceSAndroid Build Coastguard Worker glDeleteTextures(1, &textureID);
556*35238bceSAndroid Build Coastguard Worker }
557*35238bceSAndroid Build Coastguard Worker
558*35238bceSAndroid Build Coastguard Worker glDeleteFramebuffers(1, &framebufferID);
559*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
560*35238bceSAndroid Build Coastguard Worker }
561*35238bceSAndroid Build Coastguard Worker };
562*35238bceSAndroid Build Coastguard Worker
563*35238bceSAndroid Build Coastguard Worker class AttachmentSizeInitialCase : public ApiCase
564*35238bceSAndroid Build Coastguard Worker {
565*35238bceSAndroid Build Coastguard Worker public:
AttachmentSizeInitialCase(Context & context,const char * name,const char * description)566*35238bceSAndroid Build Coastguard Worker AttachmentSizeInitialCase(Context &context, const char *name, const char *description)
567*35238bceSAndroid Build Coastguard Worker : ApiCase(context, name, description)
568*35238bceSAndroid Build Coastguard Worker {
569*35238bceSAndroid Build Coastguard Worker }
570*35238bceSAndroid Build Coastguard Worker
test(void)571*35238bceSAndroid Build Coastguard Worker void test(void)
572*35238bceSAndroid Build Coastguard Worker {
573*35238bceSAndroid Build Coastguard Worker const GLenum colorAttachment =
574*35238bceSAndroid Build Coastguard Worker (glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::core(4, 5)) ? GL_FRONT :
575*35238bceSAndroid Build Coastguard Worker GL_BACK);
576*35238bceSAndroid Build Coastguard Worker // check default
577*35238bceSAndroid Build Coastguard Worker if (attachmentExists(colorAttachment))
578*35238bceSAndroid Build Coastguard Worker {
579*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeAtLeast(m_testCtx, *this, GL_FRAMEBUFFER, colorAttachment,
580*35238bceSAndroid Build Coastguard Worker m_context.getRenderTarget().getPixelFormat().redBits,
581*35238bceSAndroid Build Coastguard Worker m_context.getRenderTarget().getPixelFormat().greenBits,
582*35238bceSAndroid Build Coastguard Worker m_context.getRenderTarget().getPixelFormat().blueBits,
583*35238bceSAndroid Build Coastguard Worker m_context.getRenderTarget().getPixelFormat().alphaBits, -1, -1);
584*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
585*35238bceSAndroid Build Coastguard Worker }
586*35238bceSAndroid Build Coastguard Worker
587*35238bceSAndroid Build Coastguard Worker if (attachmentExists(GL_DEPTH))
588*35238bceSAndroid Build Coastguard Worker {
589*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeAtLeast(m_testCtx, *this, GL_FRAMEBUFFER, GL_DEPTH, -1, -1, -1, -1,
590*35238bceSAndroid Build Coastguard Worker m_context.getRenderTarget().getDepthBits(), -1);
591*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
592*35238bceSAndroid Build Coastguard Worker }
593*35238bceSAndroid Build Coastguard Worker
594*35238bceSAndroid Build Coastguard Worker if (attachmentExists(GL_STENCIL))
595*35238bceSAndroid Build Coastguard Worker {
596*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeAtLeast(m_testCtx, *this, GL_FRAMEBUFFER, GL_STENCIL, -1, -1, -1, -1, -1,
597*35238bceSAndroid Build Coastguard Worker m_context.getRenderTarget().getStencilBits());
598*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
599*35238bceSAndroid Build Coastguard Worker }
600*35238bceSAndroid Build Coastguard Worker }
601*35238bceSAndroid Build Coastguard Worker
attachmentExists(GLenum attachment)602*35238bceSAndroid Build Coastguard Worker bool attachmentExists(GLenum attachment)
603*35238bceSAndroid Build Coastguard Worker {
604*35238bceSAndroid Build Coastguard Worker StateQueryMemoryWriteGuard<GLint> state;
605*35238bceSAndroid Build Coastguard Worker glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, attachment, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE,
606*35238bceSAndroid Build Coastguard Worker &state);
607*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
608*35238bceSAndroid Build Coastguard Worker
609*35238bceSAndroid Build Coastguard Worker return !state.isUndefined() && state != GL_NONE;
610*35238bceSAndroid Build Coastguard Worker }
611*35238bceSAndroid Build Coastguard Worker };
612*35238bceSAndroid Build Coastguard Worker
613*35238bceSAndroid Build Coastguard Worker class AttachmentSizeCase : public ApiCase
614*35238bceSAndroid Build Coastguard Worker {
615*35238bceSAndroid Build Coastguard Worker public:
AttachmentSizeCase(Context & context,const char * name,const char * description)616*35238bceSAndroid Build Coastguard Worker AttachmentSizeCase(Context &context, const char *name, const char *description)
617*35238bceSAndroid Build Coastguard Worker : ApiCase(context, name, description)
618*35238bceSAndroid Build Coastguard Worker {
619*35238bceSAndroid Build Coastguard Worker }
620*35238bceSAndroid Build Coastguard Worker
621*35238bceSAndroid Build Coastguard Worker virtual void testColorAttachment(GLenum internalFormat, GLenum attachment, GLint bitsR, GLint bitsG, GLint bitsB,
622*35238bceSAndroid Build Coastguard Worker GLint bitsA) = DE_NULL;
623*35238bceSAndroid Build Coastguard Worker
624*35238bceSAndroid Build Coastguard Worker virtual void testDepthAttachment(GLenum internalFormat, GLenum attachment, GLint bitsD, GLint bitsS) = DE_NULL;
625*35238bceSAndroid Build Coastguard Worker
test(void)626*35238bceSAndroid Build Coastguard Worker void test(void)
627*35238bceSAndroid Build Coastguard Worker {
628*35238bceSAndroid Build Coastguard Worker GLuint framebufferID = 0;
629*35238bceSAndroid Build Coastguard Worker glGenFramebuffers(1, &framebufferID);
630*35238bceSAndroid Build Coastguard Worker glBindFramebuffer(GL_FRAMEBUFFER, framebufferID);
631*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
632*35238bceSAndroid Build Coastguard Worker
633*35238bceSAndroid Build Coastguard Worker // check some color targets
634*35238bceSAndroid Build Coastguard Worker
635*35238bceSAndroid Build Coastguard Worker const struct ColorAttachment
636*35238bceSAndroid Build Coastguard Worker {
637*35238bceSAndroid Build Coastguard Worker GLenum internalFormat;
638*35238bceSAndroid Build Coastguard Worker int bitsR, bitsG, bitsB, bitsA;
639*35238bceSAndroid Build Coastguard Worker } colorAttachments[] = {{GL_RGBA8, 8, 8, 8, 8}, {GL_RGB565, 5, 6, 5, 0}, {GL_RGBA4, 4, 4, 4, 4},
640*35238bceSAndroid Build Coastguard Worker {GL_RGB5_A1, 5, 5, 5, 1}, {GL_RGBA8I, 8, 8, 8, 8}, {GL_RG32UI, 32, 32, 0, 0}};
641*35238bceSAndroid Build Coastguard Worker for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(colorAttachments); ++ndx)
642*35238bceSAndroid Build Coastguard Worker testColorAttachment(colorAttachments[ndx].internalFormat, GL_COLOR_ATTACHMENT0, colorAttachments[ndx].bitsR,
643*35238bceSAndroid Build Coastguard Worker colorAttachments[ndx].bitsG, colorAttachments[ndx].bitsB, colorAttachments[ndx].bitsA);
644*35238bceSAndroid Build Coastguard Worker
645*35238bceSAndroid Build Coastguard Worker // check some depth targets
646*35238bceSAndroid Build Coastguard Worker
647*35238bceSAndroid Build Coastguard Worker const struct DepthAttachment
648*35238bceSAndroid Build Coastguard Worker {
649*35238bceSAndroid Build Coastguard Worker GLenum internalFormat;
650*35238bceSAndroid Build Coastguard Worker GLenum attachment;
651*35238bceSAndroid Build Coastguard Worker int dbits;
652*35238bceSAndroid Build Coastguard Worker int sbits;
653*35238bceSAndroid Build Coastguard Worker } depthAttachments[] = {
654*35238bceSAndroid Build Coastguard Worker {GL_DEPTH_COMPONENT16, GL_DEPTH_ATTACHMENT, 16, 0},
655*35238bceSAndroid Build Coastguard Worker {GL_DEPTH_COMPONENT24, GL_DEPTH_ATTACHMENT, 24, 0},
656*35238bceSAndroid Build Coastguard Worker {GL_DEPTH_COMPONENT32F, GL_DEPTH_ATTACHMENT, 32, 0},
657*35238bceSAndroid Build Coastguard Worker {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL_ATTACHMENT, 24, 8},
658*35238bceSAndroid Build Coastguard Worker {GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL_ATTACHMENT, 32, 8},
659*35238bceSAndroid Build Coastguard Worker };
660*35238bceSAndroid Build Coastguard Worker for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(depthAttachments); ++ndx)
661*35238bceSAndroid Build Coastguard Worker testDepthAttachment(depthAttachments[ndx].internalFormat, depthAttachments[ndx].attachment,
662*35238bceSAndroid Build Coastguard Worker depthAttachments[ndx].dbits, depthAttachments[ndx].sbits);
663*35238bceSAndroid Build Coastguard Worker
664*35238bceSAndroid Build Coastguard Worker glDeleteFramebuffers(1, &framebufferID);
665*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
666*35238bceSAndroid Build Coastguard Worker }
667*35238bceSAndroid Build Coastguard Worker };
668*35238bceSAndroid Build Coastguard Worker
669*35238bceSAndroid Build Coastguard Worker class AttachmentSizeRboCase : public AttachmentSizeCase
670*35238bceSAndroid Build Coastguard Worker {
671*35238bceSAndroid Build Coastguard Worker public:
AttachmentSizeRboCase(Context & context,const char * name,const char * description)672*35238bceSAndroid Build Coastguard Worker AttachmentSizeRboCase(Context &context, const char *name, const char *description)
673*35238bceSAndroid Build Coastguard Worker : AttachmentSizeCase(context, name, description)
674*35238bceSAndroid Build Coastguard Worker {
675*35238bceSAndroid Build Coastguard Worker }
676*35238bceSAndroid Build Coastguard Worker
testColorAttachment(GLenum internalFormat,GLenum attachment,GLint bitsR,GLint bitsG,GLint bitsB,GLint bitsA)677*35238bceSAndroid Build Coastguard Worker void testColorAttachment(GLenum internalFormat, GLenum attachment, GLint bitsR, GLint bitsG, GLint bitsB,
678*35238bceSAndroid Build Coastguard Worker GLint bitsA)
679*35238bceSAndroid Build Coastguard Worker {
680*35238bceSAndroid Build Coastguard Worker GLuint renderbufferID = 0;
681*35238bceSAndroid Build Coastguard Worker glGenRenderbuffers(1, &renderbufferID);
682*35238bceSAndroid Build Coastguard Worker glBindRenderbuffer(GL_RENDERBUFFER, renderbufferID);
683*35238bceSAndroid Build Coastguard Worker glRenderbufferStorage(GL_RENDERBUFFER, internalFormat, 128, 128);
684*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
685*35238bceSAndroid Build Coastguard Worker
686*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, attachment, GL_RENDERBUFFER, renderbufferID);
687*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
688*35238bceSAndroid Build Coastguard Worker
689*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeAtLeast(m_testCtx, *this, GL_FRAMEBUFFER, attachment, bitsR, bitsG, bitsB, bitsA,
690*35238bceSAndroid Build Coastguard Worker -1, -1);
691*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeExactly(m_testCtx, *this, GL_FRAMEBUFFER, attachment, -1, -1, -1, -1, 0, 0);
692*35238bceSAndroid Build Coastguard Worker
693*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, attachment, GL_RENDERBUFFER, 0);
694*35238bceSAndroid Build Coastguard Worker glDeleteRenderbuffers(1, &renderbufferID);
695*35238bceSAndroid Build Coastguard Worker }
696*35238bceSAndroid Build Coastguard Worker
testDepthAttachment(GLenum internalFormat,GLenum attachment,GLint bitsD,GLint bitsS)697*35238bceSAndroid Build Coastguard Worker void testDepthAttachment(GLenum internalFormat, GLenum attachment, GLint bitsD, GLint bitsS)
698*35238bceSAndroid Build Coastguard Worker {
699*35238bceSAndroid Build Coastguard Worker GLuint renderbufferID = 0;
700*35238bceSAndroid Build Coastguard Worker glGenRenderbuffers(1, &renderbufferID);
701*35238bceSAndroid Build Coastguard Worker glBindRenderbuffer(GL_RENDERBUFFER, renderbufferID);
702*35238bceSAndroid Build Coastguard Worker glRenderbufferStorage(GL_RENDERBUFFER, internalFormat, 128, 128);
703*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
704*35238bceSAndroid Build Coastguard Worker
705*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, attachment, GL_RENDERBUFFER, renderbufferID);
706*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
707*35238bceSAndroid Build Coastguard Worker
708*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeAtLeast(m_testCtx, *this, GL_FRAMEBUFFER, attachment, -1, -1, -1, -1, bitsD, bitsS);
709*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeExactly(m_testCtx, *this, GL_FRAMEBUFFER, attachment, 0, 0, 0, 0, -1, -1);
710*35238bceSAndroid Build Coastguard Worker
711*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, attachment, GL_RENDERBUFFER, 0);
712*35238bceSAndroid Build Coastguard Worker glDeleteRenderbuffers(1, &renderbufferID);
713*35238bceSAndroid Build Coastguard Worker }
714*35238bceSAndroid Build Coastguard Worker };
715*35238bceSAndroid Build Coastguard Worker
716*35238bceSAndroid Build Coastguard Worker class AttachmentSizeTextureCase : public AttachmentSizeCase
717*35238bceSAndroid Build Coastguard Worker {
718*35238bceSAndroid Build Coastguard Worker public:
AttachmentSizeTextureCase(Context & context,const char * name,const char * description)719*35238bceSAndroid Build Coastguard Worker AttachmentSizeTextureCase(Context &context, const char *name, const char *description)
720*35238bceSAndroid Build Coastguard Worker : AttachmentSizeCase(context, name, description)
721*35238bceSAndroid Build Coastguard Worker {
722*35238bceSAndroid Build Coastguard Worker }
723*35238bceSAndroid Build Coastguard Worker
testColorAttachment(GLenum internalFormat,GLenum attachment,GLint bitsR,GLint bitsG,GLint bitsB,GLint bitsA)724*35238bceSAndroid Build Coastguard Worker void testColorAttachment(GLenum internalFormat, GLenum attachment, GLint bitsR, GLint bitsG, GLint bitsB,
725*35238bceSAndroid Build Coastguard Worker GLint bitsA)
726*35238bceSAndroid Build Coastguard Worker {
727*35238bceSAndroid Build Coastguard Worker GLuint textureID = 0;
728*35238bceSAndroid Build Coastguard Worker glGenTextures(1, &textureID);
729*35238bceSAndroid Build Coastguard Worker glBindTexture(GL_TEXTURE_2D, textureID);
730*35238bceSAndroid Build Coastguard Worker glTexStorage2D(GL_TEXTURE_2D, 1, internalFormat, 128, 128);
731*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
732*35238bceSAndroid Build Coastguard Worker
733*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_2D, textureID, 0);
734*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
735*35238bceSAndroid Build Coastguard Worker
736*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeAtLeast(m_testCtx, *this, GL_FRAMEBUFFER, attachment, bitsR, bitsG, bitsB, bitsA,
737*35238bceSAndroid Build Coastguard Worker -1, -1);
738*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeExactly(m_testCtx, *this, GL_FRAMEBUFFER, attachment, -1, -1, -1, -1, 0, 0);
739*35238bceSAndroid Build Coastguard Worker
740*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_2D, 0, 0);
741*35238bceSAndroid Build Coastguard Worker glDeleteTextures(1, &textureID);
742*35238bceSAndroid Build Coastguard Worker }
743*35238bceSAndroid Build Coastguard Worker
testDepthAttachment(GLenum internalFormat,GLenum attachment,GLint bitsD,GLint bitsS)744*35238bceSAndroid Build Coastguard Worker void testDepthAttachment(GLenum internalFormat, GLenum attachment, GLint bitsD, GLint bitsS)
745*35238bceSAndroid Build Coastguard Worker {
746*35238bceSAndroid Build Coastguard Worker // don't test stencil formats with textures
747*35238bceSAndroid Build Coastguard Worker if (attachment == GL_DEPTH_STENCIL_ATTACHMENT)
748*35238bceSAndroid Build Coastguard Worker return;
749*35238bceSAndroid Build Coastguard Worker
750*35238bceSAndroid Build Coastguard Worker GLuint textureID = 0;
751*35238bceSAndroid Build Coastguard Worker glGenTextures(1, &textureID);
752*35238bceSAndroid Build Coastguard Worker glBindTexture(GL_TEXTURE_2D, textureID);
753*35238bceSAndroid Build Coastguard Worker glTexStorage2D(GL_TEXTURE_2D, 1, internalFormat, 128, 128);
754*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
755*35238bceSAndroid Build Coastguard Worker
756*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_2D, textureID, 0);
757*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
758*35238bceSAndroid Build Coastguard Worker
759*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeAtLeast(m_testCtx, *this, GL_FRAMEBUFFER, attachment, -1, -1, -1, -1, bitsD, bitsS);
760*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeExactly(m_testCtx, *this, GL_FRAMEBUFFER, attachment, 0, 0, 0, 0, -1, -1);
761*35238bceSAndroid Build Coastguard Worker
762*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_2D, 0, 0);
763*35238bceSAndroid Build Coastguard Worker glDeleteTextures(1, &textureID);
764*35238bceSAndroid Build Coastguard Worker }
765*35238bceSAndroid Build Coastguard Worker };
766*35238bceSAndroid Build Coastguard Worker
767*35238bceSAndroid Build Coastguard Worker class UnspecifiedAttachmentTextureColorCodingCase : public ApiCase
768*35238bceSAndroid Build Coastguard Worker {
769*35238bceSAndroid Build Coastguard Worker public:
UnspecifiedAttachmentTextureColorCodingCase(Context & context,const char * name,const char * description)770*35238bceSAndroid Build Coastguard Worker UnspecifiedAttachmentTextureColorCodingCase(Context &context, const char *name, const char *description)
771*35238bceSAndroid Build Coastguard Worker : ApiCase(context, name, description)
772*35238bceSAndroid Build Coastguard Worker {
773*35238bceSAndroid Build Coastguard Worker }
774*35238bceSAndroid Build Coastguard Worker
test(void)775*35238bceSAndroid Build Coastguard Worker void test(void)
776*35238bceSAndroid Build Coastguard Worker {
777*35238bceSAndroid Build Coastguard Worker GLuint framebufferID = 0;
778*35238bceSAndroid Build Coastguard Worker glGenFramebuffers(1, &framebufferID);
779*35238bceSAndroid Build Coastguard Worker glBindFramebuffer(GL_FRAMEBUFFER, framebufferID);
780*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
781*35238bceSAndroid Build Coastguard Worker
782*35238bceSAndroid Build Coastguard Worker // color
783*35238bceSAndroid Build Coastguard Worker {
784*35238bceSAndroid Build Coastguard Worker GLuint renderbufferID = 0;
785*35238bceSAndroid Build Coastguard Worker glGenRenderbuffers(1, &renderbufferID);
786*35238bceSAndroid Build Coastguard Worker glBindRenderbuffer(GL_RENDERBUFFER, renderbufferID);
787*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
788*35238bceSAndroid Build Coastguard Worker
789*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderbufferID);
790*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
791*35238bceSAndroid Build Coastguard Worker
792*35238bceSAndroid Build Coastguard Worker checkColorAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING,
793*35238bceSAndroid Build Coastguard Worker GL_LINEAR);
794*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
795*35238bceSAndroid Build Coastguard Worker
796*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, 0);
797*35238bceSAndroid Build Coastguard Worker glDeleteRenderbuffers(1, &renderbufferID);
798*35238bceSAndroid Build Coastguard Worker }
799*35238bceSAndroid Build Coastguard Worker
800*35238bceSAndroid Build Coastguard Worker // depth
801*35238bceSAndroid Build Coastguard Worker {
802*35238bceSAndroid Build Coastguard Worker GLuint renderbufferID = 0;
803*35238bceSAndroid Build Coastguard Worker glGenRenderbuffers(1, &renderbufferID);
804*35238bceSAndroid Build Coastguard Worker glBindRenderbuffer(GL_RENDERBUFFER, renderbufferID);
805*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
806*35238bceSAndroid Build Coastguard Worker
807*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, renderbufferID);
808*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
809*35238bceSAndroid Build Coastguard Worker
810*35238bceSAndroid Build Coastguard Worker checkAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
811*35238bceSAndroid Build Coastguard Worker GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, GL_LINEAR);
812*35238bceSAndroid Build Coastguard Worker
813*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, 0);
814*35238bceSAndroid Build Coastguard Worker glDeleteRenderbuffers(1, &renderbufferID);
815*35238bceSAndroid Build Coastguard Worker }
816*35238bceSAndroid Build Coastguard Worker
817*35238bceSAndroid Build Coastguard Worker glDeleteFramebuffers(1, &framebufferID);
818*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
819*35238bceSAndroid Build Coastguard Worker }
820*35238bceSAndroid Build Coastguard Worker };
821*35238bceSAndroid Build Coastguard Worker
822*35238bceSAndroid Build Coastguard Worker class UnspecifiedAttachmentTextureComponentTypeCase : public ApiCase
823*35238bceSAndroid Build Coastguard Worker {
824*35238bceSAndroid Build Coastguard Worker public:
UnspecifiedAttachmentTextureComponentTypeCase(Context & context,const char * name,const char * description)825*35238bceSAndroid Build Coastguard Worker UnspecifiedAttachmentTextureComponentTypeCase(Context &context, const char *name, const char *description)
826*35238bceSAndroid Build Coastguard Worker : ApiCase(context, name, description)
827*35238bceSAndroid Build Coastguard Worker {
828*35238bceSAndroid Build Coastguard Worker }
829*35238bceSAndroid Build Coastguard Worker
test(void)830*35238bceSAndroid Build Coastguard Worker void test(void)
831*35238bceSAndroid Build Coastguard Worker {
832*35238bceSAndroid Build Coastguard Worker GLuint framebufferID = 0;
833*35238bceSAndroid Build Coastguard Worker glGenFramebuffers(1, &framebufferID);
834*35238bceSAndroid Build Coastguard Worker glBindFramebuffer(GL_FRAMEBUFFER, framebufferID);
835*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
836*35238bceSAndroid Build Coastguard Worker
837*35238bceSAndroid Build Coastguard Worker {
838*35238bceSAndroid Build Coastguard Worker GLuint textureID = 0;
839*35238bceSAndroid Build Coastguard Worker glGenTextures(1, &textureID);
840*35238bceSAndroid Build Coastguard Worker glBindTexture(GL_TEXTURE_2D, textureID);
841*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
842*35238bceSAndroid Build Coastguard Worker
843*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureID, 0);
844*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
845*35238bceSAndroid Build Coastguard Worker
846*35238bceSAndroid Build Coastguard Worker checkColorAttachmentParam(m_testCtx, *this, GL_FRAMEBUFFER, GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE,
847*35238bceSAndroid Build Coastguard Worker GL_NONE);
848*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
849*35238bceSAndroid Build Coastguard Worker
850*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
851*35238bceSAndroid Build Coastguard Worker glDeleteTextures(1, &textureID);
852*35238bceSAndroid Build Coastguard Worker }
853*35238bceSAndroid Build Coastguard Worker
854*35238bceSAndroid Build Coastguard Worker glDeleteFramebuffers(1, &framebufferID);
855*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
856*35238bceSAndroid Build Coastguard Worker }
857*35238bceSAndroid Build Coastguard Worker };
858*35238bceSAndroid Build Coastguard Worker
859*35238bceSAndroid Build Coastguard Worker class UnspecifiedAttachmentSizeCase : public ApiCase
860*35238bceSAndroid Build Coastguard Worker {
861*35238bceSAndroid Build Coastguard Worker public:
UnspecifiedAttachmentSizeCase(Context & context,const char * name,const char * description)862*35238bceSAndroid Build Coastguard Worker UnspecifiedAttachmentSizeCase(Context &context, const char *name, const char *description)
863*35238bceSAndroid Build Coastguard Worker : ApiCase(context, name, description)
864*35238bceSAndroid Build Coastguard Worker {
865*35238bceSAndroid Build Coastguard Worker }
866*35238bceSAndroid Build Coastguard Worker
867*35238bceSAndroid Build Coastguard Worker virtual void testColorAttachment(void) = DE_NULL;
868*35238bceSAndroid Build Coastguard Worker
869*35238bceSAndroid Build Coastguard Worker virtual void testDepthAttachment(void) = DE_NULL;
870*35238bceSAndroid Build Coastguard Worker
test(void)871*35238bceSAndroid Build Coastguard Worker void test(void)
872*35238bceSAndroid Build Coastguard Worker {
873*35238bceSAndroid Build Coastguard Worker GLuint framebufferID = 0;
874*35238bceSAndroid Build Coastguard Worker glGenFramebuffers(1, &framebufferID);
875*35238bceSAndroid Build Coastguard Worker glBindFramebuffer(GL_FRAMEBUFFER, framebufferID);
876*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
877*35238bceSAndroid Build Coastguard Worker
878*35238bceSAndroid Build Coastguard Worker // check color target
879*35238bceSAndroid Build Coastguard Worker testColorAttachment();
880*35238bceSAndroid Build Coastguard Worker
881*35238bceSAndroid Build Coastguard Worker // check depth target
882*35238bceSAndroid Build Coastguard Worker testDepthAttachment();
883*35238bceSAndroid Build Coastguard Worker
884*35238bceSAndroid Build Coastguard Worker glDeleteFramebuffers(1, &framebufferID);
885*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
886*35238bceSAndroid Build Coastguard Worker }
887*35238bceSAndroid Build Coastguard Worker };
888*35238bceSAndroid Build Coastguard Worker
889*35238bceSAndroid Build Coastguard Worker class UnspecifiedAttachmentSizeRboCase : public UnspecifiedAttachmentSizeCase
890*35238bceSAndroid Build Coastguard Worker {
891*35238bceSAndroid Build Coastguard Worker public:
UnspecifiedAttachmentSizeRboCase(Context & context,const char * name,const char * description)892*35238bceSAndroid Build Coastguard Worker UnspecifiedAttachmentSizeRboCase(Context &context, const char *name, const char *description)
893*35238bceSAndroid Build Coastguard Worker : UnspecifiedAttachmentSizeCase(context, name, description)
894*35238bceSAndroid Build Coastguard Worker {
895*35238bceSAndroid Build Coastguard Worker }
896*35238bceSAndroid Build Coastguard Worker
testColorAttachment(void)897*35238bceSAndroid Build Coastguard Worker void testColorAttachment(void)
898*35238bceSAndroid Build Coastguard Worker {
899*35238bceSAndroid Build Coastguard Worker GLuint renderbufferID = 0;
900*35238bceSAndroid Build Coastguard Worker glGenRenderbuffers(1, &renderbufferID);
901*35238bceSAndroid Build Coastguard Worker glBindRenderbuffer(GL_RENDERBUFFER, renderbufferID);
902*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
903*35238bceSAndroid Build Coastguard Worker
904*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderbufferID);
905*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
906*35238bceSAndroid Build Coastguard Worker
907*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeExactly(m_testCtx, *this, GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 0, 0, 0, 0, 0, 0);
908*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
909*35238bceSAndroid Build Coastguard Worker
910*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, 0);
911*35238bceSAndroid Build Coastguard Worker glDeleteRenderbuffers(1, &renderbufferID);
912*35238bceSAndroid Build Coastguard Worker }
913*35238bceSAndroid Build Coastguard Worker
testDepthAttachment(void)914*35238bceSAndroid Build Coastguard Worker void testDepthAttachment(void)
915*35238bceSAndroid Build Coastguard Worker {
916*35238bceSAndroid Build Coastguard Worker GLuint renderbufferID = 0;
917*35238bceSAndroid Build Coastguard Worker glGenRenderbuffers(1, &renderbufferID);
918*35238bceSAndroid Build Coastguard Worker glBindRenderbuffer(GL_RENDERBUFFER, renderbufferID);
919*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
920*35238bceSAndroid Build Coastguard Worker
921*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, renderbufferID);
922*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
923*35238bceSAndroid Build Coastguard Worker
924*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeExactly(m_testCtx, *this, GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, 0, 0, 0, 0, 0, 0);
925*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
926*35238bceSAndroid Build Coastguard Worker
927*35238bceSAndroid Build Coastguard Worker glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0);
928*35238bceSAndroid Build Coastguard Worker glDeleteRenderbuffers(1, &renderbufferID);
929*35238bceSAndroid Build Coastguard Worker }
930*35238bceSAndroid Build Coastguard Worker };
931*35238bceSAndroid Build Coastguard Worker
932*35238bceSAndroid Build Coastguard Worker class UnspecifiedAttachmentSizeTextureCase : public UnspecifiedAttachmentSizeCase
933*35238bceSAndroid Build Coastguard Worker {
934*35238bceSAndroid Build Coastguard Worker public:
UnspecifiedAttachmentSizeTextureCase(Context & context,const char * name,const char * description)935*35238bceSAndroid Build Coastguard Worker UnspecifiedAttachmentSizeTextureCase(Context &context, const char *name, const char *description)
936*35238bceSAndroid Build Coastguard Worker : UnspecifiedAttachmentSizeCase(context, name, description)
937*35238bceSAndroid Build Coastguard Worker {
938*35238bceSAndroid Build Coastguard Worker }
939*35238bceSAndroid Build Coastguard Worker
testColorAttachment(void)940*35238bceSAndroid Build Coastguard Worker void testColorAttachment(void)
941*35238bceSAndroid Build Coastguard Worker {
942*35238bceSAndroid Build Coastguard Worker GLuint textureID = 0;
943*35238bceSAndroid Build Coastguard Worker glGenTextures(1, &textureID);
944*35238bceSAndroid Build Coastguard Worker glBindTexture(GL_TEXTURE_2D, textureID);
945*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
946*35238bceSAndroid Build Coastguard Worker
947*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureID, 0);
948*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
949*35238bceSAndroid Build Coastguard Worker
950*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeExactly(m_testCtx, *this, GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 0, 0, 0, 0, 0, 0);
951*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
952*35238bceSAndroid Build Coastguard Worker
953*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
954*35238bceSAndroid Build Coastguard Worker glDeleteTextures(1, &textureID);
955*35238bceSAndroid Build Coastguard Worker }
956*35238bceSAndroid Build Coastguard Worker
testDepthAttachment(void)957*35238bceSAndroid Build Coastguard Worker void testDepthAttachment(void)
958*35238bceSAndroid Build Coastguard Worker {
959*35238bceSAndroid Build Coastguard Worker GLuint textureID = 0;
960*35238bceSAndroid Build Coastguard Worker glGenTextures(1, &textureID);
961*35238bceSAndroid Build Coastguard Worker glBindTexture(GL_TEXTURE_2D, textureID);
962*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
963*35238bceSAndroid Build Coastguard Worker
964*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, textureID, 0);
965*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
966*35238bceSAndroid Build Coastguard Worker
967*35238bceSAndroid Build Coastguard Worker checkAttachmentComponentSizeExactly(m_testCtx, *this, GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, 0, 0, 0, 0, 0, 0);
968*35238bceSAndroid Build Coastguard Worker expectError(GL_NO_ERROR);
969*35238bceSAndroid Build Coastguard Worker
970*35238bceSAndroid Build Coastguard Worker glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, 0, 0);
971*35238bceSAndroid Build Coastguard Worker glDeleteTextures(1, &textureID);
972*35238bceSAndroid Build Coastguard Worker }
973*35238bceSAndroid Build Coastguard Worker };
974*35238bceSAndroid Build Coastguard Worker
975*35238bceSAndroid Build Coastguard Worker } // namespace
976*35238bceSAndroid Build Coastguard Worker
FboStateQueryTests(Context & context)977*35238bceSAndroid Build Coastguard Worker FboStateQueryTests::FboStateQueryTests(Context &context) : TestCaseGroup(context, "fbo", "Fbo State Query tests")
978*35238bceSAndroid Build Coastguard Worker {
979*35238bceSAndroid Build Coastguard Worker }
980*35238bceSAndroid Build Coastguard Worker
init(void)981*35238bceSAndroid Build Coastguard Worker void FboStateQueryTests::init(void)
982*35238bceSAndroid Build Coastguard Worker {
983*35238bceSAndroid Build Coastguard Worker const struct FramebufferTarget
984*35238bceSAndroid Build Coastguard Worker {
985*35238bceSAndroid Build Coastguard Worker const char *name;
986*35238bceSAndroid Build Coastguard Worker GLenum target;
987*35238bceSAndroid Build Coastguard Worker } fboTargets[] = {{"draw_framebuffer_", GL_DRAW_FRAMEBUFFER}, {"read_framebuffer_", GL_READ_FRAMEBUFFER}};
988*35238bceSAndroid Build Coastguard Worker
989*35238bceSAndroid Build Coastguard Worker for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(fboTargets); ++ndx)
990*35238bceSAndroid Build Coastguard Worker addChild(new DefaultFramebufferCase(m_context,
991*35238bceSAndroid Build Coastguard Worker (std::string(fboTargets[ndx].name) + "default_framebuffer").c_str(),
992*35238bceSAndroid Build Coastguard Worker "default framebuffer", fboTargets[ndx].target));
993*35238bceSAndroid Build Coastguard Worker
994*35238bceSAndroid Build Coastguard Worker addChild(new AttachmentObjectCase(m_context, "framebuffer_attachment_object",
995*35238bceSAndroid Build Coastguard Worker "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE and FRAMEBUFFER_ATTACHMENT_OBJECT_NAME"));
996*35238bceSAndroid Build Coastguard Worker addChild(new AttachmentTextureLevelCase(m_context, "framebuffer_attachment_texture_level",
997*35238bceSAndroid Build Coastguard Worker "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL"));
998*35238bceSAndroid Build Coastguard Worker addChild(new AttachmentTextureCubeMapFaceCase(m_context, "framebuffer_attachment_texture_cube_map_face",
999*35238bceSAndroid Build Coastguard Worker "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE"));
1000*35238bceSAndroid Build Coastguard Worker addChild(new AttachmentTextureLayerCase(m_context, "framebuffer_attachment_texture_layer",
1001*35238bceSAndroid Build Coastguard Worker "FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER"));
1002*35238bceSAndroid Build Coastguard Worker addChild(new AttachmentTextureColorCodingCase(m_context, "framebuffer_attachment_color_encoding",
1003*35238bceSAndroid Build Coastguard Worker "FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING"));
1004*35238bceSAndroid Build Coastguard Worker addChild(new AttachmentTextureComponentTypeCase(m_context, "framebuffer_attachment_component_type",
1005*35238bceSAndroid Build Coastguard Worker "FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE"));
1006*35238bceSAndroid Build Coastguard Worker addChild(new AttachmentSizeInitialCase(m_context, "framebuffer_attachment_x_size_initial",
1007*35238bceSAndroid Build Coastguard Worker "FRAMEBUFFER_ATTACHMENT_x_SIZE"));
1008*35238bceSAndroid Build Coastguard Worker addChild(
1009*35238bceSAndroid Build Coastguard Worker new AttachmentSizeRboCase(m_context, "framebuffer_attachment_x_size_rbo", "FRAMEBUFFER_ATTACHMENT_x_SIZE"));
1010*35238bceSAndroid Build Coastguard Worker addChild(new AttachmentSizeTextureCase(m_context, "framebuffer_attachment_x_size_texture",
1011*35238bceSAndroid Build Coastguard Worker "FRAMEBUFFER_ATTACHMENT_x_SIZE"));
1012*35238bceSAndroid Build Coastguard Worker
1013*35238bceSAndroid Build Coastguard Worker addChild(new UnspecifiedAttachmentTextureColorCodingCase(
1014*35238bceSAndroid Build Coastguard Worker m_context, "framebuffer_unspecified_attachment_color_encoding", "FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING"));
1015*35238bceSAndroid Build Coastguard Worker addChild(new UnspecifiedAttachmentTextureComponentTypeCase(
1016*35238bceSAndroid Build Coastguard Worker m_context, "framebuffer_unspecified_attachment_component_type", "FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE"));
1017*35238bceSAndroid Build Coastguard Worker addChild(new UnspecifiedAttachmentSizeRboCase(m_context, "framebuffer_unspecified_attachment_x_size_rbo",
1018*35238bceSAndroid Build Coastguard Worker "FRAMEBUFFER_ATTACHMENT_x_SIZE"));
1019*35238bceSAndroid Build Coastguard Worker addChild(new UnspecifiedAttachmentSizeTextureCase(m_context, "framebuffer_unspecified_attachment_x_size_texture",
1020*35238bceSAndroid Build Coastguard Worker "FRAMEBUFFER_ATTACHMENT_x_SIZE"));
1021*35238bceSAndroid Build Coastguard Worker }
1022*35238bceSAndroid Build Coastguard Worker
1023*35238bceSAndroid Build Coastguard Worker } // namespace Functional
1024*35238bceSAndroid Build Coastguard Worker } // namespace gles3
1025*35238bceSAndroid Build Coastguard Worker } // namespace deqp
1026