Otherwise one wraps uint to UINT_MAX via -1.
Fixes: 3cf470f2b6c ("i965: Add isl based miptree creator")
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
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;
mt->last_level = last_level;
mt->target = target;
mt->format = format;
- mt->refcount = 1;
mt->aux_state = NULL;
return mt;