glamor-fbo-pool: Enable to reuse different size fbo/texture.

Fixup three special cases, one is in tile and the other is in
composite. Both cases are due to repeat texture issue. Maybe
we can refine the shader to recalculate texture coords to
support partial texture's repeating.

The third is when upload a memory pixmap to texture, as now
the texture may not have the exact size as the pixmap, we
should not use the full rect coords.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
Zhigang Gong 2012-01-20 09:59:44 +08:00 • committed by Eric Anholt
commit 9c6fd931a6
6 changed files with 140 additions and 20 deletions

View file

@ -164,7 +164,7 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
if (w == 0 || h == 0)
return pixmap;
fbo = glamor_create_fbo(glamor_priv, w, h, depth, 0);
fbo = glamor_create_fbo(glamor_priv, w, h, depth, usage);
if (fbo == NULL) {
fbDestroyPixmap(pixmap);