[Mesa-dev] [PATCH 3/5] mesa: Handle clip control in meta operations.

Neil Roberts neil at linux.intel.com
Thu Oct 30 07:51:54 PDT 2014


Mathias Fröhlich <Mathias.Froehlich at gmx.net> writes:

> That moved to MESA_META_TRANSFORM due to a review request. As I
> understood the rationale, it's already connected to the
> gl_context::Transform variable by the GL spec, so it belongs into
> transform also for meta operations. Brian, or what was there an other
> reason for moving this to MESA_META_TRANSFORM?

Hrm, it looks like a lot of the meta state flags already don't
correspond with the attribute groups in GL. For example, the clip planes
have their own MESA_META_CLIP state flag but according to the state
tables in the spec they should be part of the transform attribute. So I
think there would already be a precedent for adding a new state flag for
it. However it looks like with the current usage it would be most
convenient for it to be in MESA_META_VIEWPORT because then (probably)
none of the rest of the code needs to change.

The state table for the clip control state actually says the attribute
is ‘xform’ not ‘transform’. I wonder why it's like that? Presumably it
is supposed to be ‘transform’ because there is no xform attribute listed
in the attribute groups table. However if you were taking the spec
literally maybe you could argue that the clip control state should be in
its own struct called ‘gl_xform_attrib’ under gl_context and there would
be no way to save and restore it with glPushAttrib.

GL's state is so complicated!

- Neil

More information about the mesa-dev mailing list