Lines Matching refs:gl
37 const glw::Functions& gl = renderCtx.getFunctions(); in resetStateES() local
44 gl.getError(); in resetStateES()
45 GLU_EXPECT_NO_ERROR(gl.getError(), "Error state"); in resetStateES()
50 gl.getIntegerv(GL_MAX_VERTEX_ATTRIBS, &numVertexAttribArrays); in resetStateES()
52 gl.bindBuffer (GL_ARRAY_BUFFER, 0); in resetStateES()
53 gl.bindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0); in resetStateES()
57 gl.bindVertexArray (0); in resetStateES()
58 gl.disable (GL_PRIMITIVE_RESTART_FIXED_INDEX); in resetStateES()
62 gl.bindBuffer(GL_DRAW_INDIRECT_BUFFER, 0); in resetStateES()
66 gl.disableVertexAttribArray (ndx); in resetStateES()
67 gl.vertexAttribPointer (ndx, 4, GL_FLOAT, GL_FALSE, 0, DE_NULL); in resetStateES()
70 gl.vertexAttribDivisor(ndx, 0); in resetStateES()
73 GLU_EXPECT_NO_ERROR(gl.getError(), "Vertex attrib array state reset failed"); in resetStateES()
80 gl.viewport (0, 0, renderTarget.getWidth(), renderTarget.getHeight()); in resetStateES()
81 gl.depthRangef (0.0f, 1.0f); in resetStateES()
84 gl.bindTransformFeedback(GL_TRANSFORM_FEEDBACK, 0); in resetStateES()
86 GLU_EXPECT_NO_ERROR(gl.getError(), "Transformation state reset failed"); in resetStateES()
91 gl.lineWidth (1.0f); in resetStateES()
92 gl.disable (GL_CULL_FACE); in resetStateES()
93 gl.cullFace (GL_BACK); in resetStateES()
94 gl.frontFace (GL_CCW); in resetStateES()
95 gl.polygonOffset(0.0f, 0.0f); in resetStateES()
96 gl.disable (GL_POLYGON_OFFSET_FILL); in resetStateES()
99 gl.disable(GL_RASTERIZER_DISCARD); in resetStateES()
101 GLU_EXPECT_NO_ERROR(gl.getError(), "Rasterization state reset failed"); in resetStateES()
106 gl.disable (GL_SAMPLE_ALPHA_TO_COVERAGE); in resetStateES()
107 gl.disable (GL_SAMPLE_COVERAGE); in resetStateES()
108 gl.sampleCoverage (1.0f, GL_FALSE); in resetStateES()
113 gl.getIntegerv(GL_MAX_SAMPLE_MASK_WORDS, &numSampleMaskWords); in resetStateES()
115 gl.disable(GL_SAMPLE_MASK); in resetStateES()
118 gl.sampleMaski(ndx, ~0u); in resetStateES()
121 GLU_EXPECT_NO_ERROR(gl.getError(), "Multisampling state reset failed"); in resetStateES()
129 gl.getIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &numTexUnits); in resetStateES()
133 gl.activeTexture(GL_TEXTURE0 + ndx); in resetStateES()
136 gl.bindTexture(GL_TEXTURE_2D, 0); in resetStateES()
137 gl.texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateES()
138 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR); in resetStateES()
139 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateES()
140 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateES()
141 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateES()
145 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
146 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
147 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
148 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
149 gl.texParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateES()
150 gl.texParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateES()
151 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
152 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
153 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateES()
154 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateES()
158 gl.texParameteri(GL_TEXTURE_2D, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_DEPTH_COMPONENT); in resetStateES()
161 gl.texParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateES()
164 gl.bindTexture(GL_TEXTURE_CUBE_MAP, 0); in resetStateES()
165 …gl.texImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_N… in resetStateES()
166 …gl.texImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_N… in resetStateES()
167 …gl.texImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_N… in resetStateES()
168 …gl.texImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_N… in resetStateES()
169 …gl.texImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_N… in resetStateES()
170 …gl.texImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_N… in resetStateES()
171 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR); in resetStateES()
172 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateES()
173 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateES()
174 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateES()
178 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
179 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
180 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
181 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
182 gl.texParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateES()
183 gl.texParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateES()
184 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
185 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
186 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateES()
187 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateES()
191 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_DEPTH_COMPONENT); in resetStateES()
194 gl.texParameterfv(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateES()
199 gl.bindTexture(GL_TEXTURE_2D_ARRAY, 0); in resetStateES()
200 gl.texImage3D(GL_TEXTURE_2D_ARRAY, 0, GL_RGBA, 0, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateES()
201 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR); in resetStateES()
202 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateES()
203 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateES()
204 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateES()
205 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
206 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
207 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
208 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
209 gl.texParameterf(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateES()
210 gl.texParameterf(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateES()
211 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
212 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
213 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateES()
214 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateES()
217 gl.texParameterfv(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateES()
221 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_DEPTH_COMPONENT); in resetStateES()
226 gl.bindTexture(GL_TEXTURE_3D, 0); in resetStateES()
227 gl.texImage3D(GL_TEXTURE_3D, 0, GL_RGBA, 0, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateES()
228 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR); in resetStateES()
229 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateES()
230 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateES()
231 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateES()
232 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT); in resetStateES()
233 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
234 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
235 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
236 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
237 gl.texParameterf(GL_TEXTURE_3D, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateES()
238 gl.texParameterf(GL_TEXTURE_3D, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateES()
239 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
240 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
241 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateES()
242 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateES()
245 gl.texParameterfv(GL_TEXTURE_3D, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateES()
249 gl.texParameteri(GL_TEXTURE_3D, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_DEPTH_COMPONENT); in resetStateES()
254 gl.bindTexture(GL_TEXTURE_2D_MULTISAMPLE, 0); in resetStateES()
255 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
256 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
257 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
258 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
259 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
260 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
265 gl.bindTexture(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 0); in resetStateES()
266 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
267 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
268 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
269 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
270 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
271 gl.texParameteri(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
277 gl.bindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, 0); in resetStateES()
278 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR); in resetStateES()
279 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateES()
280 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateES()
281 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateES()
282 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateES()
283 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateES()
284 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateES()
285 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateES()
286 gl.texParameterf(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateES()
287 gl.texParameterf(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateES()
288 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_BASE_LEVEL, 0); in resetStateES()
289 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateES()
290 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateES()
291 gl.texParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateES()
294 gl.texParameterfv(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateES()
298 gl.activeTexture(GL_TEXTURE0); in resetStateES()
303 gl.bindSampler(ndx, 0); in resetStateES()
306 GLU_EXPECT_NO_ERROR(gl.getError(), "Texture state reset failed"); in resetStateES()
316 gl.getIntegerv(GL_MAX_DRAW_BUFFERS, &numDrawBuffers); in resetStateES()
320 gl.disablei (GL_BLEND, drawBufferNdx); in resetStateES()
321 gl.blendFunci (drawBufferNdx, GL_ONE, GL_ZERO); in resetStateES()
322 gl.blendEquationi (drawBufferNdx, GL_FUNC_ADD); in resetStateES()
323 gl.colorMaski (drawBufferNdx, GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); in resetStateES()
326 GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to reset indexed draw buffer state"); in resetStateES()
333 gl.disable (GL_SCISSOR_TEST); in resetStateES()
334 gl.scissor (0, 0, renderTarget.getWidth(), renderTarget.getHeight()); in resetStateES()
336 gl.disable (GL_STENCIL_TEST); in resetStateES()
337 gl.stencilFunc (GL_ALWAYS, 0, ~0u); in resetStateES()
338 gl.stencilOp (GL_KEEP, GL_KEEP, GL_KEEP); in resetStateES()
340 gl.disable (GL_DEPTH_TEST); in resetStateES()
341 gl.depthFunc (GL_LESS); in resetStateES()
343 gl.disable (GL_BLEND); in resetStateES()
344 gl.blendFunc (GL_ONE, GL_ZERO); in resetStateES()
345 gl.blendEquation(GL_FUNC_ADD); in resetStateES()
346 gl.blendColor (0.0f, 0.0f, 0.0f, 0.0f); in resetStateES()
348 gl.enable (GL_DITHER); in resetStateES()
350 GLU_EXPECT_NO_ERROR(gl.getError(), "Pixel operation state reset failed"); in resetStateES()
355 gl.colorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); in resetStateES()
356 gl.depthMask (GL_TRUE); in resetStateES()
357 gl.stencilMask (~0u); in resetStateES()
359 gl.clearColor (0.0f, 0.0f, 0.0f, 0.0f); in resetStateES()
360 gl.clearDepthf (1.0f); in resetStateES()
361 gl.clearStencil (0); in resetStateES()
363 GLU_EXPECT_NO_ERROR(gl.getError(), "Framebuffer control state reset failed"); in resetStateES()
373 gl.bindFramebuffer(GL_FRAMEBUFFER, defaultFbo); in resetStateES()
377 gl.drawBuffers (1, &drawBuffer); in resetStateES()
378 gl.readBuffer (readBuffer); in resetStateES()
381 GLU_EXPECT_NO_ERROR(gl.getError(), "Framebuffer state reset failed"); in resetStateES()
386 gl.bindRenderbuffer(GL_RENDERBUFFER, 0); in resetStateES()
387 GLU_EXPECT_NO_ERROR(gl.getError(), "Renderbuffer state reset failed"); in resetStateES()
392 gl.pixelStorei(GL_UNPACK_ALIGNMENT, 4); in resetStateES()
393 gl.pixelStorei(GL_PACK_ALIGNMENT, 4); in resetStateES()
397 gl.pixelStorei(GL_UNPACK_IMAGE_HEIGHT, 0); in resetStateES()
398 gl.pixelStorei(GL_UNPACK_SKIP_IMAGES, 0); in resetStateES()
399 gl.pixelStorei(GL_UNPACK_ROW_LENGTH, 0); in resetStateES()
400 gl.pixelStorei(GL_UNPACK_SKIP_ROWS, 0); in resetStateES()
401 gl.pixelStorei(GL_UNPACK_SKIP_PIXELS, 0); in resetStateES()
403 gl.pixelStorei(GL_PACK_ROW_LENGTH, 0); in resetStateES()
404 gl.pixelStorei(GL_PACK_SKIP_ROWS, 0); in resetStateES()
405 gl.pixelStorei(GL_PACK_SKIP_PIXELS, 0); in resetStateES()
407 gl.bindBuffer(GL_PIXEL_PACK_BUFFER, 0); in resetStateES()
408 gl.bindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); in resetStateES()
411 GLU_EXPECT_NO_ERROR(gl.getError(), "Pixel transfer state reset failed"); in resetStateES()
416 gl.useProgram(0); in resetStateES()
421 gl.getIntegerv (GL_MAX_UNIFORM_BUFFER_BINDINGS, &maxUniformBufferBindings); in resetStateES()
422 gl.bindBuffer (GL_UNIFORM_BUFFER, 0); in resetStateES()
425 gl.bindBufferBase(GL_UNIFORM_BUFFER, ndx, 0); in resetStateES()
430 gl.bindProgramPipeline(0); in resetStateES()
434 gl.getIntegerv (GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS, &maxAtomicCounterBufferBindings); in resetStateES()
435 gl.bindBuffer (GL_ATOMIC_COUNTER_BUFFER, 0); in resetStateES()
438 gl.bindBufferBase(GL_ATOMIC_COUNTER_BUFFER, ndx, 0); in resetStateES()
443 gl.getIntegerv (GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS, &maxShaderStorageBufferBindings); in resetStateES()
444 gl.bindBuffer (GL_SHADER_STORAGE_BUFFER, 0); in resetStateES()
447 gl.bindBufferBase(GL_SHADER_STORAGE_BUFFER, ndx, 0); in resetStateES()
451 GLU_EXPECT_NO_ERROR(gl.getError(), "Program object state reset failed"); in resetStateES()
457 gl.getIntegerv(GL_MAX_VERTEX_ATTRIBS, &numVertexAttribArrays); in resetStateES()
460 gl.vertexAttrib4f(ndx, 0.0f, 0.0f, 0.0f, 1.0f); in resetStateES()
462 GLU_EXPECT_NO_ERROR(gl.getError(), "Vertex shader state reset failed"); in resetStateES()
470 gl.getIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, &numTransformFeedbackSeparateAttribs); in resetStateES()
471 gl.getBooleanv(GL_TRANSFORM_FEEDBACK_ACTIVE, &transformFeedbackActive); in resetStateES()
474 gl.endTransformFeedback(); in resetStateES()
476 gl.bindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, 0); in resetStateES()
479 gl.bindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, ndx, 0); in resetStateES()
481 GLU_EXPECT_NO_ERROR(gl.getError(), "Transform feedback state reset failed"); in resetStateES()
492 gl.getQueryiv(targets[i], GL_CURRENT_QUERY, &queryActive); in resetStateES()
495 gl.endQuery(targets[i]); in resetStateES()
498 GLU_EXPECT_NO_ERROR(gl.getError(), "Asynchronous query state reset failed"); in resetStateES()
503 gl.hint(GL_GENERATE_MIPMAP_HINT, GL_DONT_CARE); in resetStateES()
506 gl.hint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT, GL_DONT_CARE); in resetStateES()
508 GLU_EXPECT_NO_ERROR(gl.getError(), "Hints reset failed"); in resetStateES()
514 gl.bindBuffer(GL_DISPATCH_INDIRECT_BUFFER, 0); in resetStateES()
515 GLU_EXPECT_NO_ERROR(gl.getError(), "Compute dispatch state reset failed"); in resetStateES()
521 gl.bindBuffer(GL_COPY_READ_BUFFER, 0); in resetStateES()
522 gl.bindBuffer(GL_COPY_WRITE_BUFFER, 0); in resetStateES()
524 GLU_EXPECT_NO_ERROR(gl.getError(), "Buffer copy state reset failed"); in resetStateES()
531 gl.getIntegerv(GL_MAX_IMAGE_UNITS, &numImageUnits); in resetStateES()
534 gl.bindImageTexture(ndx, 0, 0, GL_FALSE, 0, GL_READ_ONLY, GL_R32UI); in resetStateES()
536 GLU_EXPECT_NO_ERROR(gl.getError(), "Image state reset failed"); in resetStateES()
542 gl.minSampleShading(0.0f); in resetStateES()
543 gl.disable(GL_SAMPLE_SHADING); in resetStateES()
545 GLU_EXPECT_NO_ERROR(gl.getError(), "Sample shading state reset failed"); in resetStateES()
551 const bool entrypointsPresent = gl.debugMessageControl != DE_NULL && in resetStateES()
552 gl.debugMessageCallback != DE_NULL && in resetStateES()
553 gl.popDebugGroup != DE_NULL; in resetStateES()
559 gl.getIntegerv(GL_DEBUG_GROUP_STACK_DEPTH, &stackDepth); in resetStateES()
561 gl.popDebugGroup(); in resetStateES()
563 gl.debugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, DE_NULL, true); in resetStateES()
564 gl.debugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW, 0, DE_NULL, false); in resetStateES()
565 gl.debugMessageCallback(DE_NULL, DE_NULL); in resetStateES()
568 gl.enable(GL_DEBUG_OUTPUT); in resetStateES()
570 gl.disable(GL_DEBUG_OUTPUT); in resetStateES()
571 gl.disable(GL_DEBUG_OUTPUT_SYNCHRONOUS); in resetStateES()
573 GLU_EXPECT_NO_ERROR(gl.getError(), "Debug state reset failed"); in resetStateES()
580 gl.primitiveBoundingBoxEXT(-1.0f, -1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); in resetStateES()
581 GLU_EXPECT_NO_ERROR(gl.getError(), "Primitive bounding box state reset failed"); in resetStateES()
587 gl.patchParameteri(GL_PATCH_VERTICES, 3); in resetStateES()
588 GLU_EXPECT_NO_ERROR(gl.getError(), "Tessellation patch vertices state reset failed"); in resetStateES()
594 gl.enable(GL_BLEND_ADVANCED_COHERENT_KHR); in resetStateES()
595 GLU_EXPECT_NO_ERROR(gl.getError(), "Blend equation advanced coherent state reset failed"); in resetStateES()
601 gl.bindTexture(GL_TEXTURE_BUFFER, 0); in resetStateES()
602 gl.bindBuffer(GL_TEXTURE_BUFFER, 0); in resetStateES()
603 GLU_EXPECT_NO_ERROR(gl.getError(), "Texture buffer state reset failed"); in resetStateES()
609 const glw::Functions& gl = renderCtx.getFunctions(); in resetStateGLCore() local
614 gl.getError(); in resetStateGLCore()
615 GLU_EXPECT_NO_ERROR(gl.getError(), "Error state"); in resetStateGLCore()
619 gl.bindVertexArray (0); in resetStateGLCore()
620 gl.bindBuffer (GL_ARRAY_BUFFER, 0); in resetStateGLCore()
621 gl.bindBuffer (GL_ELEMENT_ARRAY_BUFFER, 0); in resetStateGLCore()
625 gl.disable (GL_PRIMITIVE_RESTART); in resetStateGLCore()
626 gl.primitiveRestartIndex(0); in resetStateGLCore()
629 GLU_EXPECT_NO_ERROR(gl.getError(), "Vertex attrib array state reset failed"); in resetStateGLCore()
637 gl.getIntegerv(GL_MAX_CLIP_DISTANCES, &numUserClipPlanes); in resetStateGLCore()
639 gl.viewport (0, 0, renderTarget.getWidth(), renderTarget.getHeight()); in resetStateGLCore()
640 gl.depthRange (0.0, 1.0); in resetStateGLCore()
643 gl.disable(GL_CLIP_DISTANCE0+ndx); in resetStateGLCore()
646 gl.disable(GL_DEPTH_CLAMP); in resetStateGLCore()
650 GLU_EXPECT_NO_ERROR(gl.getError(), "Transformation state reset failed"); in resetStateGLCore()
655 gl.clampColor(GL_CLAMP_READ_COLOR, GL_FIXED_ONLY); in resetStateGLCore()
658 gl.provokingVertex(GL_LAST_VERTEX_CONVENTION); in resetStateGLCore()
660 GLU_EXPECT_NO_ERROR(gl.getError(), "Coloring state reset failed"); in resetStateGLCore()
665 gl.disable (GL_RASTERIZER_DISCARD); in resetStateGLCore()
666 gl.pointSize (1.0f); in resetStateGLCore()
667 gl.pointParameterf (GL_POINT_FADE_THRESHOLD_SIZE, 1.0f); in resetStateGLCore()
668 gl.pointParameteri (GL_POINT_SPRITE_COORD_ORIGIN, GL_UPPER_LEFT); in resetStateGLCore()
669 gl.lineWidth (1.0f); in resetStateGLCore()
670 gl.disable (GL_LINE_SMOOTH); in resetStateGLCore()
671 gl.disable (GL_CULL_FACE); in resetStateGLCore()
672 gl.cullFace (GL_BACK); in resetStateGLCore()
673 gl.frontFace (GL_CCW); in resetStateGLCore()
674 gl.disable (GL_POLYGON_SMOOTH); in resetStateGLCore()
675 gl.polygonOffset (0.0f, 0.0f); in resetStateGLCore()
676 gl.disable (GL_POLYGON_OFFSET_POINT); in resetStateGLCore()
677 gl.disable (GL_POLYGON_OFFSET_LINE); in resetStateGLCore()
678 gl.disable (GL_POLYGON_OFFSET_FILL); in resetStateGLCore()
680 GLU_EXPECT_NO_ERROR(gl.getError(), "Rasterization state reset failed"); in resetStateGLCore()
685 gl.enable (GL_MULTISAMPLE); in resetStateGLCore()
686 gl.disable (GL_SAMPLE_ALPHA_TO_COVERAGE); in resetStateGLCore()
687 gl.disable (GL_SAMPLE_ALPHA_TO_ONE); in resetStateGLCore()
688 gl.disable (GL_SAMPLE_COVERAGE); in resetStateGLCore()
689 gl.sampleCoverage (1.0f, GL_FALSE); in resetStateGLCore()
694 gl.getIntegerv(GL_MAX_SAMPLE_MASK_WORDS, &numSampleMaskWords); in resetStateGLCore()
696 gl.disable(GL_SAMPLE_MASK); in resetStateGLCore()
699 gl.sampleMaski(ndx, ~0u); in resetStateGLCore()
702 GLU_EXPECT_NO_ERROR(gl.getError(), "Multisampling state reset failed"); in resetStateGLCore()
710 gl.getIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &numTexUnits); in resetStateGLCore()
712 gl.bindBuffer(GL_TEXTURE_BUFFER, 0); in resetStateGLCore()
716 gl.activeTexture(GL_TEXTURE0 + ndx); in resetStateGLCore()
719 gl.bindTexture (GL_TEXTURE_1D, 0); in resetStateGLCore()
720 gl.texImage1D (GL_TEXTURE_1D, 0, GL_RGBA, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateGLCore()
721 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); in resetStateGLCore()
722 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
723 gl.texParameterfv (GL_TEXTURE_1D, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
724 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateGLCore()
725 gl.texParameterf (GL_TEXTURE_1D, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateGLCore()
726 gl.texParameterf (GL_TEXTURE_1D, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateGLCore()
727 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
728 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
729 gl.texParameterf (GL_TEXTURE_1D, GL_TEXTURE_LOD_BIAS, 0.0f); in resetStateGLCore()
730 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
731 gl.texParameteri (GL_TEXTURE_1D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
735 gl.texParameteri(GL_TEXTURE_1D, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
736 gl.texParameteri(GL_TEXTURE_1D, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
737 gl.texParameteri(GL_TEXTURE_1D, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
738 gl.texParameteri(GL_TEXTURE_1D, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
742 gl.bindTexture (GL_TEXTURE_2D, 0); in resetStateGLCore()
743 gl.texImage2D (GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateGLCore()
744 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); in resetStateGLCore()
745 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
746 gl.texParameterfv (GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
747 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateGLCore()
748 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateGLCore()
749 gl.texParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateGLCore()
750 gl.texParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateGLCore()
751 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
752 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
753 gl.texParameterf (GL_TEXTURE_2D, GL_TEXTURE_LOD_BIAS, 0.0f); in resetStateGLCore()
754 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
755 gl.texParameteri (GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
759 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
760 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
761 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
762 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
766 gl.bindTexture (GL_TEXTURE_CUBE_MAP, 0); in resetStateGLCore()
767 …gl.texImage2D (GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE… in resetStateGLCore()
768 …gl.texImage2D (GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE… in resetStateGLCore()
769 …gl.texImage2D (GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE… in resetStateGLCore()
770 …gl.texImage2D (GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE… in resetStateGLCore()
771 …gl.texImage2D (GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE… in resetStateGLCore()
772 …gl.texImage2D (GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE… in resetStateGLCore()
773 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); in resetStateGLCore()
774 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
775 gl.texParameterfv (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
776 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateGLCore()
777 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateGLCore()
778 gl.texParameterf (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateGLCore()
779 gl.texParameterf (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateGLCore()
780 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
781 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
782 gl.texParameterf (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_LOD_BIAS, 0.0f); in resetStateGLCore()
783 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
784 gl.texParameteri (GL_TEXTURE_CUBE_MAP, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
788 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
789 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
790 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
791 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
795 gl.bindTexture (GL_TEXTURE_1D_ARRAY, 0); in resetStateGLCore()
796 gl.texImage2D (GL_TEXTURE_1D_ARRAY, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateGLCore()
797 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); in resetStateGLCore()
798 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
799 gl.texParameterfv (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
800 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateGLCore()
801 gl.texParameterf (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateGLCore()
802 gl.texParameterf (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateGLCore()
803 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
804 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
805 gl.texParameterf (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_LOD_BIAS, 0.0f); in resetStateGLCore()
806 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
807 gl.texParameteri (GL_TEXTURE_1D_ARRAY, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
811 gl.texParameteri(GL_TEXTURE_1D_ARRAY, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
812 gl.texParameteri(GL_TEXTURE_1D_ARRAY, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
813 gl.texParameteri(GL_TEXTURE_1D_ARRAY, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
814 gl.texParameteri(GL_TEXTURE_1D_ARRAY, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
818 gl.bindTexture (GL_TEXTURE_2D_ARRAY, 0); in resetStateGLCore()
819 gl.texImage3D (GL_TEXTURE_2D_ARRAY, 0, GL_RGBA, 0, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateGLCore()
820 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); in resetStateGLCore()
821 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
822 gl.texParameterfv (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
823 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateGLCore()
824 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateGLCore()
825 gl.texParameterf (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateGLCore()
826 gl.texParameterf (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateGLCore()
827 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
828 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
829 gl.texParameterf (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_LOD_BIAS, 0.0f); in resetStateGLCore()
830 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
831 gl.texParameteri (GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
835 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
836 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
837 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
838 gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
842 gl.bindTexture (GL_TEXTURE_3D, 0); in resetStateGLCore()
843 gl.texImage3D (GL_TEXTURE_3D, 0, GL_RGBA, 0, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateGLCore()
844 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); in resetStateGLCore()
845 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
846 gl.texParameterfv (GL_TEXTURE_3D, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
847 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_REPEAT); in resetStateGLCore()
848 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_REPEAT); in resetStateGLCore()
849 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT); in resetStateGLCore()
850 gl.texParameterf (GL_TEXTURE_3D, GL_TEXTURE_MIN_LOD, -1000.0f); in resetStateGLCore()
851 gl.texParameterf (GL_TEXTURE_3D, GL_TEXTURE_MAX_LOD, 1000.0f); in resetStateGLCore()
852 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
853 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
854 gl.texParameterf (GL_TEXTURE_3D, GL_TEXTURE_LOD_BIAS, 0.0f); in resetStateGLCore()
855 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
856 gl.texParameteri (GL_TEXTURE_3D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
860 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
861 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
862 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
863 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
869 gl.bindTexture (GL_TEXTURE_RECTANGLE, 0); in resetStateGLCore()
870 gl.texImage2D (GL_TEXTURE_RECTANGLE, 0, GL_RGBA, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, DE_NULL); in resetStateGLCore()
871 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_MIN_FILTER, GL_LINEAR); in resetStateGLCore()
872 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_MAG_FILTER, GL_LINEAR); in resetStateGLCore()
873 gl.texParameterfv (GL_TEXTURE_RECTANGLE, GL_TEXTURE_BORDER_COLOR, &borderColor[0]); in resetStateGLCore()
874 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); in resetStateGLCore()
875 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); in resetStateGLCore()
876 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_BASE_LEVEL, 0); in resetStateGLCore()
877 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_MAX_LEVEL, 1000); in resetStateGLCore()
878 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_COMPARE_MODE, GL_NONE); in resetStateGLCore()
879 gl.texParameteri (GL_TEXTURE_RECTANGLE, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); in resetStateGLCore()
884 gl.texParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_SWIZZLE_R, GL_RED); in resetStateGLCore()
885 gl.texParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_SWIZZLE_G, GL_GREEN); in resetStateGLCore()
886 gl.texParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_SWIZZLE_B, GL_BLUE); in resetStateGLCore()
887 gl.texParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_SWIZZLE_A, GL_ALPHA); in resetStateGLCore()
891 gl.bindTexture (GL_TEXTURE_BUFFER, 0); in resetStateGLCore()
892 gl.texBuffer (GL_TEXTURE_BUFFER, GL_R8, 0); in resetStateGLCore()
899 gl.bindTexture (GL_TEXTURE_2D_MULTISAMPLE, 0); in resetStateGLCore()
900 gl.texImage2DMultisample (GL_TEXTURE_2D_MULTISAMPLE, 1, GL_RGBA8, 0, 0, GL_TRUE); in resetStateGLCore()
903 gl.bindTexture (GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 0); in resetStateGLCore()
904 gl.texImage3DMultisample (GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 1, GL_RGBA8, 0, 0, 0, GL_TRUE); in resetStateGLCore()
908 gl.activeTexture(GL_TEXTURE0); in resetStateGLCore()
913 gl.bindSampler(ndx, 0); in resetStateGLCore()
915 gl.disable(GL_TEXTURE_CUBE_MAP_SEAMLESS); in resetStateGLCore()
918 GLU_EXPECT_NO_ERROR(gl.getError(), "Texture state reset failed"); in resetStateGLCore()
925 gl.disable (GL_SCISSOR_TEST); in resetStateGLCore()
926 gl.scissor (0, 0, renderTarget.getWidth(), renderTarget.getHeight()); in resetStateGLCore()
928 gl.disable (GL_STENCIL_TEST); in resetStateGLCore()
929 gl.stencilFunc (GL_ALWAYS, 0, ~0u); in resetStateGLCore()
930 gl.stencilOp (GL_KEEP, GL_KEEP, GL_KEEP); in resetStateGLCore()
932 gl.disable (GL_DEPTH_TEST); in resetStateGLCore()
933 gl.depthFunc (GL_LESS); in resetStateGLCore()
935 gl.disable (GL_BLEND); in resetStateGLCore()
936 gl.blendFunc (GL_ONE, GL_ZERO); in resetStateGLCore()
937 gl.blendEquation(GL_FUNC_ADD); in resetStateGLCore()
938 gl.blendColor (0.0f, 0.0f, 0.0f, 0.0f); in resetStateGLCore()
940 gl.disable (GL_FRAMEBUFFER_SRGB); in resetStateGLCore()
941 gl.enable (GL_DITHER); in resetStateGLCore()
943 gl.disable (GL_COLOR_LOGIC_OP); in resetStateGLCore()
944 gl.logicOp (GL_COPY); in resetStateGLCore()
946 GLU_EXPECT_NO_ERROR(gl.getError(), "Pixel operation state reset failed"); in resetStateGLCore()
951 gl.colorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); in resetStateGLCore()
952 gl.depthMask (GL_TRUE); in resetStateGLCore()
953 gl.stencilMask (~0u); in resetStateGLCore()
955 gl.clearColor (0.0f, 0.0f, 0.0f, 0.0f); in resetStateGLCore()
956 gl.clearDepth (1.0); in resetStateGLCore()
957 gl.clearStencil (0); in resetStateGLCore()
959 GLU_EXPECT_NO_ERROR(gl.getError(), "Framebuffer control state reset failed"); in resetStateGLCore()
968 gl.bindFramebuffer (GL_FRAMEBUFFER, renderCtx.getDefaultFramebuffer()); in resetStateGLCore()
969 gl.drawBuffer (drawReadBuffer); in resetStateGLCore()
970 gl.readBuffer (drawReadBuffer); in resetStateGLCore()
972 GLU_EXPECT_NO_ERROR(gl.getError(), "Framebuffer state reset failed"); in resetStateGLCore()
977 gl.bindRenderbuffer(GL_RENDERBUFFER, 0); in resetStateGLCore()
978 GLU_EXPECT_NO_ERROR(gl.getError(), "Renderbuffer state reset failed"); in resetStateGLCore()
983 gl.pixelStorei (GL_UNPACK_SWAP_BYTES, GL_FALSE); in resetStateGLCore()
984 gl.pixelStorei (GL_UNPACK_LSB_FIRST, GL_FALSE); in resetStateGLCore()
985 gl.pixelStorei (GL_UNPACK_IMAGE_HEIGHT, 0); in resetStateGLCore()
986 gl.pixelStorei (GL_UNPACK_SKIP_IMAGES, 0); in resetStateGLCore()
987 gl.pixelStorei (GL_UNPACK_ROW_LENGTH, 0); in resetStateGLCore()
988 gl.pixelStorei (GL_UNPACK_SKIP_ROWS, 0); in resetStateGLCore()
989 gl.pixelStorei (GL_UNPACK_SKIP_PIXELS, 0); in resetStateGLCore()
990 gl.pixelStorei (GL_UNPACK_ALIGNMENT, 4); in resetStateGLCore()
992 gl.pixelStorei (GL_PACK_SWAP_BYTES, GL_FALSE); in resetStateGLCore()
993 gl.pixelStorei (GL_PACK_LSB_FIRST, GL_FALSE); in resetStateGLCore()
994 gl.pixelStorei (GL_PACK_IMAGE_HEIGHT, 0); in resetStateGLCore()
995 gl.pixelStorei (GL_PACK_SKIP_IMAGES, 0); in resetStateGLCore()
996 gl.pixelStorei (GL_PACK_ROW_LENGTH, 0); in resetStateGLCore()
997 gl.pixelStorei (GL_PACK_SKIP_ROWS, 0); in resetStateGLCore()
998 gl.pixelStorei (GL_PACK_SKIP_PIXELS, 0); in resetStateGLCore()
999 gl.pixelStorei (GL_PACK_ALIGNMENT, 4); in resetStateGLCore()
1001 gl.bindBuffer (GL_PIXEL_PACK_BUFFER, 0); in resetStateGLCore()
1002 gl.bindBuffer (GL_PIXEL_UNPACK_BUFFER, 0); in resetStateGLCore()
1004 GLU_EXPECT_NO_ERROR(gl.getError(), "Pixel transfer state reset failed"); in resetStateGLCore()
1009 gl.useProgram(0); in resetStateGLCore()
1014 gl.getIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &maxUniformBufferBindings); in resetStateGLCore()
1016 gl.bindBuffer(GL_UNIFORM_BUFFER, 0); in resetStateGLCore()
1019 gl.bindBufferBase(GL_UNIFORM_BUFFER, ndx, 0); in resetStateGLCore()
1022 GLU_EXPECT_NO_ERROR(gl.getError(), "Program object state reset failed"); in resetStateGLCore()
1028 gl.getIntegerv(GL_MAX_VERTEX_ATTRIBS, &numVertexAttribArrays); in resetStateGLCore()
1031 gl.vertexAttrib4f(ndx, 0.0f, 0.0f, 0.0f, 1.0f); in resetStateGLCore()
1033 gl.disable(GL_VERTEX_PROGRAM_POINT_SIZE); in resetStateGLCore()
1035 GLU_EXPECT_NO_ERROR(gl.getError(), "Vertex shader state reset failed"); in resetStateGLCore()
1041 gl.getIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, &numTransformFeedbackSeparateAttribs); in resetStateGLCore()
1046 gl.getBooleanv(GL_TRANSFORM_FEEDBACK_ACTIVE, &transformFeedbackActive); in resetStateGLCore()
1049 gl.endTransformFeedback(); in resetStateGLCore()
1052 gl.bindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, 0); in resetStateGLCore()
1055 gl.bindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, ndx, 0); in resetStateGLCore()
1057 GLU_EXPECT_NO_ERROR(gl.getError(), "Transform feedback state reset failed"); in resetStateGLCore()
1074 gl.getQueryiv(queryTargets[i], GL_CURRENT_QUERY, &queryActive); in resetStateGLCore()
1077 gl.endQuery(queryTargets[i]); in resetStateGLCore()
1080 GLU_EXPECT_NO_ERROR(gl.getError(), "Asynchronous query state reset failed"); in resetStateGLCore()
1085 gl.hint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE); in resetStateGLCore()
1086 gl.hint(GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE); in resetStateGLCore()
1087 gl.hint(GL_TEXTURE_COMPRESSION_HINT, GL_DONT_CARE); in resetStateGLCore()
1088 gl.hint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT, GL_DONT_CARE); in resetStateGLCore()
1090 GLU_EXPECT_NO_ERROR(gl.getError(), "Hints reset failed"); in resetStateGLCore()
1096 gl.bindBuffer(GL_COPY_READ_BUFFER, 0); in resetStateGLCore()
1097 gl.bindBuffer(GL_COPY_WRITE_BUFFER, 0); in resetStateGLCore()
1099 GLU_EXPECT_NO_ERROR(gl.getError(), "Buffer copy state reset failed"); in resetStateGLCore()
1105 const bool entrypointsPresent = gl.debugMessageControl != DE_NULL && in resetStateGLCore()
1106 gl.debugMessageCallback != DE_NULL; in resetStateGLCore()
1111 gl.debugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, DE_NULL, true); in resetStateGLCore()
1112 gl.debugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW, 0, DE_NULL, false); in resetStateGLCore()
1113 gl.debugMessageCallback(DE_NULL, DE_NULL); in resetStateGLCore()
1116 gl.enable(GL_DEBUG_OUTPUT); in resetStateGLCore()
1118 gl.disable(GL_DEBUG_OUTPUT); in resetStateGLCore()