From e71a9042cb5e046072d2ea8fbd22a01de625bf8a Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Thu, 26 Aug 2010 07:26:21 -0700 Subject: mesa: Identify packed depth/stencil buffers using the Format field. Intel sometimes uses packed depth/stencil buffers even when only a depth buffer or only a stencil buffer was requested. Common code currently uses the _BaseFormat field to determine whether a depth/stencil wrapper is necessary. But unless the user explicitly requested a packed depth/stencil buffer, the _BaseFormat field does not encode this information, and the required wrappers are not created. The problem was introduced by commit 45e76d2665b38b ("mesa: remove a bunch of gl_renderbuffer fields"), which killed off the _ActualFormat field upon which the decision to create a wrapper used to be made. This patch changes the logic to use the Format field instead, which is more like the old code. Fixes fdo bug 27590. Signed-off-by: Nick Bowler Signed-off-by: Brian Paul --- src/mesa/main/formats.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/main/formats.h') diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h index ad176caaa0..e9467f486b 100644 --- a/src/mesa/main/formats.h +++ b/src/mesa/main/formats.h @@ -190,6 +190,9 @@ _mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh); extern GLboolean _mesa_is_format_compressed(gl_format format); +extern GLboolean +_mesa_is_format_packed_depth_stencil(gl_format format); + extern GLenum _mesa_get_format_color_encoding(gl_format format); -- cgit v1.2.3