diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2012-04-16 22:17:17 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2012-04-16 22:17:17 +0000 |
commit | 6681badfeb6698b66e207e59e79ba4432fe8b736 (patch) | |
tree | 7c3b7de955989d81e595ee129b7afdb48e94f9c3 /sys/arch/sgi/xbow | |
parent | a314dfc9c71f52de7c419ab26fdc3fa093cb40fc (diff) |
Move OpenGL {logic,raster}ops defines to a separate file, to avoid duplicating
these among frame buffer drivers. No functional change.
Diffstat (limited to 'sys/arch/sgi/xbow')
-rw-r--r-- | sys/arch/sgi/xbow/impact.c | 11 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/impactreg.h | 23 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/odyssey.c | 11 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/odysseyreg.h | 21 |
4 files changed, 14 insertions, 52 deletions
diff --git a/sys/arch/sgi/xbow/impact.c b/sys/arch/sgi/xbow/impact.c index a6ac28908da..1bd7fe38f04 100644 --- a/sys/arch/sgi/xbow/impact.c +++ b/sys/arch/sgi/xbow/impact.c @@ -1,4 +1,4 @@ -/* $OpenBSD: impact.c,v 1.6 2010/04/06 19:12:34 miod Exp $ */ +/* $OpenBSD: impact.c,v 1.7 2012/04/16 22:17:16 miod Exp $ */ /* * Copyright (c) 2010 Miodrag Vallat. @@ -24,7 +24,7 @@ /* * The details regarding the design and operation of this hardware, along with * the necessary magic numbers, are only available thanks to the reverse - * engineering work undertaken by Stanislaw Skowronek <skylark@linux-mips.org>. + * engineering work undertaken by Stanislaw Skowronek <skylark@linux-mips.org>. */ /* @@ -53,6 +53,7 @@ #include <mips64/arcbios.h> +#include <sgi/dev/gl.h> #include <sgi/xbow/impactreg.h> #include <sgi/xbow/impactvar.h> #include <sgi/xbow/widget.h> @@ -125,7 +126,7 @@ int impact_erasecols(void *, int, int, int, long); int impact_copyrows(void *, int, int, int); int impact_eraserows(void *, int, int, long); -/* +/* * Interfaces for wscons. */ int impact_ioctl(void *, u_long, caddr_t, int, struct proc *); @@ -367,7 +368,7 @@ impact_cmd_fifo_wait(struct impact_screen *scr) } val = bus_space_read_4(scr->iot, scr->ioh, IMPACTSR_FIFOSTATUS); } - + return 0; } @@ -517,7 +518,7 @@ impact_putchar(void *cookie, int row, int col, u_int uc, long attr) cell = scr->bs + row * ri->ri_cols + col; cell->uc = uc; cell->attr = attr; - + w = font->fontwidth; h = font->fontheight; x = ri->ri_xorigin + col * w; diff --git a/sys/arch/sgi/xbow/impactreg.h b/sys/arch/sgi/xbow/impactreg.h index ad9cb4df0dd..199bbe7305f 100644 --- a/sys/arch/sgi/xbow/impactreg.h +++ b/sys/arch/sgi/xbow/impactreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: impactreg.h,v 1.1 2010/03/07 21:26:24 miod Exp $ */ +/* $OpenBSD: impactreg.h,v 1.2 2012/04/16 22:17:16 miod Exp $ */ /* * Copyright (c) 2010 Miodrag Vallat. * Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org> @@ -95,24 +95,3 @@ #define IMPACTSR_YXCOORDS(x,y) (((y) << 16) | (x)) #define IMPACTSR_PP1FILLMODE(mode,op) ((mode) | ((op) << 26)) - -/* - * Logic Operations - */ - -#define OPENGL_LOGIC_OP_CLEAR 0 -#define OPENGL_LOGIC_OP_AND 1 -#define OPENGL_LOGIC_OP_AND_REVERSE 2 -#define OPENGL_LOGIC_OP_COPY 3 -#define OPENGL_LOGIC_OP_AND_INVERTED 4 -#define OPENGL_LOGIC_OP_NOOP 5 -#define OPENGL_LOGIC_OP_XOR 6 -#define OPENGL_LOGIC_OP_OR 7 -#define OPENGL_LOGIC_OP_NOR 8 -#define OPENGL_LOGIC_OP_EQUIV 9 -#define OPENGL_LOGIC_OP_INVERT 10 -#define OPENGL_LOGIC_OP_OR_REVERSE 11 -#define OPENGL_LOGIC_OP_COPY_INVERTED 12 -#define OPENGL_LOGIC_OP_OR_INVERTED 13 -#define OPENGL_LOGIC_OP_NAND 14 -#define OPENGL_LOGIC_OP_SET 15 diff --git a/sys/arch/sgi/xbow/odyssey.c b/sys/arch/sgi/xbow/odyssey.c index 36abd2c9cfe..a47ac3d715b 100644 --- a/sys/arch/sgi/xbow/odyssey.c +++ b/sys/arch/sgi/xbow/odyssey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: odyssey.c,v 1.6 2010/04/07 18:16:03 miod Exp $ */ +/* $OpenBSD: odyssey.c,v 1.7 2012/04/16 22:17:16 miod Exp $ */ /* * Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org> * @@ -22,7 +22,7 @@ /* * The details regarding the design and operation of this hardware, along with * the necessary magic numbers, are only available thanks to the reverse - * engineering work undertaken by Stanislaw Skowronek <skylark@linux-mips.org>. + * engineering work undertaken by Stanislaw Skowronek <skylark@linux-mips.org>. */ #include <sys/param.h> @@ -36,6 +36,7 @@ #include <mips64/arcbios.h> +#include <sgi/dev/gl.h> #include <sgi/xbow/odysseyreg.h> #include <sgi/xbow/odysseyvar.h> #include <sgi/xbow/widget.h> @@ -118,7 +119,7 @@ int odyssey_eraserows(void *, int, int, long); u_int32_t ieee754_sp(int32_t); -/* +/* * Interfaces for wscons. */ int odyssey_ioctl(void *, u_long, caddr_t, int, struct proc *); @@ -896,7 +897,7 @@ odyssey_putchar(void *cookie, int row, int col, u_int uc, long attr) (l << 10))); } - + if (font->fontwidth > 8) ci = (chunk & (1 << (16 - j)) ? fg : bg); else @@ -904,7 +905,7 @@ odyssey_putchar(void *cookie, int row, int col, u_int uc, long attr) bus_space_write_4(sc->iot, sc->ioh, ODYSSEY_CMD_FIFO, ri->ri_devcmap[ci]); - + l--; } } diff --git a/sys/arch/sgi/xbow/odysseyreg.h b/sys/arch/sgi/xbow/odysseyreg.h index 5464cb2efaf..9bc36378366 100644 --- a/sys/arch/sgi/xbow/odysseyreg.h +++ b/sys/arch/sgi/xbow/odysseyreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: odysseyreg.h,v 1.1 2010/03/04 14:50:35 jsing Exp $ */ +/* $OpenBSD: odysseyreg.h,v 1.2 2012/04/16 22:17:16 miod Exp $ */ /* * Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org> * @@ -41,22 +41,3 @@ #define OPENGL_COLOR_3UB 0xc580cc08 #define OPENGL_QUADS 0x00000007 - -/* Logic Operations. */ -#define OPENGL_LOGIC_OP_CLEAR 0 -#define OPENGL_LOGIC_OP_AND 1 -#define OPENGL_LOGIC_OP_AND_REVERSE 2 -#define OPENGL_LOGIC_OP_COPY 3 -#define OPENGL_LOGIC_OP_AND_INVERTED 4 -#define OPENGL_LOGIC_OP_NOOP 5 -#define OPENGL_LOGIC_OP_XOR 6 -#define OPENGL_LOGIC_OP_OR 7 -#define OPENGL_LOGIC_OP_NOR 8 -#define OPENGL_LOGIC_OP_EQUIV 9 -#define OPENGL_LOGIC_OP_INVERT 10 -#define OPENGL_LOGIC_OP_OR_REVERSE 11 -#define OPENGL_LOGIC_OP_COPY_INVERTED 12 -#define OPENGL_LOGIC_OP_OR_INVERTED 13 -#define OPENGL_LOGIC_OP_NAND 14 -#define OPENGL_LOGIC_OP_SET 15 - |