On Sat, Apr 16, 2016 at 5:49 PM, Rob Clark <robdcl...@gmail.com> wrote: > On Sat, Apr 16, 2016 at 5:04 PM, Marek Olšák <mar...@gmail.com> wrote: >> On Sat, Apr 16, 2016 at 9:40 PM, Rob Clark <robdcl...@gmail.com> wrote: >>> On Sat, Apr 16, 2016 at 8:50 AM, Marek Olšák <mar...@gmail.com> wrote: >>>> From: Marek Olšák <marek.ol...@amd.com> >>>> >>>> and remove number assignments which are consecutive >>>> --- >>>> src/gallium/include/pipe/p_defines.h | 378 >>>> +++++++++++++++++++---------------- >>>> 1 file changed, 205 insertions(+), 173 deletions(-) >>>> >>>> diff --git a/src/gallium/include/pipe/p_defines.h >>>> b/src/gallium/include/pipe/p_defines.h >>>> index 1aef21d..6bb180d 100644 >>>> --- a/src/gallium/include/pipe/p_defines.h >>>> +++ b/src/gallium/include/pipe/p_defines.h >>>> @@ -51,49 +51,56 @@ enum pipe_error >>>> /* TODO */ >>>> }; >>>> >>>> +enum { >>> >>> so, I would kinda like to use named enums, and then update the state >>> structs to use 'em (since it would make gcc and gdb grok them >>> better).. ofc it is a big change and doesn't have to be done in all >>> one go, but why not give the enum's names in this first step? >> >> Enum type names can't be used everywhere. A lot of states are packed >> (unsigned x:n). Not sure how enums work with that. In any case, let's >> add the names later if needed. > > I *believe* 'enum foo name : n' works.. it has been used in other > places, but I didn't verify that the structure layout was the same > (and I'm not 100% sure about msvc, etc)..
btw, to be clear, I wasn't proposing to change all the state structs as well in the same patch.. I don't believe it would be a problem to give enum names now and leave "unsigned foo : n" for now.. BR, -R > BR, > -R > > >> >> Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev