<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 15, 2016 at 2:38 PM, Jordan Justen <span dir="ltr"><<a href="mailto:jordan.l.justen@intel.com" target="_blank">jordan.l.justen@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 2016-11-15 11:36:33, Jason Ekstrand wrote:<br>
>    Of you want to make it simpler, we have a macro wrapper called<br>
>    isl_surf_init that will turn those fields into named parameters.  Either<br>
>    way, thanks for fixing this up.  Rb<br>
><br>
>    On Nov 15, 2016 11:23 AM, "Jordan Justen" <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>><br>
>    wrote:<br>
><br>
>      Signed-off-by: Jordan Justen <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>><br>
>      ---<br>
>       src/intel/blorp/blorp_blit.c | 29 +++++++++++++----------------<br>
>       1 file changed, 13 insertions(+), 16 deletions(-)<br>
><br>
>      diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c<br>
>      index 1108335..c0b56c3 100644<br>
>      --- a/src/intel/blorp/blorp_blit.c<br>
>      +++ b/src/intel/blorp/blorp_blit.c<br>
>      @@ -1347,22 +1347,19 @@ surf_convert_to_single_slice(<wbr>const struct<br>
>      isl_device *isl_dev,<br>
>          uint32_t tile_x_px, tile_y_px;<br>
>          surf_get_intratile_offset_px(<wbr>info, &tile_x_px, &tile_y_px);<br>
><br>
>      -   /* TODO: Once this file gets converted to C, we shouls just use<br>
>      designated<br>
>      -    * initializers.<br>
>      -    */<br>
>      -   struct isl_surf_init_info init_info = { 0, };<br>
>      -<br>
>      -   init_info.dim = ISL_SURF_DIM_2D;<br>
>      -   init_info.format = info->surf.format;<br>
>      -   init_info.width = slice_width_px + tile_x_px;<br>
>      -   init_info.height = slice_height_px + tile_y_px;<br>
>      -   init_info.depth = 1;<br>
>      -   init_info.levels = 1;<br>
>      -   init_info.array_len = 1;<br>
>      -   init_info.samples = info->surf.samples;<br>
>      -   init_info.min_pitch = info->surf.row_pitch;<br>
>      -   init_info.usage = info->surf.usage;<br>
>      -   init_info.tiling_flags = 1 << info->surf.tiling;<br>
>      +   struct isl_surf_init_info init_info = {<br>
>      +      .dim = ISL_SURF_DIM_2D,<br>
>      +      .format = info->surf.format,<br>
>      +      .width = slice_width_px + tile_x_px,<br>
>      +      .height = slice_height_px + tile_y_px,<br>
>      +      .depth = 1,<br>
>      +      .levels = 1,<br>
>      +      .array_len = 1,<br>
>      +      .samples = info->surf.samples,<br>
>      +      .min_pitch = info->surf.row_pitch,<br>
>      +      .usage = info->surf.usage,<br>
>      +      .tiling_flags = 1 << info->surf.tiling,<br>
>      +   };<br>
><br>
>          isl_surf_init_s(isl_dev, &info->surf, &init_info);<br>
>          assert(info->surf.row_pitch == init_info.min_pitch);<br>
<br>
</div></div>Regarding the isl_surf_init wrapper, this assert uses the init<br>
structure. I could change to use the wrapper if we think it is okay to<br>
drop the assert.<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>We shouldn't drop the assert.  I suppose we could copy that one field out etc.  Meh.  Let's just keep using the _s version and call it good for now. <br></div></div><br></div></div>