[Mesa-dev] Mesa (gallium-index-bias): gallium: Add index bias parameter to draw_elements and friends.

José Fonseca jfonseca at vmware.com
Mon Apr 19 09:39:54 PDT 2010


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



More information about the mesa-dev mailing list