diff --git a/glamor/glamor.c b/glamor/glamor.c index 42e398646..be5999a0c 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -108,7 +108,7 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth, if (w > 32767 || h > 32767) return NullPixmap; - if (w > MAX_WIDTH || h > MAX_HEIGHT) { + if (w > MAX_WIDTH || h > MAX_HEIGHT || ( depth == 1 && w != 0 && h != 0)) { /* MESA can only support upto MAX_WIDTH*MAX_HEIGHT fbo. If we exceed such limitation, we have to use framebuffer.*/ type = GLAMOR_FB; @@ -117,7 +117,8 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth, (((w * pixmap->drawable.bitsPerPixel + 7) / 8) + 3) & ~3, NULL); - ErrorF("fallback to software fb for pixmap %p , %d x %d \n", pixmap, w, h); + + glamor_fallback("fallback to software fb for pixmap %p , %d x %d depth %d\n", pixmap, w, h, depth); } else pixmap = fbCreatePixmap (screen, 0, 0, depth, usage); diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c index 0bfa7600a..14031d276 100644 --- a/glamor/glamor_core.c +++ b/glamor/glamor_core.c @@ -309,13 +309,8 @@ glamor_prepare_access(DrawablePtr drawable, glamor_access_t access) stride = pixmap->devKind; row_length = (stride * 8) / pixmap->drawable.bitsPerPixel; - + assert(drawable->depth != 1); switch (drawable->depth) { - case 1: - format = GL_ALPHA; - type = GL_UNSIGNED_BYTE; - row_length = stride; - break; case 8: format = GL_ALPHA; type = GL_UNSIGNED_BYTE; @@ -485,14 +480,10 @@ glamor_load_texture_pixmap(PixmapPtr pixmap) else ptexcoords = texcoords; + assert(pixmap->drawable.depth != 1); stride = pixmap->devKind; row_length = (stride * 8) / pixmap->drawable.bitsPerPixel; switch (pixmap->drawable.depth) { - case 1: - format = GL_COLOR_INDEX; - type = GL_BITMAP; - row_length = stride; - break; case 8: format = GL_ALPHA; type = GL_UNSIGNED_BYTE;