glamor: Fix segfault in fallback picture uploading.
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 a8r8g8b8. Signed-off-by: Eric Anholt <email@example.com> Reviewed-by: Michel Dänzer <firstname.lastname@example.org>
Showing with 9 additions and 7 deletions