[Glamor] [PATCH 5/8] glamor_largepixmap: Walkaround for large texture's upload.
zhigang.gong at linux.intel.com
zhigang.gong at linux.intel.com
Tue Jun 26 03:01:59 PDT 2012
From: Zhigang Gong <zhigang.gong at linux.intel.com>
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 at linux.intel.com>
---
src/glamor_pixmap.c | 6 +++++-
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 ad60c02..da0b7c9 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
--
1.7.4.4
More information about the Glamor
mailing list