[Mesa-dev] [PATCH 2/6] mesa: Fix GL error generation in glBlitFramebuffer()
Ian Romanick
idr at freedesktop.org
Tue Dec 18 10:53:43 PST 2012
On 12/12/2012 03:25 PM, Anuj Phogat wrote:
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
> src/mesa/main/fbobject.c | 10 +++++++++-
> 1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index 4b7d4ab..9e32836 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -2856,7 +2856,15 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
> mask &= ~GL_STENCIL_BUFFER_BIT;
> }
> else if (_mesa_get_format_bits(readRb->Format, GL_STENCIL_BITS) !=
> - _mesa_get_format_bits(drawRb->Format, GL_STENCIL_BITS)) {
> + _mesa_get_format_bits(drawRb->Format, GL_STENCIL_BITS) ||
> + /* OpenGL/ES specification is not very clear about it. But GLES3
> + * conformance test expects GL_INVALID_OPERATION in case of below
> + * listed combination of formats for read/draw buffers.
> + */
> + (readRb->InternalFormat == GL_DEPTH32F_STENCIL8 &&
> + drawRb->InternalFormat == GL_DEPTH24_STENCIL8) ||
> + (readRb->InternalFormat == GL_DEPTH24_STENCIL8 &&
> + drawRb->InternalFormat == GL_DEPTH32F_STENCIL8)) {
It seems like this is just trying to verify that the depth bits are the
same for both buffers.
_mesa_get_format_buts(readRb->Format, GL_DEPTH_BITS) !=
_mesa_get_format_buts(drawRb->Format, GL_DEPTH_BITS)
Right? I suspect there is some spec text that supports generating an
error in that scenario.
> /* There is no need to check the stencil datatype here, because
> * there is only one: GL_UNSIGNED_INT.
> */
>
More information about the mesa-dev
mailing list