Back to home page

OSCL-LXR

 
 

    


0001 
0002  /***************************************************************************\
0003 |*                                                                           *|
0004 |*       Copyright 2003 NVIDIA, Corporation.  All rights reserved.           *|
0005 |*                                                                           *|
0006 |*     NOTICE TO USER:   The source code  is copyrighted under  U.S. and     *|
0007 |*     international laws.  Users and possessors of this source code are     *|
0008 |*     hereby granted a nonexclusive,  royalty-free copyright license to     *|
0009 |*     use this code in individual and commercial software.                  *|
0010 |*                                                                           *|
0011 |*     Any use of this source code must include,  in the user documenta-     *|
0012 |*     tion and  internal comments to the code,  notices to the end user     *|
0013 |*     as follows:                                                           *|
0014 |*                                                                           *|
0015 |*       Copyright 2003 NVIDIA, Corporation.  All rights reserved.           *|
0016 |*                                                                           *|
0017 |*     NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY     *|
0018 |*     OF  THIS SOURCE  CODE  FOR ANY PURPOSE.  IT IS  PROVIDED  "AS IS"     *|
0019 |*     WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  NVIDIA, CORPOR-     *|
0020 |*     ATION DISCLAIMS ALL WARRANTIES  WITH REGARD  TO THIS SOURCE CODE,     *|
0021 |*     INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE-     *|
0022 |*     MENT,  AND FITNESS  FOR A PARTICULAR PURPOSE.   IN NO EVENT SHALL     *|
0023 |*     NVIDIA, CORPORATION  BE LIABLE FOR ANY SPECIAL,  INDIRECT,  INCI-     *|
0024 |*     DENTAL, OR CONSEQUENTIAL DAMAGES,  OR ANY DAMAGES  WHATSOEVER RE-     *|
0025 |*     SULTING FROM LOSS OF USE,  DATA OR PROFITS,  WHETHER IN AN ACTION     *|
0026 |*     OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,  ARISING OUT OF     *|
0027 |*     OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE.     *|
0028 |*                                                                           *|
0029 |*     U.S. Government  End  Users.   This source code  is a "commercial     *|
0030 |*     item,"  as that  term is  defined at  48 C.F.R. 2.101 (OCT 1995),     *|
0031 |*     consisting  of "commercial  computer  software"  and  "commercial     *|
0032 |*     computer  software  documentation,"  as such  terms  are  used in     *|
0033 |*     48 C.F.R. 12.212 (SEPT 1995)  and is provided to the U.S. Govern-     *|
0034 |*     ment only as  a commercial end item.   Consistent with  48 C.F.R.     *|
0035 |*     12.212 and  48 C.F.R. 227.7202-1 through  227.7202-4 (JUNE 1995),     *|
0036 |*     all U.S. Government End Users  acquire the source code  with only     *|
0037 |*     those rights set forth herein.                                        *|
0038 |*                                                                           *|
0039  \***************************************************************************/
0040 
0041 /*
0042  * GPL Licensing Note - According to Mark Vojkovich, author of the Xorg/
0043  * XFree86 'nv' driver, this source code is provided under MIT-style licensing
0044  * where the source code is provided "as is" without warranty of any kind.
0045  * The only usage restriction is for the copyright notices to be retained
0046  * whenever code is used.
0047  *
0048  * Antonino Daplas <adaplas@pol.net> 2005-03-11
0049  */
0050 
0051 #define SURFACE_FORMAT                                              0x00000300
0052 #define SURFACE_FORMAT_DEPTH8                                       0x00000001
0053 #define SURFACE_FORMAT_DEPTH15                                      0x00000002
0054 #define SURFACE_FORMAT_DEPTH16                                      0x00000004
0055 #define SURFACE_FORMAT_DEPTH24                                      0x00000006
0056 #define SURFACE_PITCH                                               0x00000304
0057 #define SURFACE_PITCH_SRC                                           15:0
0058 #define SURFACE_PITCH_DST                                           31:16
0059 #define SURFACE_OFFSET_SRC                                          0x00000308
0060 #define SURFACE_OFFSET_DST                                          0x0000030C
0061 
0062 #define ROP_SET                                                     0x00002300
0063 
0064 #define PATTERN_FORMAT                                              0x00004300
0065 #define PATTERN_FORMAT_DEPTH8                                       0x00000003
0066 #define PATTERN_FORMAT_DEPTH16                                      0x00000001
0067 #define PATTERN_FORMAT_DEPTH24                                      0x00000003
0068 #define PATTERN_COLOR_0                                             0x00004310
0069 #define PATTERN_COLOR_1                                             0x00004314
0070 #define PATTERN_PATTERN_0                                           0x00004318
0071 #define PATTERN_PATTERN_1                                           0x0000431C
0072 
0073 #define CLIP_POINT                                                  0x00006300
0074 #define CLIP_POINT_X                                                15:0
0075 #define CLIP_POINT_Y                                                31:16
0076 #define CLIP_SIZE                                                   0x00006304
0077 #define CLIP_SIZE_WIDTH                                             15:0
0078 #define CLIP_SIZE_HEIGHT                                            31:16
0079 
0080 #define LINE_FORMAT                                                 0x00008300
0081 #define LINE_FORMAT_DEPTH8                                          0x00000003
0082 #define LINE_FORMAT_DEPTH16                                         0x00000001
0083 #define LINE_FORMAT_DEPTH24                                         0x00000003
0084 #define LINE_COLOR                                                  0x00008304
0085 #define LINE_MAX_LINES                                              16
0086 #define LINE_LINES(i)                                               0x00008400\
0087                                                                     +(i)*8
0088 #define LINE_LINES_POINT0_X                                         15:0
0089 #define LINE_LINES_POINT0_Y                                         31:16
0090 #define LINE_LINES_POINT1_X                                         47:32
0091 #define LINE_LINES_POINT1_Y                                         63:48
0092 
0093 #define BLIT_POINT_SRC                                              0x0000A300
0094 #define BLIT_POINT_SRC_X                                            15:0
0095 #define BLIT_POINT_SRC_Y                                            31:16
0096 #define BLIT_POINT_DST                                              0x0000A304
0097 #define BLIT_POINT_DST_X                                            15:0
0098 #define BLIT_POINT_DST_Y                                            31:16
0099 #define BLIT_SIZE                                                   0x0000A308
0100 #define BLIT_SIZE_WIDTH                                             15:0
0101 #define BLIT_SIZE_HEIGHT                                            31:16
0102 
0103 #define RECT_FORMAT                                                 0x0000C300
0104 #define RECT_FORMAT_DEPTH8                                          0x00000003
0105 #define RECT_FORMAT_DEPTH16                                         0x00000001
0106 #define RECT_FORMAT_DEPTH24                                         0x00000003
0107 #define RECT_SOLID_COLOR                                            0x0000C3FC
0108 #define RECT_SOLID_RECTS_MAX_RECTS                                  32
0109 #define RECT_SOLID_RECTS(i)                                         0x0000C400\
0110                                                                     +(i)*8
0111 #define RECT_SOLID_RECTS_Y                                          15:0
0112 #define RECT_SOLID_RECTS_X                                          31:16
0113 #define RECT_SOLID_RECTS_HEIGHT                                     47:32
0114 #define RECT_SOLID_RECTS_WIDTH                                      63:48
0115 
0116 #define RECT_EXPAND_ONE_COLOR_CLIP                                  0x0000C7EC
0117 #define RECT_EXPAND_ONE_COLOR_CLIP_POINT0_X                         15:0
0118 #define RECT_EXPAND_ONE_COLOR_CLIP_POINT0_Y                         31:16
0119 #define RECT_EXPAND_ONE_COLOR_CLIP_POINT1_X                         47:32
0120 #define RECT_EXPAND_ONE_COLOR_CLIP_POINT1_Y                         63:48
0121 #define RECT_EXPAND_ONE_COLOR_COLOR                                 0x0000C7F4
0122 #define RECT_EXPAND_ONE_COLOR_SIZE                                  0x0000C7F8
0123 #define RECT_EXPAND_ONE_COLOR_SIZE_WIDTH                            15:0
0124 #define RECT_EXPAND_ONE_COLOR_SIZE_HEIGHT                           31:16
0125 #define RECT_EXPAND_ONE_COLOR_POINT                                 0x0000C7FC
0126 #define RECT_EXPAND_ONE_COLOR_POINT_X                               15:0
0127 #define RECT_EXPAND_ONE_COLOR_POINT_Y                               31:16
0128 #define RECT_EXPAND_ONE_COLOR_DATA_MAX_DWORDS                       128
0129 #define RECT_EXPAND_ONE_COLOR_DATA(i)                               0x0000C800\
0130                                                                     +(i)*4
0131 
0132 #define RECT_EXPAND_TWO_COLOR_CLIP                                  0x0000CBE4
0133 #define RECT_EXPAND_TWO_COLOR_CLIP_POINT0_X                         15:0
0134 #define RECT_EXPAND_TWO_COLOR_CLIP_POINT0_Y                         31:16
0135 #define RECT_EXPAND_TWO_COLOR_CLIP_POINT1_X                         47:32
0136 #define RECT_EXPAND_TWO_COLOR_CLIP_POINT1_Y                         63:48
0137 #define RECT_EXPAND_TWO_COLOR_COLOR_0                               0x0000CBEC
0138 #define RECT_EXPAND_TWO_COLOR_COLOR_1                               0x0000CBF0
0139 #define RECT_EXPAND_TWO_COLOR_SIZE_IN                               0x0000CBF4
0140 #define RECT_EXPAND_TWO_COLOR_SIZE_IN_WIDTH                         15:0
0141 #define RECT_EXPAND_TWO_COLOR_SIZE_IN_HEIGHT                        31:16
0142 #define RECT_EXPAND_TWO_COLOR_SIZE_OUT                              0x0000CBF8
0143 #define RECT_EXPAND_TWO_COLOR_SIZE_OUT_WIDTH                        15:0
0144 #define RECT_EXPAND_TWO_COLOR_SIZE_OUT_HEIGHT                       31:16
0145 #define RECT_EXPAND_TWO_COLOR_POINT                                 0x0000CBFC
0146 #define RECT_EXPAND_TWO_COLOR_POINT_X                               15:0
0147 #define RECT_EXPAND_TWO_COLOR_POINT_Y                               31:16
0148 #define RECT_EXPAND_TWO_COLOR_DATA_MAX_DWORDS                       128
0149 #define RECT_EXPAND_TWO_COLOR_DATA(i)                               0x0000CC00\
0150                                                                     +(i)*4
0151 
0152 #define STRETCH_BLIT_FORMAT                                         0x0000E300
0153 #define STRETCH_BLIT_FORMAT_DEPTH8                                  0x00000004
0154 #define STRETCH_BLIT_FORMAT_DEPTH16                                 0x00000007
0155 #define STRETCH_BLIT_FORMAT_DEPTH24                                 0x00000004
0156 #define STRETCH_BLIT_FORMAT_X8R8G8B8                                0x00000004
0157 #define STRETCH_BLIT_FORMAT_YUYV                                    0x00000005
0158 #define STRETCH_BLIT_FORMAT_UYVY                                    0x00000006
0159 #define STRETCH_BLIT_CLIP_POINT                                     0x0000E308
0160 #define STRETCH_BLIT_CLIP_POINT_X                                   15:0
0161 #define STRETCH_BLIT_CLIP_POINT_Y                                   31:16
0162 #define STRETCH_BLIT_CLIP_POINT                                     0x0000E308
0163 #define STRETCH_BLIT_CLIP_SIZE                                      0x0000E30C
0164 #define STRETCH_BLIT_CLIP_SIZE_WIDTH                                15:0
0165 #define STRETCH_BLIT_CLIP_SIZE_HEIGHT                               31:16
0166 #define STRETCH_BLIT_DST_POINT                                      0x0000E310
0167 #define STRETCH_BLIT_DST_POINT_X                                    15:0
0168 #define STRETCH_BLIT_DST_POINT_Y                                    31:16
0169 #define STRETCH_BLIT_DST_SIZE                                       0x0000E314
0170 #define STRETCH_BLIT_DST_SIZE_WIDTH                                 15:0
0171 #define STRETCH_BLIT_DST_SIZE_HEIGHT                                31:16
0172 #define STRETCH_BLIT_DU_DX                                          0x0000E318
0173 #define STRETCH_BLIT_DV_DY                                          0x0000E31C
0174 #define STRETCH_BLIT_SRC_SIZE                                       0x0000E400
0175 #define STRETCH_BLIT_SRC_SIZE_WIDTH                                 15:0
0176 #define STRETCH_BLIT_SRC_SIZE_HEIGHT                                31:16
0177 #define STRETCH_BLIT_SRC_FORMAT                                     0x0000E404
0178 #define STRETCH_BLIT_SRC_FORMAT_PITCH                               15:0
0179 #define STRETCH_BLIT_SRC_FORMAT_ORIGIN                              23:16
0180 #define STRETCH_BLIT_SRC_FORMAT_ORIGIN_CENTER                       0x00000001
0181 #define STRETCH_BLIT_SRC_FORMAT_ORIGIN_CORNER                       0x00000002
0182 #define STRETCH_BLIT_SRC_FORMAT_FILTER                              31:24
0183 #define STRETCH_BLIT_SRC_FORMAT_FILTER_POINT_SAMPLE                 0x00000000
0184 #define STRETCH_BLIT_SRC_FORMAT_FILTER_BILINEAR                     0x00000001
0185 #define STRETCH_BLIT_SRC_OFFSET                                     0x0000E408
0186 #define STRETCH_BLIT_SRC_POINT                                      0x0000E40C
0187 #define STRETCH_BLIT_SRC_POINT_U                                    15:0
0188 #define STRETCH_BLIT_SRC_POINT_V                                    31:16