~ubuntu-branches/ubuntu/quantal/mesa/quantal

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/i915tex/intel_reg.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-02-21 12:44:07 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20070221124407-rgcacs32mycrtadl
ImportĀ upstreamĀ versionĀ 6.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**************************************************************************
 
2
 * 
 
3
 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
 
4
 * All Rights Reserved.
 
5
 * 
 
6
 * Permission is hereby granted, free of charge, to any person obtaining a
 
7
 * copy of this software and associated documentation files (the
 
8
 * "Software"), to deal in the Software without restriction, including
 
9
 * without limitation the rights to use, copy, modify, merge, publish,
 
10
 * distribute, sub license, and/or sell copies of the Software, and to
 
11
 * permit persons to whom the Software is furnished to do so, subject to
 
12
 * the following conditions:
 
13
 * 
 
14
 * The above copyright notice and this permission notice (including the
 
15
 * next paragraph) shall be included in all copies or substantial portions
 
16
 * of the Software.
 
17
 * 
 
18
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
19
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
20
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
 
21
 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
 
22
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 
23
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 
24
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
25
 * 
 
26
 **************************************************************************/
 
27
 
 
28
 
 
29
#ifndef _INTEL_REG_H_
 
30
#define _INTEL_REG_H_
 
31
 
 
32
 
 
33
 
 
34
#define CMD_3D (0x3<<29)
 
35
 
 
36
 
 
37
#define _3DPRIMITIVE         ((0x3<<29)|(0x1f<<24))
 
38
#define PRIM_INDIRECT            (1<<23)
 
39
#define PRIM_INLINE              (0<<23)
 
40
#define PRIM_INDIRECT_SEQUENTIAL (0<<17)
 
41
#define PRIM_INDIRECT_ELTS       (1<<17)
 
42
 
 
43
#define PRIM3D_TRILIST          (0x0<<18)
 
44
#define PRIM3D_TRISTRIP         (0x1<<18)
 
45
#define PRIM3D_TRISTRIP_RVRSE   (0x2<<18)
 
46
#define PRIM3D_TRIFAN           (0x3<<18)
 
47
#define PRIM3D_POLY             (0x4<<18)
 
48
#define PRIM3D_LINELIST         (0x5<<18)
 
49
#define PRIM3D_LINESTRIP        (0x6<<18)
 
50
#define PRIM3D_RECTLIST         (0x7<<18)
 
51
#define PRIM3D_POINTLIST        (0x8<<18)
 
52
#define PRIM3D_DIB              (0x9<<18)
 
53
#define PRIM3D_MASK             (0x1f<<18)
 
54
 
 
55
#define I915PACKCOLOR4444(r,g,b,a) \
 
56
  ((((a) & 0xf0) << 8) | (((r) & 0xf0) << 4) | ((g) & 0xf0) | ((b) >> 4))
 
57
 
 
58
#define I915PACKCOLOR1555(r,g,b,a) \
 
59
  ((((r) & 0xf8) << 7) | (((g) & 0xf8) << 2) | (((b) & 0xf8) >> 3) | \
 
60
    ((a) ? 0x8000 : 0))
 
61
 
 
62
#define I915PACKCOLOR565(r,g,b) \
 
63
  ((((r) & 0xf8) << 8) | (((g) & 0xfc) << 3) | (((b) & 0xf8) >> 3))
 
64
 
 
65
#define I915PACKCOLOR8888(r,g,b,a) \
 
66
  ((a<<24) | (r<<16) | (g<<8) | b)
 
67
 
 
68
 
 
69
 
 
70
 
 
71
#define BR00_BITBLT_CLIENT   0x40000000
 
72
#define BR00_OP_COLOR_BLT    0x10000000
 
73
#define BR00_OP_SRC_COPY_BLT 0x10C00000
 
74
#define BR13_SOLID_PATTERN   0x80000000
 
75
 
 
76
#define XY_COLOR_BLT_CMD                ((2<<29)|(0x50<<22)|0x4)
 
77
#define XY_COLOR_BLT_WRITE_ALPHA        (1<<21)
 
78
#define XY_COLOR_BLT_WRITE_RGB          (1<<20)
 
79
 
 
80
#define XY_SRC_COPY_BLT_CMD             ((2<<29)|(0x53<<22)|6)
 
81
#define XY_SRC_COPY_BLT_WRITE_ALPHA     (1<<21)
 
82
#define XY_SRC_COPY_BLT_WRITE_RGB       (1<<20)
 
83
 
 
84
#endif