[fdo] Need help with XRenderSetPictureFilter

Alan Coopersmith alan.coopersmith at oracle.com
Mon Feb 21 17:49:49 UTC 2022


I've cc'ed the xorg mailing list, since that's a better place to ask than
the generic freedesktop mailing list.

https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/blob/master/renderproto.txt#L728
says that you'll get a BadMatch error if the specified filter is not
"one of the filters supported for the screen associated with picture".

On 2/21/22 07:11, Nikita Zlobin wrote:
> I'm trying to apply convolution to pixmap:
> 
> Doing this call before to composite:
> 
> XRenderSetPictureFilter (
>      display, pic_src, "convolution",
>      (XFixed[]){ 3, 1, 0x2AAAAAAB, 0x2AAAAAAB, 0x2AAAAAAB },
>      5 );
> 
> Found this function in the header - it's missing both in
> renderproto.txt and libXrender.txt files. Parameters should be just as
> described for convolution filter: N + M + N*M values in total.
> 
> Error happens right here:
> 
> X Error of failed request:  BadMatch (invalid parameter attributes)
>    Major opcode of failed request:  138 (RENDER)
>    Minor opcode of failed request:  30 (RenderSetPictureFilter)
>    Serial number of failed request:  48
>    Current serial number in output stream:  50
> 
> Tried to analyze existing code - in picom, but it uses xcb, yet I
> can't anything specific. The only difference - xcb function has
> different order for params number and array, plus filter name length.
> 
> I made assumption, that XFixes should take full 32bit range (signed),
> so just took maximum signed 32bit value and divided by 3.
> 
> Error mentions something called parameter attributes. Can't see
> anything, but values in function signature.


-- 
         -Alan Coopersmith-                 alan.coopersmith at oracle.com
          Oracle Solaris Engineering - https://blogs.oracle.com/solaris


More information about the freedesktop mailing list