[Mesa-dev] RFC: gallium front/back vs cw/ccw rasterizer state
Roland Scheidegger
sroland at vmware.com
Fri May 14 07:34:02 PDT 2010
On 14.05.2010 14:10, Keith Whitwell wrote:
> I'm considering modifying the gallium rasterizer state to remove most of
> the cw/ccw flags and replace them with front/back or other concepts
> closer to what GL is using.
>
> This is primarily motivated by the fact that noone other than GL uses a
> lot of this state, and where they do, they tend to use the same
> abstraction level as GL. This includes many hardware interfaces.
You're right at least both i965 and r600 use front/back concept. I'm not
sure why we chose the cw/ccw flags, though IIRC it was more convenient
for some specific hardware...
>
> Right now, the cw/ccw abstraction doesn't benefit many drivers (except
> maybe softpipe), and introduces some unnecessary possibilities which GL
> never exposes (eg front and back with the same fill mode but different
> offset modes).
It is interesting to note though that some hardware indeed exposes
exactly that possibility you mentioned, even though there doesn't seem
to be a API which could use it. R600 (older ones too from a quick look)
has basically offset_front, offset_back enables (in fact it can set
different offset/scale values for front and back too), regardless the
polygon mode. Looks like i965 can't deal with that directly as it only
has one global offset for everything it seems. Nvidia though seems to
have enables for points, tris, lines.
So I'm not convinced this part of the change is worth it, but it is
probably a minor detail either way. The cw/ccw front/back change
definitely feels right though.
>
> I've started a branch for this, but also here are the relevant interface
> changes for review.
>
> Thoughts?
Roland
More information about the mesa-dev
mailing list