i965: Refactor Gen8 depth packet emission.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 7 Feb 2014 01:02:37 +0000 (17:02 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 19 Feb 2014 09:46:17 +0000 (01:46 -0800)
commit82711611cf1dce82a667e531c2befad5a494f1cf
treed67c418a0ce11369b938f5acf3fa5f3a9a7b7639
parent67f073b91c1be3a6ca15b36a579473c7562e6632
i965: Refactor Gen8 depth packet emission.

The existing code followed the vtable function signature, which is not a
great fit: many of the parameters are unused, and the function still
inspects global state, making it less reusable.

This patch refactors the depth buffer packet emission code into a new
function which takes exactly the parameters it needs, and which uses no
global state.  It then makes the existing vtable function call the new
one.

Ideally, we would remove the vtable function, and clean up that
interface.  But that can happen once HiZ is working.

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