According to  ARB_draw_elements_base_vertex, the index clamping should be done prior to adding the index offset and r500 seems to implement it the same way, which kinda makes the clamping useless here. To my knowledge there is no way to implement hw-accelerated, negative index offsets other than with the r500-specific register. We already do tons and tons of fallbacks and some crucial ones are still missing so I wouldn&#39;t like to implement more of them than is absolutely necessary.<br>
<br>-Marek<br><br><div class="gmail_quote">On Mon, Apr 19, 2010 at 6:39 PM, José Fonseca <span dir="ltr">&lt;<a href="mailto:jfonseca@vmware.com">jfonseca@vmware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">On Mon, 2010-04-19 at 06:41 -0700, Jerome Glisse wrote:<br>
&gt; On Mon, Apr 19, 2010 at 02:22:21PM +0100, Keith Whitwell wrote:<br>
&gt; &gt; On Mon, 2010-04-19 at 06:07 -0700, Marek Olšák wrote:<br>
&gt; &gt; &gt; Unfortunately, this is supported only on r500 (i.e. not r300 nor r400)<br>
&gt; &gt; &gt; and only when the DRM version is &gt;=2.3.0 (i.e. kernel 2.6.34). Please,<br>
&gt; &gt; &gt; can we make it an optional feature?<br>
&gt; &gt;<br>
&gt; &gt; Are you sure about this?  It seems to be a long-time DX9 (and earlier?)<br>
&gt; &gt; requirement.<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m sure it can be made optional, though - if a state tracker absolutely<br>
&gt; &gt; required it &amp; didn&#39;t want to implement a workaround, it could just fail<br>
&gt; &gt; to initialize on such drivers.<br>
&gt; &gt;<br>
&gt; &gt; Keith<br>
&gt;<br>
&gt; Issue here is that the register allowing this feature was tag<br>
&gt; as unsafe and forbidden, it&#39;s will be allowed only starting with<br>
&gt; 2.6.34.<br>
<br>
</div></div>Yes, index bias is a potential source for buffer under/overflow. But if<br>
the hardware can enforce min_index/max_index when fetching vertices from<br>
vertex buffers then it should be made to make it work without<br>
compromising security.<br>
<div><div></div><div class="h5"><br>
Jose<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br>