On 17 July 2017 at 14:34, Topi Pohjolainen <topi.pohjolai...@gmail.com> wrote: > Otherwise one wraps uint to UINT_MAX via -1. > > Signed-off-by: Topi Pohjolainen <topi.pohjolai...@intel.com> > --- > src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c > b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c > index 6135fda1be..b9a00caad2 100644 > --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c > +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c > @@ -707,6 +707,8 @@ make_surface(struct brw_context *brw, GLenum target, > mesa_format format, > return NULL; > } > > + mt->refcount = 1; > + > if (target == GL_TEXTURE_CUBE_MAP || > target == GL_TEXTURE_CUBE_MAP_ARRAY) > isl_usage_flags |= ISL_SURF_USAGE_CUBE_BIT; > @@ -751,7 +753,6 @@ make_surface(struct brw_context *brw, GLenum target, > mesa_format format, > mt->last_level = last_level; > mt->target = target; > mt->format = format; > - mt->refcount = 1; > mt->aux_state = NULL; > Perhaps move the whole mt->foo = bar; hunk further up? That's a bit bikeshedy nit, so regardless if you opt for it or not
Fixes: 3cf470f2b6c ("i965: Add isl based miptree creator") Reviewed-by: Emil Velikov <emil.veli...@collabora.com> -Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev