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't like to implement more
of them than is absolutely necessary.

-Marek

On Mon, Apr 19, 2010 at 6:39 PM, José Fonseca <jfons...@vmware.com> wrote:

> On Mon, 2010-04-19 at 06:41 -0700, Jerome Glisse wrote:
> > On Mon, Apr 19, 2010 at 02:22:21PM +0100, Keith Whitwell wrote:
> > > On Mon, 2010-04-19 at 06:07 -0700, Marek Olšák wrote:
> > > > Unfortunately, this is supported only on r500 (i.e. not r300 nor
> r400)
> > > > and only when the DRM version is >=2.3.0 (i.e. kernel 2.6.34).
> Please,
> > > > can we make it an optional feature?
> > >
> > > Are you sure about this?  It seems to be a long-time DX9 (and earlier?)
> > > requirement.
> > >
> > > I'm sure it can be made optional, though - if a state tracker
> absolutely
> > > required it & didn't want to implement a workaround, it could just fail
> > > to initialize on such drivers.
> > >
> > > Keith
> >
> > Issue here is that the register allowing this feature was tag
> > as unsafe and forbidden, it's will be allowed only starting with
> > 2.6.34.
>
> Yes, index bias is a potential source for buffer under/overflow. But if
> the hardware can enforce min_index/max_index when fetching vertices from
> vertex buffers then it should be made to make it work without
> compromising security.
>
> Jose
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to