diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2012-06-26 13:09:05 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2012-07-03 18:30:15 +0800 |
commit | e44ce79d719ece8997c777329834c5293fc668b8 (patch) | |
tree | a368f695332a56ac9cb08cb112a9a6d5ffb77743 | |
parent | fc3674fbf40cbe5ddb3e3a29ce86be7db743892b (diff) |
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 <zhigang.gong@linux.intel.com>
-rw-r--r-- | src/glamor_pixmap.c | 6 | ||||
-rw-r--r-- | src/glamor_priv.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/glamor_pixmap.c b/src/glamor_pixmap.c index ce243ab..10066a6 100644 --- a/src/glamor_pixmap.c +++ b/src/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/src/glamor_priv.h b/src/glamor_priv.h index 4fad5cd..642aff6 100644 --- a/src/glamor_priv.h +++ b/src/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 |