• Eric Anholt's avatar
    glamor: Fix segfault in fallback picture uploading. · 9a597280
    Eric Anholt authored
    If the source/mask pixmap is a pixmap that doesn't have an FBO
    attached, and it doesn't match the Render operation's size, then we'll
    composite it to a CPU temporary (not sure why).  We would take the
    PictFormatShort from the source Picture, make a pixmap of that depth,
    and try to look up the PictFormat description from the depth and the
    PictFormatShort.  However, the screen's PictFormats are only attached
    to the screen's visuals' depths.  So, with an x2r10g10b10 short format
    (depth 30), we wouldn't find the screen's PictFormat for it
    (associated with depth 32).
    Instead of trying to look up from the screen, just use the pFormat
    that came from our source picture.  The only time we need to look up a
    PictFormat when we're doing non-shader gradients, which we put in
    Signed-off-by: default avatarEric Anholt <eric@anholt.net>
    Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
glamor_render.c 60.1 KB