OSDN Git Service

i965/gen5: Fix rendering of depth buffers without stencil [v2]
authorChad Versace <chad.versace@linux.intel.com>
Tue, 17 Jan 2012 23:41:46 +0000 (15:41 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 19 Jan 2012 19:14:55 +0000 (11:14 -0800)
commitd090099f7dd6769aa322aadf16f31f60f1639394
tree6c192316889f7968d34390f0b4d828c8d3cc208a
parent8ac4470041ff63e01b4d4200ca298bd7244232f8
i965/gen5: Fix rendering of depth buffers without stencil [v2]

Fixes the following OGLConform tests on gen5:
    depth-stencil(misc.state_on.depth_int)
    fbo_db_ARBfp(basic.OnlyDepthBuffDrawBufferRender)

The problem was that, if the depth buffer's Mesa format was X8_Z24, then
we emitted the hardware format D24_UNORM_X8. But, on gen5, D24_UNORM_S8
must be emitted.

This bug was introduced by:
    commit d84a180417d1eabd680554970f1eaaa93abcd41e
    Author: Eric Anholt <eric@anholt.net>
    i965: Base HW depth format setup based on MESA_FORMAT, not bpp.

v2: Deref 'intel' directly. Move the branch for newer chipset to top.
    Quote the PRM. As requested by Ken.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43408
Note: This is a candidate for the 8.0 branch.
Reported-by: Xunx Fang <xunx.fang@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit a6dd4bf5fcce2520ab199201fdd1ad155457d781)
src/mesa/drivers/dri/i965/brw_misc_state.c