Lines Matching refs:gl
41 void resetErrors (const glw::Functions& gl) in resetErrors() argument
47 if (gl.getError() == GL_NONE) in resetErrors()
59 const glw::Functions& gl = renderCtx.getFunctions(); in resetStateES() local
63 resetErrors(gl); in resetStateES()
70 gl.getIntegerv(GL_MAX_VERTEX_ATTRIBS, &numVertexAttribArrays); in resetStateES()
72 gl.bindBuffer (GL_ARRAY_BUFFER, 0); in resetStateES()
73 gl.bindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0); in resetStateES()
77 gl.bindVertexArray (0); in resetStateES()
78 gl.disable (GL_PRIMITIVE_RESTART_FIXED_INDEX); in resetStateES()
82 gl.bindBuffer(GL_DRAW_INDIRECT_BUFFER, 0); in resetStateES()
86 gl.disableVertexAttribArray (ndx); in resetStateES()
87 gl.vertexAttribPointer (ndx, 4, GL_FLOAT, GL_FALSE, 0, DE_NULL); in resetStateES()
90 gl.vertexAttribDivisor(ndx, 0); in resetStateES()
93 GLU_EXPECT_NO_ERROR(gl.getError(), "Vertex attrib array state reset failed"); in resetStateES()
100 gl.viewport (0, 0, renderTarget.getWidth(), renderTarget.getHeight()); in resetStateES()
101 gl.depthRangef (0.0f, 1.0f); in resetStateES()
104 gl.bindTransformFeedback(GL_TRANSFORM_FEEDBACK, 0); in resetStateES()
106 GLU_EXPECT_NO_ERROR(gl.getError(), "Transformation state reset failed"); in resetStateES()
111 gl.lineWidth (1.0f); in resetStateES()
112 gl.disable (GL_CULL_FACE); in resetStateES()
113 gl.cullFace (GL_BACK); in resetStateES()
114 gl.frontFace (GL_CCW); in resetStateES()
115 gl.polygonOffset(0.0f, 0.0f); in resetStateES()
116 gl.disable (GL_POLYGON_OFFSET_FILL); in resetStateES()
119 gl.disable(GL_RASTERIZER_DISCARD); in resetStateES()
121 GLU_EXPECT_NO_ERROR(gl.getError(), "Rasterization state reset failed"); in resetStateES()
126 gl.disable (GL_SAMPLE_ALPHA_TO_COVERAGE); in resetStateES()
127 gl.disable (GL_SAMPLE_COVERAGE); in resetStateES()
128 gl.sampleCoverage (1.0f, GL_FALSE); in resetStateES()
133 gl.getIntegerv(GL_MAX_SAMPLE_MASK_WORDS, &numSampleMaskWords); in resetStateES()
135 gl.disable(GL_SAMPLE_MASK); in resetStateES()
138 gl.sampleMaski(ndx, ~0u); in resetStateES()
141 GLU_EXPECT_NO_ERROR(gl.getError(), "Multisampling state reset failed"); in resetStateES()
151 gl.getIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &numTexUnits); in resetStateES()
155 gl.activeTexture(GL_TEXTURE0 + ndx); in resetStateES()
158 gl.bindTexture(GL_TEXTURE_2D, 0); in resetStateES()
159 gl.texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateES()
160 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR); in resetStateES()
161 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateES()
162 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateES()
163 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateES()
167 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
168 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
169 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
170 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
171 gl.texParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateES()
172 gl.texParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateES()
173 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
174 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
175 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateES()
176 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateES()
180 gl.texParameteri(GL_TEXTURE_2D, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_DEPTH_COMPONENT); in resetStateES()
183 gl.texParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateES()
186 gl.bindTexture(GL_TEXTURE_CUBE_MAP, 0); in resetStateES()
187 …gl.texImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_N… in resetStateES()
188 …gl.texImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_N… in resetStateES()
189 …gl.texImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_N… in resetStateES()
190 …gl.texImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_N… in resetStateES()
191 …gl.texImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_N… in resetStateES()
192 …gl.texImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_N… in resetStateES()
193 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR); in resetStateES()
194 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateES()
195 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateES()
196 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateES()
200 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
201 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
202 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
203 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
204 gl.texParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateES()
205 gl.texParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateES()
206 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
207 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
208 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateES()
209 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateES()
213 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_DEPTH_COMPONENT); in resetStateES()
216 gl.texParameterfv(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateES()
221 gl.bindTexture(GL_TEXTURE_2D_ARRAY, 0); in resetStateES()
222 gl.texImage3D(GL_TEXTURE_2D_ARRAY, 0, GL_RGBA, 0, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateES()
223 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR); in resetStateES()
224 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateES()
225 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateES()
226 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateES()
227 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
228 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
229 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
230 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
231 gl.texParameterf(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateES()
232 gl.texParameterf(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateES()
233 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
234 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
235 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateES()
236 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateES()
239 gl.texParameterfv(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateES()
243 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_DEPTH_COMPONENT); in resetStateES()
248 gl.bindTexture(GL_TEXTURE_3D, 0); in resetStateES()
249 gl.texImage3D(GL_TEXTURE_3D, 0, GL_RGBA, 0, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateES()
250 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR); in resetStateES()
251 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateES()
252 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateES()
253 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateES()
254 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT); in resetStateES()
255 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
256 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
257 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
258 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
259 gl.texParameterf(GL_TEXTURE_3D, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateES()
260 gl.texParameterf(GL_TEXTURE_3D, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateES()
261 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
262 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
263 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateES()
264 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateES()
267 gl.texParameterfv(GL_TEXTURE_3D, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateES()
271 gl.texParameteri(GL_TEXTURE_3D, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_DEPTH_COMPONENT); in resetStateES()
276 gl.bindTexture(GL_TEXTURE_2D_MULTISAMPLE, 0); in resetStateES()
277 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
278 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
279 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
280 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
281 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
282 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
287 gl.bindTexture(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 0); in resetStateES()
288 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
289 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
290 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
291 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
292 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
293 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
299 gl.bindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, 0); in resetStateES()
300 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR); in resetStateES()
301 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateES()
302 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateES()
303 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateES()
304 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
305 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
306 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
307 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
308 gl.texParameterf(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateES()
309 gl.texParameterf(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateES()
310 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
311 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
312 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateES()
313 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateES()
316 gl.texParameterfv(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateES()
320 gl.activeTexture(GL_TEXTURE0); in resetStateES()
325 gl.bindSampler(ndx, 0); in resetStateES()
328 GLU_EXPECT_NO_ERROR(gl.getError(), "Texture state reset failed"); in resetStateES()
338 gl.getIntegerv(GL_MAX_DRAW_BUFFERS, &numDrawBuffers); in resetStateES()
342 gl.disablei (GL_BLEND, drawBufferNdx); in resetStateES()
343 gl.blendFunci (drawBufferNdx, GL_ONE, GL_ZERO); in resetStateES()
344 gl.blendEquationi (drawBufferNdx, GL_FUNC_ADD); in resetStateES()
345 gl.colorMaski (drawBufferNdx, GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); in resetStateES()
348 GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to reset indexed draw buffer state"); in resetStateES()
355 gl.disable (GL_SCISSOR_TEST); in resetStateES()
356 gl.scissor (0, 0, renderTarget.getWidth(), renderTarget.getHeight()); in resetStateES()
358 gl.disable (GL_STENCIL_TEST); in resetStateES()
359 gl.stencilFunc (GL_ALWAYS, 0, ~0u); in resetStateES()
360 gl.stencilOp (GL_KEEP, GL_KEEP, GL_KEEP); in resetStateES()
362 gl.disable (GL_DEPTH_TEST); in resetStateES()
363 gl.depthFunc (GL_LESS); in resetStateES()
365 gl.disable (GL_BLEND); in resetStateES()
366 gl.blendFunc (GL_ONE, GL_ZERO); in resetStateES()
367 gl.blendEquation(GL_FUNC_ADD); in resetStateES()
368 gl.blendColor (0.0f, 0.0f, 0.0f, 0.0f); in resetStateES()
370 gl.enable (GL_DITHER); in resetStateES()
374 gl.enable (GL_FRAMEBUFFER_SRGB); in resetStateES()
377 GLU_EXPECT_NO_ERROR(gl.getError(), "Pixel operation state reset failed"); in resetStateES()
382 gl.colorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); in resetStateES()
383 gl.depthMask (GL_TRUE); in resetStateES()
384 gl.stencilMask (~0u); in resetStateES()
386 gl.clearColor (0.0f, 0.0f, 0.0f, 0.0f); in resetStateES()
387 gl.clearDepthf (1.0f); in resetStateES()
388 gl.clearStencil (0); in resetStateES()
390 GLU_EXPECT_NO_ERROR(gl.getError(), "Framebuffer control state reset failed"); in resetStateES()
400 gl.bindFramebuffer(GL_FRAMEBUFFER, defaultFbo); in resetStateES()
404 gl.drawBuffers (1, &drawBuffer); in resetStateES()
405 gl.readBuffer (readBuffer); in resetStateES()
410 gl.framebufferParameteri(GL_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_WIDTH, 0); in resetStateES()
411 gl.framebufferParameteri(GL_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_HEIGHT, 0); in resetStateES()
412 gl.framebufferParameteri(GL_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_SAMPLES, 0); in resetStateES()
413 … gl.framebufferParameteri(GL_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS, GL_FALSE); in resetStateES()
414 GLU_EXPECT_NO_ERROR(gl.getError(), "Framebuffer default state reset failed"); in resetStateES()
417 GLU_EXPECT_NO_ERROR(gl.getError(), "Framebuffer state reset failed"); in resetStateES()
422 gl.bindRenderbuffer(GL_RENDERBUFFER, 0); in resetStateES()
423 GLU_EXPECT_NO_ERROR(gl.getError(), "Renderbuffer state reset failed"); in resetStateES()
428 gl.pixelStorei(GL_UNPACK_ALIGNMENT, 4); in resetStateES()
429 gl.pixelStorei(GL_PACK_ALIGNMENT, 4); in resetStateES()
433 gl.pixelStorei(GL_UNPACK_IMAGE_HEIGHT, 0); in resetStateES()
434 gl.pixelStorei(GL_UNPACK_SKIP_IMAGES, 0); in resetStateES()
435 gl.pixelStorei(GL_UNPACK_ROW_LENGTH, 0); in resetStateES()
436 gl.pixelStorei(GL_UNPACK_SKIP_ROWS, 0); in resetStateES()
437 gl.pixelStorei(GL_UNPACK_SKIP_PIXELS, 0); in resetStateES()
439 gl.pixelStorei(GL_PACK_ROW_LENGTH, 0); in resetStateES()
440 gl.pixelStorei(GL_PACK_SKIP_ROWS, 0); in resetStateES()
441 gl.pixelStorei(GL_PACK_SKIP_PIXELS, 0); in resetStateES()
443 gl.bindBuffer(GL_PIXEL_PACK_BUFFER, 0); in resetStateES()
444 gl.bindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); in resetStateES()
447 GLU_EXPECT_NO_ERROR(gl.getError(), "Pixel transfer state reset failed"); in resetStateES()
452 gl.useProgram(0); in resetStateES()
457 gl.getIntegerv (GL_MAX_UNIFORM_BUFFER_BINDINGS, &maxUniformBufferBindings); in resetStateES()
458 gl.bindBuffer (GL_UNIFORM_BUFFER, 0); in resetStateES()
461 gl.bindBufferBase(GL_UNIFORM_BUFFER, ndx, 0); in resetStateES()
466 gl.bindProgramPipeline(0); in resetStateES()
470 gl.getIntegerv (GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS, &maxAtomicCounterBufferBindings); in resetStateES()
471 gl.bindBuffer (GL_ATOMIC_COUNTER_BUFFER, 0); in resetStateES()
474 gl.bindBufferBase(GL_ATOMIC_COUNTER_BUFFER, ndx, 0); in resetStateES()
479 gl.getIntegerv (GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS, &maxShaderStorageBufferBindings); in resetStateES()
480 gl.bindBuffer (GL_SHADER_STORAGE_BUFFER, 0); in resetStateES()
483 gl.bindBufferBase(GL_SHADER_STORAGE_BUFFER, ndx, 0); in resetStateES()
487 GLU_EXPECT_NO_ERROR(gl.getError(), "Program object state reset failed"); in resetStateES()
493 gl.getIntegerv(GL_MAX_VERTEX_ATTRIBS, &numVertexAttribArrays); in resetStateES()
496 gl.vertexAttrib4f(ndx, 0.0f, 0.0f, 0.0f, 1.0f); in resetStateES()
498 GLU_EXPECT_NO_ERROR(gl.getError(), "Vertex shader state reset failed"); in resetStateES()
506 gl.getIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, &numTransformFeedbackSeparateAttribs); in resetStateES()
507 gl.getBooleanv(GL_TRANSFORM_FEEDBACK_ACTIVE, &transformFeedbackActive); in resetStateES()
510 gl.endTransformFeedback(); in resetStateES()
512 gl.bindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, 0); in resetStateES()
515 gl.bindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, ndx, 0); in resetStateES()
517 GLU_EXPECT_NO_ERROR(gl.getError(), "Transform feedback state reset failed"); in resetStateES()
528 gl.getQueryiv(targets[i], GL_CURRENT_QUERY, &queryActive); in resetStateES()
531 gl.endQuery(targets[i]); in resetStateES()
534 GLU_EXPECT_NO_ERROR(gl.getError(), "Asynchronous query state reset failed"); in resetStateES()
539 gl.hint(GL_GENERATE_MIPMAP_HINT, GL_DONT_CARE); in resetStateES()
542 gl.hint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT, GL_DONT_CARE); in resetStateES()
544 GLU_EXPECT_NO_ERROR(gl.getError(), "Hints reset failed"); in resetStateES()
550 gl.bindBuffer(GL_DISPATCH_INDIRECT_BUFFER, 0); in resetStateES()
551 GLU_EXPECT_NO_ERROR(gl.getError(), "Compute dispatch state reset failed"); in resetStateES()
557 gl.bindBuffer(GL_COPY_READ_BUFFER, 0); in resetStateES()
558 gl.bindBuffer(GL_COPY_WRITE_BUFFER, 0); in resetStateES()
560 GLU_EXPECT_NO_ERROR(gl.getError(), "Buffer copy state reset failed"); in resetStateES()
567 gl.getIntegerv(GL_MAX_IMAGE_UNITS, &numImageUnits); in resetStateES()
570 gl.bindImageTexture(ndx, 0, 0, GL_FALSE, 0, GL_READ_ONLY, GL_R32UI); in resetStateES()
572 GLU_EXPECT_NO_ERROR(gl.getError(), "Image state reset failed"); in resetStateES()
578 gl.minSampleShading(0.0f); in resetStateES()
579 gl.disable(GL_SAMPLE_SHADING); in resetStateES()
581 GLU_EXPECT_NO_ERROR(gl.getError(), "Sample shading state reset failed"); in resetStateES()
587 const bool entrypointsPresent = gl.debugMessageControl != DE_NULL && in resetStateES()
588 gl.debugMessageCallback != DE_NULL && in resetStateES()
589 gl.popDebugGroup != DE_NULL; in resetStateES()
595 gl.getIntegerv(GL_DEBUG_GROUP_STACK_DEPTH, &stackDepth); in resetStateES()
597 gl.popDebugGroup(); in resetStateES()
599 gl.debugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, DE_NULL, true); in resetStateES()
600 gl.debugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW, 0, DE_NULL, false); in resetStateES()
601 gl.debugMessageCallback(DE_NULL, DE_NULL); in resetStateES()
604 gl.enable(GL_DEBUG_OUTPUT); in resetStateES()
606 gl.disable(GL_DEBUG_OUTPUT); in resetStateES()
607 gl.disable(GL_DEBUG_OUTPUT_SYNCHRONOUS); in resetStateES()
609 GLU_EXPECT_NO_ERROR(gl.getError(), "Debug state reset failed"); in resetStateES()
616 gl.primitiveBoundingBox(-1.0f, -1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); in resetStateES()
617 GLU_EXPECT_NO_ERROR(gl.getError(), "Primitive bounding box state reset failed"); in resetStateES()
623 gl.patchParameteri(GL_PATCH_VERTICES, 3); in resetStateES()
624 GLU_EXPECT_NO_ERROR(gl.getError(), "Tessellation patch vertices state reset failed"); in resetStateES()
630 gl.enable(GL_BLEND_ADVANCED_COHERENT_KHR); in resetStateES()
631 GLU_EXPECT_NO_ERROR(gl.getError(), "Blend equation advanced coherent state reset failed"); in resetStateES()
637 gl.bindTexture(GL_TEXTURE_BUFFER, 0); in resetStateES()
638 gl.bindBuffer(GL_TEXTURE_BUFFER, 0); in resetStateES()
639 GLU_EXPECT_NO_ERROR(gl.getError(), "Texture buffer state reset failed"); in resetStateES()
645 const glw::Functions& gl = renderCtx.getFunctions(); in resetStateGLCore() local
649 resetErrors(gl); in resetStateGLCore()
656 gl.patchParameteri(GL_PATCH_VERTICES_EXT, 3); in resetStateGLCore()
657 gl.patchParameterfv(GL_PATCH_DEFAULT_INNER_LEVEL, defaultTessLevels); in resetStateGLCore()
658 gl.patchParameterfv(GL_PATCH_DEFAULT_OUTER_LEVEL, defaultTessLevels); in resetStateGLCore()
661 GLU_EXPECT_NO_ERROR(gl.getError(), "Primitives and vertices state reset failed"); in resetStateGLCore()
666 gl.bindVertexArray (0); in resetStateGLCore()
667 gl.bindBuffer (GL_ARRAY_BUFFER, 0); in resetStateGLCore()
668 gl.bindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0); in resetStateGLCore()
672 gl.disable (GL_PRIMITIVE_RESTART); in resetStateGLCore()
673 gl.primitiveRestartIndex(0); in resetStateGLCore()
676 GLU_EXPECT_NO_ERROR(gl.getError(), "Vertex attrib array state reset failed"); in resetStateGLCore()
684 gl.getIntegerv(GL_MAX_CLIP_DISTANCES, &numUserClipPlanes); in resetStateGLCore()
686 gl.viewport (0, 0, renderTarget.getWidth(), renderTarget.getHeight()); in resetStateGLCore()
687 gl.depthRange (0.0, 1.0); in resetStateGLCore()
690 gl.disable(GL_CLIP_DISTANCE0+ndx); in resetStateGLCore()
693 gl.disable(GL_DEPTH_CLAMP); in resetStateGLCore()
697 GLU_EXPECT_NO_ERROR(gl.getError(), "Transformation state reset failed"); in resetStateGLCore()
702 gl.clampColor(GL_CLAMP_READ_COLOR, GL_FIXED_ONLY); in resetStateGLCore()
705 gl.provokingVertex(GL_LAST_VERTEX_CONVENTION); in resetStateGLCore()
707 GLU_EXPECT_NO_ERROR(gl.getError(), "Coloring state reset failed"); in resetStateGLCore()
712 gl.disable (GL_RASTERIZER_DISCARD); in resetStateGLCore()
713 gl.pointSize (1.0f); in resetStateGLCore()
714 gl.pointParameterf (GL_POINT_FADE_THRESHOLD_SIZE, 1.0f); in resetStateGLCore()
715 gl.pointParameteri (GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT); in resetStateGLCore()
716 gl.lineWidth (1.0f); in resetStateGLCore()
717 gl.disable (GL_LINE_SMOOTH); in resetStateGLCore()
718 gl.disable (GL_CULL_FACE); in resetStateGLCore()
719 gl.cullFace (GL_BACK); in resetStateGLCore()
720 gl.frontFace (GL_CCW); in resetStateGLCore()
721 gl.disable (GL_POLYGON_SMOOTH); in resetStateGLCore()
722 gl.polygonOffset (0.0f, 0.0f); in resetStateGLCore()
723 gl.disable (GL_POLYGON_OFFSET_POINT); in resetStateGLCore()
724 gl.disable (GL_POLYGON_OFFSET_LINE); in resetStateGLCore()
725 gl.disable (GL_POLYGON_OFFSET_FILL); in resetStateGLCore()
727 GLU_EXPECT_NO_ERROR(gl.getError(), "Rasterization state reset failed"); in resetStateGLCore()
732 gl.enable (GL_MULTISAMPLE); in resetStateGLCore()
733 gl.disable (GL_SAMPLE_ALPHA_TO_COVERAGE); in resetStateGLCore()
734 gl.disable (GL_SAMPLE_ALPHA_TO_ONE); in resetStateGLCore()
735 gl.disable (GL_SAMPLE_COVERAGE); in resetStateGLCore()
736 gl.sampleCoverage (1.0f, GL_FALSE); in resetStateGLCore()
741 gl.getIntegerv(GL_MAX_SAMPLE_MASK_WORDS, &numSampleMaskWords); in resetStateGLCore()
743 gl.disable(GL_SAMPLE_MASK); in resetStateGLCore()
746 gl.sampleMaski(ndx, ~0u); in resetStateGLCore()
749 GLU_EXPECT_NO_ERROR(gl.getError(), "Multisampling state reset failed"); in resetStateGLCore()
757 gl.getIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &numTexUnits); in resetStateGLCore()
759 gl.bindBuffer(GL_TEXTURE_BUFFER, 0); in resetStateGLCore()
763 gl.activeTexture(GL_TEXTURE0 + ndx); in resetStateGLCore()
766 gl.bindTexture (GL_TEXTURE_1D, 0); in resetStateGLCore()
767 gl.texImage1D (GL_TEXTURE_1D, 0, GL_RGBA, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateGLCore()
768 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); in resetStateGLCore()
769 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
770 gl.texParameterfv (GL_TEXTURE_1D, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
771 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateGLCore()
772 gl.texParameterf (GL_TEXTURE_1D, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateGLCore()
773 gl.texParameterf (GL_TEXTURE_1D, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateGLCore()
774 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
775 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
776 gl.texParameterf (GL_TEXTURE_1D, GL_TEXTURE_LOD_BIAS, 0.0f); in resetStateGLCore()
777 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
778 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
782 gl.texParameteri(GL_TEXTURE_1D, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
783 gl.texParameteri(GL_TEXTURE_1D, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
784 gl.texParameteri(GL_TEXTURE_1D, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
785 gl.texParameteri(GL_TEXTURE_1D, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
789 gl.bindTexture (GL_TEXTURE_2D, 0); in resetStateGLCore()
790 gl.texImage2D (GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateGLCore()
791 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); in resetStateGLCore()
792 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
793 gl.texParameterfv (GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
794 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateGLCore()
795 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateGLCore()
796 gl.texParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateGLCore()
797 gl.texParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateGLCore()
798 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
799 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
800 gl.texParameterf (GL_TEXTURE_2D, GL_TEXTURE_LOD_BIAS, 0.0f); in resetStateGLCore()
801 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
802 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
806 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
807 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
808 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
809 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
813 gl.bindTexture (GL_TEXTURE_CUBE_MAP, 0); in resetStateGLCore()
814 …gl.texImage2D (GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE… in resetStateGLCore()
815 …gl.texImage2D (GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE… in resetStateGLCore()
816 …gl.texImage2D (GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE… in resetStateGLCore()
817 …gl.texImage2D (GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE… in resetStateGLCore()
818 …gl.texImage2D (GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE… in resetStateGLCore()
819 …gl.texImage2D (GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE… in resetStateGLCore()
820 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); in resetStateGLCore()
821 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
822 gl.texParameterfv (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
823 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateGLCore()
824 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateGLCore()
825 gl.texParameterf (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateGLCore()
826 gl.texParameterf (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateGLCore()
827 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
828 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
829 gl.texParameterf (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_LOD_BIAS, 0.0f); in resetStateGLCore()
830 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
831 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
835 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
836 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
837 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
838 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
842 gl.bindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, 0); in resetStateGLCore()
843 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR); in resetStateGLCore()
844 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
845 gl.texParameterfv(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
846 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateGLCore()
847 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateGLCore()
848 gl.texParameterf(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateGLCore()
849 gl.texParameterf(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateGLCore()
850 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
851 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
852 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
853 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
857 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
858 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
859 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
860 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
864 gl.bindTexture (GL_TEXTURE_1D_ARRAY, 0); in resetStateGLCore()
865 gl.texImage2D (GL_TEXTURE_1D_ARRAY, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateGLCore()
866 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); in resetStateGLCore()
867 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
868 gl.texParameterfv (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
869 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateGLCore()
870 gl.texParameterf (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateGLCore()
871 gl.texParameterf (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateGLCore()
872 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
873 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
874 gl.texParameterf (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_LOD_BIAS, 0.0f); in resetStateGLCore()
875 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
876 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
880 gl.texParameteri(GL_TEXTURE_1D_ARRAY, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
881 gl.texParameteri(GL_TEXTURE_1D_ARRAY, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
882 gl.texParameteri(GL_TEXTURE_1D_ARRAY, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
883 gl.texParameteri(GL_TEXTURE_1D_ARRAY, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
887 gl.bindTexture (GL_TEXTURE_2D_ARRAY, 0); in resetStateGLCore()
888 gl.texImage3D (GL_TEXTURE_2D_ARRAY, 0, GL_RGBA, 0, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateGLCore()
889 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); in resetStateGLCore()
890 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
891 gl.texParameterfv (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
892 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateGLCore()
893 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateGLCore()
894 gl.texParameterf (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateGLCore()
895 gl.texParameterf (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateGLCore()
896 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
897 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
898 gl.texParameterf (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_LOD_BIAS, 0.0f); in resetStateGLCore()
899 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
900 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
904 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
905 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
906 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
907 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
911 gl.bindTexture (GL_TEXTURE_3D, 0); in resetStateGLCore()
912 gl.texImage3D (GL_TEXTURE_3D, 0, GL_RGBA, 0, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateGLCore()
913 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); in resetStateGLCore()
914 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
915 gl.texParameterfv (GL_TEXTURE_3D, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
916 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateGLCore()
917 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateGLCore()
918 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT); in resetStateGLCore()
919 gl.texParameterf (GL_TEXTURE_3D, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateGLCore()
920 gl.texParameterf (GL_TEXTURE_3D, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateGLCore()
921 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
922 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
923 gl.texParameterf (GL_TEXTURE_3D, GL_TEXTURE_LOD_BIAS, 0.0f); in resetStateGLCore()
924 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
925 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
929 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
930 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
931 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
932 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
938 gl.bindTexture (GL_TEXTURE_RECTANGLE, 0); in resetStateGLCore()
939 gl.texImage2D (GL_TEXTURE_RECTANGLE, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateGLCore()
940 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_MIN_FILTER, GL_LINEAR); in resetStateGLCore()
941 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
942 gl.texParameterfv (GL_TEXTURE_RECTANGLE, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
943 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); in resetStateGLCore()
944 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); in resetStateGLCore()
945 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
946 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
947 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
948 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
953 gl.texParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
954 gl.texParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
955 gl.texParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
956 gl.texParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
960 gl.bindTexture (GL_TEXTURE_BUFFER, 0); in resetStateGLCore()
961 gl.texBuffer (GL_TEXTURE_BUFFER, GL_R8, 0); in resetStateGLCore()
968 gl.bindTexture (GL_TEXTURE_2D_MULTISAMPLE, 0); in resetStateGLCore()
969 gl.texParameteri (GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
970 gl.texParameteri (GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
971 gl.texParameteri (GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
972 gl.texParameteri (GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
973 gl.texParameteri (GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
974 gl.texParameteri (GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
975 gl.texImage2DMultisample (GL_TEXTURE_2D_MULTISAMPLE, 1, GL_RGBA8, 0, 0, GL_TRUE); in resetStateGLCore()
978 gl.bindTexture (GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 0); in resetStateGLCore()
979 gl.texParameteri (GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
980 gl.texParameteri (GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
981 gl.texParameteri (GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
982 gl.texParameteri (GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
983 gl.texParameteri (GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
984 gl.texParameteri (GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
985 gl.texImage3DMultisample (GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 1, GL_RGBA8, 0, 0, 0, GL_TRUE); in resetStateGLCore()
989 gl.activeTexture(GL_TEXTURE0); in resetStateGLCore()
994 gl.bindSampler(ndx, 0); in resetStateGLCore()
996 gl.disable(GL_TEXTURE_CUBE_MAP_SEAMLESS); in resetStateGLCore()
999 GLU_EXPECT_NO_ERROR(gl.getError(), "Texture state reset failed"); in resetStateGLCore()
1006 gl.disable (GL_SCISSOR_TEST); in resetStateGLCore()
1007 gl.scissor (0, 0, renderTarget.getWidth(), renderTarget.getHeight()); in resetStateGLCore()
1009 gl.disable (GL_STENCIL_TEST); in resetStateGLCore()
1010 gl.stencilFunc (GL_ALWAYS, 0, ~0u); in resetStateGLCore()
1011 gl.stencilOp (GL_KEEP, GL_KEEP, GL_KEEP); in resetStateGLCore()
1013 gl.disable (GL_DEPTH_TEST); in resetStateGLCore()
1014 gl.depthFunc (GL_LESS); in resetStateGLCore()
1016 gl.disable (GL_BLEND); in resetStateGLCore()
1017 gl.blendFunc (GL_ONE, GL_ZERO); in resetStateGLCore()
1018 gl.blendEquation(GL_FUNC_ADD); in resetStateGLCore()
1019 gl.blendColor (0.0f, 0.0f, 0.0f, 0.0f); in resetStateGLCore()
1021 gl.disable (GL_FRAMEBUFFER_SRGB); in resetStateGLCore()
1022 gl.enable (GL_DITHER); in resetStateGLCore()
1024 gl.disable (GL_COLOR_LOGIC_OP); in resetStateGLCore()
1025 gl.logicOp (GL_COPY); in resetStateGLCore()
1027 GLU_EXPECT_NO_ERROR(gl.getError(), "Pixel operation state reset failed"); in resetStateGLCore()
1032 gl.colorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); in resetStateGLCore()
1033 gl.depthMask (GL_TRUE); in resetStateGLCore()
1034 gl.stencilMask (~0u); in resetStateGLCore()
1036 gl.clearColor (0.0f, 0.0f, 0.0f, 0.0f); in resetStateGLCore()
1037 gl.clearDepth (1.0); in resetStateGLCore()
1038 gl.clearStencil (0); in resetStateGLCore()
1040 GLU_EXPECT_NO_ERROR(gl.getError(), "Framebuffer control state reset failed"); in resetStateGLCore()
1047 gl.bindFramebuffer(GL_FRAMEBUFFER, framebuffer); in resetStateGLCore()
1051 gl.drawBuffer(GL_BACK); in resetStateGLCore()
1052 gl.readBuffer(GL_BACK); in resetStateGLCore()
1058 if (gl.getError() != GL_NO_ERROR) in resetStateGLCore()
1060 gl.drawBuffer(GL_FRONT); in resetStateGLCore()
1061 gl.readBuffer(GL_FRONT); in resetStateGLCore()
1066 gl.drawBuffer(GL_COLOR_ATTACHMENT0); in resetStateGLCore()
1067 gl.readBuffer(GL_COLOR_ATTACHMENT0); in resetStateGLCore()
1070 GLU_EXPECT_NO_ERROR(gl.getError(), "Framebuffer state reset failed"); in resetStateGLCore()
1075 gl.bindRenderbuffer(GL_RENDERBUFFER, 0); in resetStateGLCore()
1076 GLU_EXPECT_NO_ERROR(gl.getError(), "Renderbuffer state reset failed"); in resetStateGLCore()
1081 gl.pixelStorei (GL_UNPACK_SWAP_BYTES, GL_FALSE); in resetStateGLCore()
1082 gl.pixelStorei (GL_UNPACK_LSB_FIRST, GL_FALSE); in resetStateGLCore()
1083 gl.pixelStorei (GL_UNPACK_IMAGE_HEIGHT, 0); in resetStateGLCore()
1084 gl.pixelStorei (GL_UNPACK_SKIP_IMAGES, 0); in resetStateGLCore()
1085 gl.pixelStorei (GL_UNPACK_ROW_LENGTH, 0); in resetStateGLCore()
1086 gl.pixelStorei (GL_UNPACK_SKIP_ROWS, 0); in resetStateGLCore()
1087 gl.pixelStorei (GL_UNPACK_SKIP_PIXELS, 0); in resetStateGLCore()
1088 gl.pixelStorei (GL_UNPACK_ALIGNMENT, 4); in resetStateGLCore()
1090 gl.pixelStorei (GL_PACK_SWAP_BYTES, GL_FALSE); in resetStateGLCore()
1091 gl.pixelStorei (GL_PACK_LSB_FIRST, GL_FALSE); in resetStateGLCore()
1092 gl.pixelStorei (GL_PACK_IMAGE_HEIGHT, 0); in resetStateGLCore()
1093 gl.pixelStorei (GL_PACK_SKIP_IMAGES, 0); in resetStateGLCore()
1094 gl.pixelStorei (GL_PACK_ROW_LENGTH, 0); in resetStateGLCore()
1095 gl.pixelStorei (GL_PACK_SKIP_ROWS, 0); in resetStateGLCore()
1096 gl.pixelStorei (GL_PACK_SKIP_PIXELS, 0); in resetStateGLCore()
1097 gl.pixelStorei (GL_PACK_ALIGNMENT, 4); in resetStateGLCore()
1099 gl.bindBuffer (GL_PIXEL_PACK_BUFFER, 0); in resetStateGLCore()
1100 gl.bindBuffer (GL_PIXEL_UNPACK_BUFFER, 0); in resetStateGLCore()
1102 GLU_EXPECT_NO_ERROR(gl.getError(), "Pixel transfer state reset failed"); in resetStateGLCore()
1107 gl.useProgram(0); in resetStateGLCore()
1112 gl.getIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &maxUniformBufferBindings); in resetStateGLCore()
1114 gl.bindBuffer(GL_UNIFORM_BUFFER, 0); in resetStateGLCore()
1117 gl.bindBufferBase(GL_UNIFORM_BUFFER, ndx, 0); in resetStateGLCore()
1120 GLU_EXPECT_NO_ERROR(gl.getError(), "Program object state reset failed"); in resetStateGLCore()
1126 gl.getIntegerv(GL_MAX_VERTEX_ATTRIBS, &numVertexAttribArrays); in resetStateGLCore()
1129 gl.vertexAttrib4f(ndx, 0.0f, 0.0f, 0.0f, 1.0f); in resetStateGLCore()
1131 gl.disable(GL_VERTEX_PROGRAM_POINT_SIZE); in resetStateGLCore()
1133 GLU_EXPECT_NO_ERROR(gl.getError(), "Vertex shader state reset failed"); in resetStateGLCore()
1139 gl.getIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, &numTransformFeedbackSeparateAttribs); in resetStateGLCore()
1144 gl.getBooleanv(GL_TRANSFORM_FEEDBACK_ACTIVE, &transformFeedbackActive); in resetStateGLCore()
1147 gl.endTransformFeedback(); in resetStateGLCore()
1150 gl.bindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, 0); in resetStateGLCore()
1153 gl.bindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, ndx, 0); in resetStateGLCore()
1155 GLU_EXPECT_NO_ERROR(gl.getError(), "Transform feedback state reset failed"); in resetStateGLCore()
1172 gl.getQueryiv(queryTargets[i], GL_CURRENT_QUERY, &queryActive); in resetStateGLCore()
1175 gl.endQuery(queryTargets[i]); in resetStateGLCore()
1178 GLU_EXPECT_NO_ERROR(gl.getError(), "Asynchronous query state reset failed"); in resetStateGLCore()
1183 gl.hint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE); in resetStateGLCore()
1184 gl.hint(GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE); in resetStateGLCore()
1185 gl.hint(GL_TEXTURE_COMPRESSION_HINT, GL_DONT_CARE); in resetStateGLCore()
1186 gl.hint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT, GL_DONT_CARE); in resetStateGLCore()
1188 GLU_EXPECT_NO_ERROR(gl.getError(), "Hints reset failed"); in resetStateGLCore()
1194 gl.bindBuffer(GL_COPY_READ_BUFFER, 0); in resetStateGLCore()
1195 gl.bindBuffer(GL_COPY_WRITE_BUFFER, 0); in resetStateGLCore()
1197 GLU_EXPECT_NO_ERROR(gl.getError(), "Buffer copy state reset failed"); in resetStateGLCore()
1204 gl.getIntegerv(GL_MAX_IMAGE_UNITS, &numImageUnits); in resetStateGLCore()
1207 gl.bindImageTexture(ndx, 0, 0, GL_FALSE, 0, GL_READ_ONLY, GL_R8); in resetStateGLCore()
1209 GLU_EXPECT_NO_ERROR(gl.getError(), "Image state reset failed"); in resetStateGLCore()
1215 gl.minSampleShading(0.0f); in resetStateGLCore()
1216 gl.disable(GL_SAMPLE_SHADING); in resetStateGLCore()
1218 GLU_EXPECT_NO_ERROR(gl.getError(), "Sample shading state reset failed"); in resetStateGLCore()
1224 const bool entrypointsPresent = gl.debugMessageControl != DE_NULL && in resetStateGLCore()
1225 gl.debugMessageCallback != DE_NULL; in resetStateGLCore()
1230 gl.debugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, DE_NULL, true); in resetStateGLCore()
1231 gl.debugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW, 0, DE_NULL, false); in resetStateGLCore()
1232 gl.debugMessageCallback(DE_NULL, DE_NULL); in resetStateGLCore()
1235 gl.enable(GL_DEBUG_OUTPUT); in resetStateGLCore()
1237 gl.disable(GL_DEBUG_OUTPUT); in resetStateGLCore()