From 682f5d2989306856c0c193b0b4abd8c104a9ba92 Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Tue, 26 Jun 2012 13:09:05 +0800 Subject: [PATCH] glamor_largepixmap: Walkaround for large texture's upload. I met a problem with large texture (larger than 7000x7000)'s uploading on SNB platform. The map_gtt get back a mapped VA without error, but write to that virtual address triggers BUS error. This work around is to avoid that direct uploading. Signed-off-by: Zhigang Gong --- glamor/glamor_pixmap.c | 6 +++++- glamor/glamor_priv.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c index ce243abcf..10066a6b5 100644 --- a/glamor/glamor_pixmap.c +++ b/glamor/glamor_pixmap.c @@ -497,7 +497,11 @@ ready_to_upload: if (no_alpha == 0 && revert == REVERT_NONE && swap_rb == SWAP_NONE_UPLOADING - && !need_flip) { + && !need_flip +#ifdef WALKAROUND_LARGE_TEXTURE_MAP + && pixmap_priv->type != GLAMOR_TEXTURE_LARGE +#endif + ) { int fbo_x_off, fbo_y_off; assert(pixmap_priv->base.fbo->tex); pixmap_priv_get_fbo_off(pixmap_priv, &fbo_x_off, &fbo_y_off); diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index 4fad5cd3b..642aff68c 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -1001,6 +1001,7 @@ glamor_poly_line(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, //#define GLAMOR_TRAPEZOID_SHADER #endif #define GLAMOR_TEXTURED_LARGE_PIXMAP 1 +#define WALKAROUND_LARGE_TEXTURE_MAP #if 0 #define MAX_FBO_SIZE 32 /* For test purpose only. */ #endif