[PATCH xserver] glamor: Disable logic ops when doing compositing

Keith Packard keithp at keithp.com
Fri May 13 21:41:45 UTC 2016


Markus Wick <markus at selfnet.de> writes:

> Hi,
>
> AFAIK we disable logic ops after each usage, so this seems a bit 
> redundant to me. Did we miss one usages?

Nope, GL_COLOR_LOGIC_OP isn't managed like other glEnable/glDisable
pairs; it's left at the previous value. Someday we should figure out how
we want this to work and make it all consistent.

I'd suggest defining the set of glEnable values that are 'global' and
having every user set them to the desired value. That way, they will get
changed only when actually changing modes, and not just to reset back to
a 'base' state, whatever that means, under an assumption that gl will be
able to easily optimize calls which set the state to the current value,
but that flipping the state between two values may actually cost something.

Right now, in glamor, we use:

        GL_BLEND, GL_COLOR_LOGIC_OP, GL_SCISSOR_TEST

> As logic ops aren't very common, this sounds good to me.

It's all inconsistent, which is the worst possible plan.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160513/916d9bae/attachment.sig>


More information about the xorg-devel mailing list