On Wednesday, July 02, 2014 12:33:16 PM Jordan Justen wrote: > On Wed, Jul 2, 2014 at 5:39 AM, Pohjolainen, Topi > <topi.pohjolai...@intel.com> wrote: > > On Tue, Jul 01, 2014 at 04:53:06PM -0700, Jordan Justen wrote: > >> We now skip allocating a hiz miptree for gen7. Instead, we calculate > >> the required hiz buffer parameters and allocate a bo directly. > >> > >> Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com> > >> --- > >> src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 67 ++++++++++++++++++++++++++- > >> 1 file changed, 65 insertions(+), 2 deletions(-) > >> > >> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c > >> index 8719c29..b308b0c 100644 > >> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c > >> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c > >> @@ -823,7 +823,10 @@ intel_miptree_release(struct intel_mipmap_tree **mt) > >> drm_intel_bo_unreference((*mt)->bo); > >> intel_miptree_release(&(*mt)->stencil_mt); > >> if ((*mt)->hiz_buf) { > >> - intel_miptree_release(&(*mt)->hiz_buf->mt); > >> + if ((*mt)->hiz_buf->mt) > >> + intel_miptree_release(&(*mt)->hiz_buf->mt); > >> + else > >> + drm_intel_bo_unreference((*mt)->hiz_buf->bo); > >> free((*mt)->hiz_buf); > >> } > >> intel_miptree_release(&(*mt)->mcs_mt); > >> @@ -1375,6 +1378,61 @@ intel_miptree_level_enable_hiz(struct brw_context *brw, > >> > >> > >> static struct intel_miptree_aux_buffer * > >> +intel_hiz_buf_create(struct brw_context *brw, > >> + struct intel_mipmap_tree *mt) > >> +{ > >> + unsigned hz_width, hz_height; > >> + unsigned H0, h0, h1, Z0; > >> + const unsigned j = 8; > > > > This could read 'vertical_align' instead of 'j'. > > I wanted to stick with the 'j' terminology from the docs. Although, > I'm not consistent about sticking with the docs, so how about a v2 > where I'm more consistent about that?
I tend to prefer the more descriptive name as well. How about: const unsigned vertical_align = 8; /* 'j' in the docs */ In other places, we've called this align_h, which I hate (is 'h' height or horizontal?) But, it's up to you.
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev