[PATCH] glamor: don't do copy if we have 0 boxes to copy.

Dave Airlie airlied at gmail.com
Tue Jan 19 13:00:20 PST 2016

On 20 January 2016 at 03:56, Eric Anholt <eric at anholt.net> wrote:
> Dave Airlie <airlied at gmail.com> writes:
>> From: Dave Airlie <airlied at redhat.com>
>> This happens if you run twm + mplayer + xclock and drag
>> the clock over the mplayer. If we don't catch it, we cause
>> an illegal draw elements command to be passed to GL.
> What exactly is the error?  I was thinking it would be something about
> count == 0, but that's not an error apparently.  If there is one about
> count == 0, shouldn't we just have
> glamor_gldrawarrays_quads_using_indices() do the short circuit so the
> callers don't have to worry about it?

Why do all the lowlevel work when we can catch it before then?

essentially glamor_priv->ib_size is 0, and count is 0, so we don't set
up an IB., then we call glDrawElements without a bound IB, and it
gets upset.


More information about the xorg-devel mailing list