This little series adds support to ISL for emitting the packets required for depth and stencil buffers:
- 3DSTATE_DEPTH_BUFFER - 3DSTATE_STENCIL_BUFFER - 3DSTATE_HIER_DEPTH_BUFFER - 3DSTATE_CLEAR_PARAMS The approach taken here is to have a single function which emits all four commands in one go. The reasoning behind doing it this way is that the four packets are very closely intertwined. For instance, 3DSTATE_STENCIL_BUFFER and 3DSTATE_HIER_DEPTH_BUFFER do not have any extent fields, they rely on 3DSTATE_DEPTH_BUFFER for that information. Also, the HiZ enable bit is in 3DSTATE_DEPTH_BUFFER but the details about the HiZ buffer are in 3DSTATE_HIER_DEPTH_BUFFER. The alternate approach, which Topi tried in some patches of his is to re-use the isl_surf_state_fill_info struct that we use for filling out RENDER_SURFACE_STATE. However, this requires unlinking depth and stencil (at the very least) which is problematic in the case where you have stencil but no depth. Jason Ekstrand (8): genxml/bits: Refactor to add a container class genxml/bits: Pull the function emit code into a helper block genxml/bits: Emit per-field _start helpers genxml/bits: Emit per-container _length helpers isl: Use genx_bits.h instead of a hand-rolled table isl: Add support for emitting depth/stencil/hiz anv: Use ISL for emitting depth/stencil/hiz intel/blorp: Use ISL for emitting depth/stencil/hiz src/intel/Makefile.sources | 7 ++ src/intel/blorp/blorp_genX_exec.h | 120 ++++++------------ src/intel/genxml/gen_bits_header.py | 159 +++++++++++++++++------- src/intel/isl/isl.c | 124 ++++++++++++++++--- src/intel/isl/isl.h | 82 +++++++++++++ src/intel/isl/isl_emit_depth_stencil.c | 189 +++++++++++++++++++++++++++++ src/intel/isl/isl_priv.h | 28 +++++ src/intel/vulkan/genX_cmd_buffer.c | 215 ++++++--------------------------- 8 files changed, 601 insertions(+), 323 deletions(-) create mode 100644 src/intel/isl/isl_emit_depth_stencil.c -- 2.5.0.400.gff86faf _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev