inline...
On 31 March 2011 12:07, Henri Verbeet <[email protected]> wrote:
> On 30 March 2011 23:43, Julian Adams <[email protected]> wrote:
>> ---
>> src/gallium/drivers/r600/r600_state.c | 22 +++++++++++++---------
>> 1 files changed, 13 insertions(+), 9 deletions(-)
>>
> Evergreen probably needs the same fix.
Yes, the matching function there looks similar. I can update it, but
can't test it.
>
>> + for (int i = 0, j = 0; i < 8; i++) {
>> + /* state->rt entries > 0 only written if independent
>> blending */
>> + if (state->independent_blend_enable)
>> + j = i;
> Not sure about declaring "j" inside the for. I don't think it exactly
> helps readability, but otoh it doesn't bother me a lot either.
>
I copied that style from a function up the call stack, which was fixed
in a similar way in commit: a476ca1fd1b4e76e31c9babfd7fb2a54a09f21d3.
Mostly I write C++ so probably I'd be inclined to do this:
for (int i = 0; i < 8; i++) {
/* state->rt entries > 0 only written if independent blending */
const int j = state->independent_blend_enable ? i : 0;
Let me know if you want the Evergreen fixes, and how "j" is declared and set.
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev