/* There are a large number of possible ways to implement bitmap on * this hardware, most of them have some sort of drawback. Here are a * few that spring to mind: * * Blit: * - XY_MONO_SRC_BLT_CMD * - use XY_SETUP_CLIP_BLT for cliprect clipping. * - XY_TEXT_BLT * - XY_TEXT_IMMEDIATE_BLT * - blit per cliprect, subject to maximum immediate data size. * - XY_COLOR_BLT * - per pixel or run of pixels * - XY_PIXEL_BLT * - good for sparse bitmaps * * 3D engine: * - Point per pixel * - Translate bitmap to an alpha texture and render as a quad * - Chop bitmap up into 32x32 squares and render w/polygon stipple. */ void intelBitmap(struct gl_context * ctx, GLint x, GLint y, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *unpack, const GLubyte * pixels) { if (!_mesa_check_conditional_render(ctx)) return; if (do_blit_bitmap(ctx, x, y, width, height, unpack, pixels)) return; _mesa_meta_Bitmap(ctx, x, y, width, height, unpack, pixels); }
/* There are a large number of possible ways to implement bitmap on * this hardware, most of them have some sort of drawback. Here are a * few that spring to mind: * * Blit: * - XY_MONO_SRC_BLT_CMD * - use XY_SETUP_CLIP_BLT for cliprect clipping. * - XY_TEXT_BLT * - XY_TEXT_IMMEDIATE_BLT * - blit per cliprect, subject to maximum immediate data size. * - XY_COLOR_BLT * - per pixel or run of pixels * - XY_PIXEL_BLT * - good for sparse bitmaps * * 3D engine: * - Point per pixel * - Translate bitmap to an alpha texture and render as a quad * - Chop bitmap up into 32x32 squares and render w/polygon stipple. */ void intelBitmap(GLcontext * ctx, GLint x, GLint y, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *unpack, const GLubyte * pixels) { if (do_blit_bitmap(ctx, x, y, width, height, unpack, pixels)) return; if (INTEL_DEBUG & DEBUG_PIXEL) _mesa_printf("%s: fallback to swrast\n", __FUNCTION__); _swrast_Bitmap(ctx, x, y, width, height, unpack, pixels); }