Check for depth/stencil buffer in default FBO
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Mon, 15 Jan 2018 11:10:46 +0000 (11:10 +0000)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Wed, 14 Feb 2018 08:28:13 +0000 (03:28 -0500)
commitae2e02d8078bd92cf73bf3aeed964fc2c095e2e2
treed7e787a26ee2267f13acbbdb2568c5d45b06d1ce
parent311c999a4fa5a60937b1aa121057e1cc5d724c5c
Check for depth/stencil buffer in default FBO

The affected tests invoke gl.getNamedFramebufferAttachmentParameteriv()
with GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE to get the depth bits used in
the default FBO. And something similar is done for the stencil bits.

But wrongly it assumes that if the FBO does not have an associated depth
or stencil buffer, it would return 0. Rather, this function returns an
error if it is invoked in a FBO without a depth/stencil buffer attached.

So better check first if the default FBO has a depth/stencil buffer
attached, and if so then invoke the above functions to get the
depth/stencil bits.

Components: OpenGL

VK-GL-CTS issue: 969

Affects:
KHR-*.internalformat.renderbuffer.*

Change-Id: I74d28d5d089790fed4dd2728cb5143e7c03d7442
external/openglcts/modules/common/glcInternalformatTests.cpp