[Mesa-dev] [PATCH] i965: Reduce code duplication in handling of depth, stencil, and HiZ.
Kenneth Graunke
kenneth at whitecape.org
Tue Apr 2 10:10:10 PDT 2013
On 03/26/2013 09:54 PM, Paul Berry wrote:
> This patch consolidates duplicate code in the brw_depthbuffer and
> gen7_depthbuffer state atoms. Previously, these state atoms contained
> 5 chunks of code for emitting the _3DSTATE_DEPTH_BUFFER packet (3 for
> Gen4-6 and 2 for Gen7). Also a lot of logic for determining the
> appropriate buffer setup was duplicated between the Gen4-6 and Gen7
> functions.
>
> This refactor splits the code into three separate functions:
> brw_emit_depthbuffer(), which determines the appropriate buffer setup
> in a mostly generation-independent way, brw_emit_depth_stencil_hiz(),
> which emits the appropriate state packets for Gen4-6, and
> gen7_emit_depth_stencil_hiz(), which emits the appropriate state
> packets for Gen7.
>
> Tested using Piglit on Gen5-7 (no regressions).
Okay, nice work, you've successfully dealt with the rat's nest. This is
definitely better.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the mesa-dev
mailing list