Hey Eric, Eric Engestrom wrote on 26.08.2016 15:49: > On Fri, Aug 26, 2016 at 03:14:57PM +0200, Kai Wasserbäch wrote: >> Brian Paul wrote on 26.08.2016 14:50: >>> On 08/26/2016 05:58 AM, Kai Wasserbäch wrote: >>>> Cc: Brian Paul <bri...@vmware.com> >>>> Signed-off-by: Kai Wasserbäch <k...@dev.carbon-project.org> >>>> --- >>>> >>>> Hi Brian, >>>> is this what you had in mind? If so, I was wondering whether virgl_encode.c >>>> would need to be updated as well. Doesn't seem like it, since the functions >>>> there map everything to uint32_t or some other standard type. >>>> >>>> Another point are the switch statements nouveau uses. To silence the >>>> -Wswitch >>>> warning of GCC I stuck a default case with two asserts at the end of them. >>>> But >>>> maybe it would be better to use an if...else for nv30 and nv50. >>> >>> I think one assertion is enough. It's up to the nouveau developers whether >>> they >>> want to do more. >> >> ok, then I'll go for the generic "unhandled type" assert. > > I would've gone with `unreachable()`, since nothing outside the > enum range should ever get in.
Do you feel strongly about that and require a v3? Personally I think the assert() is better since the function could be called with another enum member value, which still is unhandled by the switch(). >>>> Cheers, >>>> Kai >>>> >>>> P.S.: If this is the right direction, I can do the remaining stuff as well. >>> >>> I think there was another person interested so feel free to share the task. >> >> Eric, I'm sorry I didn't see your message before I had prepared this patch >> and >> sent it. If I should leave the rest alone, just give me a shout. Would be >> unfortunate if we did the same task twice. > > No worries, I also saw your message after having sent my reply on > Brian's comment, so I'm no better xD > > I also have other ideas of things I could do, so I'll leave this > "int to enum" task to you :) Ok, I'll prepare the other patches as well. (I'll probably sent them out tomorrow.) Cheers, Kai
signature.asc
Description: OpenPGP digital signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev