i965: Pull format conversion logic out of brw_depthbuffer_format.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 8 Feb 2014 06:22:45 +0000 (22:22 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 19 Feb 2014 09:46:16 +0000 (01:46 -0800)
commit09d9a8913e8c28fc4c1c60d7da85a2f093786894
tree176b683f0512aa6f286507ac71439b5d3697172b
parent4695f64895ed016e8c13b87315fb28fd91a26668
i965: Pull format conversion logic out of brw_depthbuffer_format.

brw_depthbuffer_format is not very reusable at the moment, since it
uses global state (ctx->DrawBuffer) to access a particular depth buffer.

For HiZ on Broadwell, I need a function which simply converts the
formats.  However, at least one existing user of brw_depthbuffer_format
really wants the existing interface.  So, I've created a new function.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_misc_state.c
src/mesa/drivers/dri/i965/brw_surface_formats.c