diff options
author | Paul Berry <[email protected]> | 2013-03-26 13:24:43 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-04-02 15:19:13 -0700 |
commit | 41e4bccc754bf3942255630ddd03601b95096c03 (patch) | |
tree | aa0ff537e332a02d95dcf9b314d0327027a8e925 /src/gallium/drivers/nvc0/nvc0_screen.c | |
parent | 2ad0ed63497f27b77be49cb04a6dc9df21fe75f2 (diff) |
i965: Reduce code duplication in handling of depth, stencil, and HiZ.
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).
v2: Re-word some comments. Fix an assertion that incorrectly
prohibited packed depth/stencil formats on Gen6 (these are allowed
provided that HiZ is disabled).
Reviewed-by: Chad Versace <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_screen.c')
0 files changed, 0 insertions, 0 deletions