[Mesa-dev] [PATCH 28/64] isl/state: Don't use designated initializers for buffer surface state
Jason Ekstrand
jason at jlekstrand.net
Mon Jun 13 14:58:36 UTC 2016
On Mon, Jun 13, 2016 at 7:53 AM, Jason Ekstrand <jason at jlekstrand.net>
wrote:
>
>
> On Mon, Jun 13, 2016 at 1:50 AM, Emil Velikov <emil.l.velikov at gmail.com>
> wrote:
>
>> Hi Jason,
>>
>> Why do you remove the C99 initializer ? Anything wrong with using it ?
>>
>
> Mostly readability and matching what we did earlier with the other surface
> state struct.
>
>
>>
>> On 11 June 2016 at 17:02, Jason Ekstrand <jason at jlekstrand.net> wrote:
>> > ---
>> > src/intel/isl/isl_surface_state.c | 46
>> +++++++++++++++++++--------------------
>> > 1 file changed, 23 insertions(+), 23 deletions(-)
>> >
>> > diff --git a/src/intel/isl/isl_surface_state.c
>> b/src/intel/isl/isl_surface_state.c
>> > index ca13175..2026f80 100644
>> > --- a/src/intel/isl/isl_surface_state.c
>> > +++ b/src/intel/isl/isl_surface_state.c
>> > @@ -427,40 +427,40 @@ isl_genX(buffer_fill_state_s)(void *state,
>> > assert(num_elements <= (1ull << 27));
>> > }
>> >
>> > - struct GENX(RENDER_SURFACE_STATE) surface_state = {
>> > - .SurfaceType = SURFTYPE_BUFFER,
>> > - .SurfaceArray = false,
>> > - .SurfaceFormat = info->format,
>> > - .SurfaceVerticalAlignment = isl_to_gen_valign[4],
>> > - .SurfaceHorizontalAlignment = isl_to_gen_halign[4],
>> > - .Height = ((num_elements - 1) >> 7) & 0x3fff,
>> > - .Width = (num_elements - 1) & 0x7f,
>> > - .Depth = ((num_elements - 1) >> 21) & 0x3f,
>> > - .SurfacePitch = info->stride - 1,
>> > - .NumberofMultisamples = MULTISAMPLECOUNT_1,
>> > + struct GENX(RENDER_SURFACE_STATE) s = { 0 };
>> > +
>> > + s.SurfaceType = SURFTYPE_BUFFER,
>> Are you sure that this patch builds ? Shouldn't we be using semicolon
>> and the end of the above line (plus all the ones below) ?
>>
>
It does build thanks to comma expressions, but it should be fixed!
> Rebase fail!
>
>
>>
>> -Emil
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160613/96a5009e/attachment.html>
More information about the mesa-dev
mailing list