From ea816fd6dbba878c74e1b428b3f8180020b4c214 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 1 Nov 2007 12:37:13 -0600 Subject: [PATCH] move dither kernels to xm_surface.c --- src/mesa/pipe/xlib/xm_span.c | 21 --------------------- src/mesa/pipe/xlib/xm_surface.c | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/mesa/pipe/xlib/xm_span.c b/src/mesa/pipe/xlib/xm_span.c index b3dbe6a..e5d3721 100644 --- a/src/mesa/pipe/xlib/xm_span.c +++ b/src/mesa/pipe/xlib/xm_span.c @@ -30,27 +30,6 @@ #include "xmesaP.h" - -/* - * Dithering kernels and lookup tables. - */ - -const int xmesa_kernel8[DITH_DY * DITH_DX] = { - 0 * MAXC, 8 * MAXC, 2 * MAXC, 10 * MAXC, - 12 * MAXC, 4 * MAXC, 14 * MAXC, 6 * MAXC, - 3 * MAXC, 11 * MAXC, 1 * MAXC, 9 * MAXC, - 15 * MAXC, 7 * MAXC, 13 * MAXC, 5 * MAXC, -}; - -const int xmesa_kernel1[16] = { - 0*47, 9*47, 4*47, 12*47, /* 47 = (255*3)/16 */ - 6*47, 2*47, 14*47, 8*47, - 10*47, 1*47, 5*47, 11*47, - 7*47, 13*47, 3*47, 15*47 -}; - - - /* * The following functions are used to trap XGetImage() calls which * generate BadMatch errors if the drawable isn't mapped. diff --git a/src/mesa/pipe/xlib/xm_surface.c b/src/mesa/pipe/xlib/xm_surface.c index c2a8fab..5018067 100644 --- a/src/mesa/pipe/xlib/xm_surface.c +++ b/src/mesa/pipe/xlib/xm_surface.c @@ -50,6 +50,26 @@ #include "state_tracker/st_context.h" +/* + * Dithering kernels and lookup tables. + */ + +const int xmesa_kernel8[DITH_DY * DITH_DX] = { + 0 * MAXC, 8 * MAXC, 2 * MAXC, 10 * MAXC, + 12 * MAXC, 4 * MAXC, 14 * MAXC, 6 * MAXC, + 3 * MAXC, 11 * MAXC, 1 * MAXC, 9 * MAXC, + 15 * MAXC, 7 * MAXC, 13 * MAXC, 5 * MAXC, +}; + +const int xmesa_kernel1[16] = { + 0*47, 9*47, 4*47, 12*47, /* 47 = (255*3)/16 */ + 6*47, 2*47, 14*47, 8*47, + 10*47, 1*47, 5*47, 11*47, + 7*47, 13*47, 3*47, 15*47 +}; + + + #define CLIP_TILE \ do { \ if (x + w > ps->width) \ -- 2.7.4