[Mesa-dev] [PATCH 6/9] i965: Add annotation_insert_error() and support for printing errors.

Matt Turner mattst88 at gmail.com
Tue Nov 3 22:31:43 PST 2015


On Tue, Nov 3, 2015 at 10:20 PM, Matt Turner <mattst88 at gmail.com> wrote:
> On Tue, Nov 3, 2015 at 9:47 PM, Kenneth Graunke <kenneth at 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 :)


More information about the mesa-dev mailing list