On Sat 11 Jun 2016, Jason Ekstrand wrote: > While designated initializers are nice, they also force us to put some > things in the initializer and some things later. Surface state setup is > complicated enough that this really hurs readability in the long run. typo: ^^^^
> --- > src/intel/isl/isl_surface_state.c | 95 > ++++++++++++++++++++------------------- > 1 file changed, 48 insertions(+), 47 deletions(-) > > diff --git a/src/intel/isl/isl_surface_state.c > b/src/intel/isl/isl_surface_state.c > index 51c5953..ae8096f 100644 > --- a/src/intel/isl/isl_surface_state.c > +++ b/src/intel/isl/isl_surface_state.c > @@ -202,89 +202,90 @@ isl_genX(surf_fill_state_s)(const struct isl_device > *dev, void *state, > uint32_t halign, valign; > get_halign_valign(info->surf, &halign, &valign); > > - struct GENX(RENDER_SURFACE_STATE) s = { > - .SurfaceType = get_surftype(info->surf->dim, info->view->usage), > - .SurfaceArray = info->surf->phys_level0_sa.array_len > 1, > - .SurfaceVerticalAlignment = valign, > - .SurfaceHorizontalAlignment = halign, > + struct GENX(RENDER_SURFACE_STATE) s = { 0 }; > + > + s.SurfaceType = get_surftype(info->surf->dim, info->view->usage); > + > + s.SurfaceArray = info->surf->phys_level0_sa.array_len > 1; > + s.SurfaceVerticalAlignment = valign; > + s.SurfaceHorizontalAlignment = halign; Small nit. The newline below SurfaceType looks odd. Patch 9 and 10 are Reviewed-by: Chad Versace <chad.vers...@intel.com> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev