diff options
-rw-r--r-- | src/sna/kgem.c | 4 | ||||
-rw-r--r-- | src/sna/sna.h | 1 | ||||
-rw-r--r-- | src/sna/sna_accel.c | 8 | ||||
-rw-r--r-- | src/sna/sna_glyphs.c | 2 |
4 files changed, 14 insertions, 1 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index b4798170..32187b1c 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -2993,6 +2993,10 @@ int kgem_choose_tiling(struct kgem *kgem, int tiling, int width, int height, int goto done; } } else { + /* XXX rendering to I915_TILING_Y seems broken? */ + if (kgem->gen < 50 && tiling == I915_TILING_Y) + tiling = I915_TILING_X; + if (width*bpp > (MAXSHORT-512) * 8) { DBG(("%s: large pitch [%d], forcing TILING_X\n", __FUNCTION__, width*bpp/8)); diff --git a/src/sna/sna.h b/src/sna/sna.h index 6028c4fd..9b93ed91 100644 --- a/src/sna/sna.h +++ b/src/sna/sna.h @@ -804,6 +804,7 @@ memcpy_xor(const void *src, void *dst, int bpp, #define SNA_CREATE_FB 0x10 #define SNA_CREATE_SCRATCH 0x11 +#define SNA_CREATE_GLYPHS 0x12 inline static bool is_power_of_two(unsigned x) { diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 2f49f12c..79514c52 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1170,6 +1170,14 @@ static PixmapPtr sna_create_pixmap(ScreenPtr screen, goto fallback; } + if (usage == SNA_CREATE_GLYPHS) { + if (flags & KGEM_CAN_CREATE_GPU) + return sna_pixmap_create_scratch(screen, + width, height, depth, + -I915_TILING_Y); + else + goto fallback; + } if (usage == SNA_CREATE_SCRATCH) { if (flags & KGEM_CAN_CREATE_GPU) return sna_pixmap_create_scratch(screen, diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index a58ddcf4..be1ce835 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -215,7 +215,7 @@ bool sna_glyphs_create(struct sna *sna) CACHE_PICTURE_SIZE, CACHE_PICTURE_SIZE, depth, - SNA_CREATE_SCRATCH); + SNA_CREATE_GLYPHS); if (!pixmap) goto bail; |