[fdo] Need help with XRenderSetPictureFilter

Nikita Zlobin cook60020tmp at mail.ru
Mon Feb 21 15:11:27 UTC 2022


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.


More information about the freedesktop mailing list