glamor_pixmap_ensure_fbo: Should allocate tex if we don't have one.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
Zhigang Gong 2012-04-13 13:45:42 +08:00 committed by Eric Anholt
parent cf0e206a0f
commit 428f2a3f58

View File

@ -527,7 +527,7 @@ glamor_pixmap_ensure_fbo(PixmapPtr pixmap, GLenum format, int flag)
glamor_pixmap_attach_fbo(pixmap, fbo);
} else {
/* We do have a fbo, but it may lack of fb or tex. */
if (pixmap_priv->fbo->tex)
if (!pixmap_priv->fbo->tex)
pixmap_priv->fbo->tex = _glamor_create_tex(glamor_priv, pixmap->drawable.width,
pixmap->drawable.height, format);