[Mesa-dev] [PATCH v2 5/5] i965: Shrink brw_vue_map struct.
Paul Berry
stereotype441 at gmail.com
Sat Mar 23 15:56:58 PDT 2013
On 23 March 2013 11:02, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On 03/22/2013 05:42 PM, Eric Anholt wrote:
>
>> Paul Berry <stereotype441 at gmail.com> writes:
>>
>> On 22 March 2013 12:32, Eric Anholt <eric at anholt.net> wrote:
>>>
>>> Paul Berry <stereotype441 at gmail.com> writes:
>>>>
>>>>> diff --git a/src/mesa/drivers/dri/i965/**brw_vs.c
>>>>>
>>>> b/src/mesa/drivers/dri/i965/**brw_vs.c
>>>>
>>>>> index c8ca018..7e941dd 100644
>>>>> --- a/src/mesa/drivers/dri/i965/**brw_vs.c
>>>>> +++ b/src/mesa/drivers/dri/i965/**brw_vs.c
>>>>> @@ -66,6 +66,12 @@ brw_compute_vue_map(struct brw_context *brw, struct
>>>>>
>>>> brw_vs_compile *c,
>>>>
>>>>> vue_map->slots_valid = slots_valid;
>>>>> int i;
>>>>>
>>>>> + /* Make sure that the values we store in
>>>>>
>>>> vue_map->vert_result_to_slot and
>>>>
>>>>> + * vue_map->slot_to_vert_result won't overflow the signed chars
>>>>> that
>>>>>
>>>> are
>>>>
>>>>> + * used to store them.
>>>>> + */
>>>>> + STATIC_ASSERT(BRW_VARYING_**SLOT_MAX <= 128);
>>>>>
>>>>
>>>> If the max varying slot was 128, that would be overflowed, right?
>>>>
>>>>
>>> Actually, BRW_VARYING_SLOT_MAX is a misnomer--it's actually the max
>>> varying
>>> slot + 1. Want me to rename it BRW_NUM_VARYING_SLOT_MAX_PLUS_**1 or
>>> something?
>>>
>>
>> BRW_VARYING_SLOT_COUNT would be pretty good.
>>
>
> I agree, BRW_VARYING_SLOT_COUNT sounds pretty good to me.
>
>
Ok, I'll make a follow-on patch.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130323/c3c837a3/attachment.html>
More information about the mesa-dev
mailing list