On Tue, Nov 3, 2015 at 10:20 PM, Matt Turner <matts...@gmail.com> wrote:
> On Tue, Nov 3, 2015 at 9:47 PM, Kenneth Graunke <kenn...@whitecape.org> wrote:
>> But this isn't safe when i = 0, as cur will be out of bounds...
>
> I don't think so. The code as-is might be tricky, but I think it's correct --
>
>>> +      if (annotation->ann[i].offset <= offset)
>>> +         continue;
>
> For i = 0, annotation->ann[i].offset is always 0 (or the start of the
> SIMD16 program, I suppose). In both cases, <offset> cannot be less
> than that value. Knowing that, maybe the loop should just begin at i =
> 1.
>
> At least, I think. It's been more than two weeks since I've really
> thought about this :(

I'd even accept s/tricky/downright confusing/ on further consideration :)
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to