On Wed, Nov 15, 2017 at 12:13 AM, Rogovin, Kevin <kevin.rogo...@intel.com> wrote: > I have just seen that I have had an epic brain lapse on this. > > The code is pretty clear, the correct value of count should be ann_count - i. > This is because: > a. The value of ann_count is the value of the array size BEFORE the insert; > this is clear from the code within the if (offset + ..) where it increments > ann_count. > b. Since ann_count is the size before the insert, it should move the content > in the open range [i, ann_count) to [i + 1, ann_count + 1); thus the number > of elements is given by ann_count - i. > > Changing the count to ann_count - i does the right thing, and also makes it > quite clear that Matt is correct on patch 11: that it was just papering over > a bug from using the wrong count value.
I think I used the wrong data structure :) I reproduced the problem you were having and then got tired of thinking about how to memmove elements. I rewrote the annotation code yesterday to use a linked list, which is much more natural. I just sent the patches. Attached is a patch you can squash into your series in order to make it work on top of my series. > However, once this is done, the build does assert() on some shaders that I > have; this is because it fails to understand some registers. I think that's a result of the disassembler not knowing how to disassemble sends/sendsc. Both Toni and Neil have written patches for that. I'll see if I can rebase them.
p
Description: Binary data
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev