[Mesa-dev] [PATCH 0/7] Fixes for SW:KotOR (v2)

Ian Romanick idr at freedesktop.org
Tue Feb 9 22:24:24 UTC 2016


On 02/09/2016 12:57 PM, Miklós Máté wrote:
> On 02/06/2016 12:11 AM, Matt Turner wrote:
>> Thanks a ton for contributing this. This is really cool.
>>
>> I've replied to a couple of patches with a lot of style comments.
>> These issues appear in a lot of places I didn't point out (it was
>> getting a bit repetitive). A summary is
>>
>>   - Use spaces around operators
>>   - Use BSD-style function declarations, with qualifiers and return
>> type on their own line
>>   - Align line-wrapped arguments and parameters with the open paranthesis
>>   - Use braces in nested if-statements
>>   - Don't indent case/default labels past switch()
>>   - Don't add code that is commented out
>>   - Use spaces, not tabs
>>
>> Thanks. I look forward to porting this to NIR and adding i965 support
>> at some point. :)
> Thanks for your thorough review. I started working on fixing the coding
> style to match the project.
> However, I have to argue with you on main/state.c (in 1/7): I created
> that code with copy&paste, so the
> usage of tabs and the && placement matches the style of the other if
> blocks in that function. Should I
> fix them all?

You don't have to, but if you do, it should be a separate patch.

There's a lot of code in Mesa that uses deprecated styles.  We haven't
felt like it's worth the effort to go fix all of it at once.  We've
taken the approach of using the current style in all new code and
changed code.  Eventually it will all get up-to-date. :)

This has the side effect that you can tell how long it has been since
someone touched the code just by looking at it.  Sometimes that's a
warning sign.

> MM
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list