18c2ecf20Sopenharmony_ci
28c2ecf20Sopenharmony_ci /***************************************************************************\
38c2ecf20Sopenharmony_ci|*                                                                           *|
48c2ecf20Sopenharmony_ci|*       Copyright 2003 NVIDIA, Corporation.  All rights reserved.           *|
58c2ecf20Sopenharmony_ci|*                                                                           *|
68c2ecf20Sopenharmony_ci|*     NOTICE TO USER:   The source code  is copyrighted under  U.S. and     *|
78c2ecf20Sopenharmony_ci|*     international laws.  Users and possessors of this source code are     *|
88c2ecf20Sopenharmony_ci|*     hereby granted a nonexclusive,  royalty-free copyright license to     *|
98c2ecf20Sopenharmony_ci|*     use this code in individual and commercial software.                  *|
108c2ecf20Sopenharmony_ci|*                                                                           *|
118c2ecf20Sopenharmony_ci|*     Any use of this source code must include,  in the user documenta-     *|
128c2ecf20Sopenharmony_ci|*     tion and  internal comments to the code,  notices to the end user     *|
138c2ecf20Sopenharmony_ci|*     as follows:                                                           *|
148c2ecf20Sopenharmony_ci|*                                                                           *|
158c2ecf20Sopenharmony_ci|*       Copyright 2003 NVIDIA, Corporation.  All rights reserved.           *|
168c2ecf20Sopenharmony_ci|*                                                                           *|
178c2ecf20Sopenharmony_ci|*     NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY     *|
188c2ecf20Sopenharmony_ci|*     OF  THIS SOURCE  CODE  FOR ANY PURPOSE.  IT IS  PROVIDED  "AS IS"     *|
198c2ecf20Sopenharmony_ci|*     WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  NVIDIA, CORPOR-     *|
208c2ecf20Sopenharmony_ci|*     ATION DISCLAIMS ALL WARRANTIES  WITH REGARD  TO THIS SOURCE CODE,     *|
218c2ecf20Sopenharmony_ci|*     INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE-     *|
228c2ecf20Sopenharmony_ci|*     MENT,  AND FITNESS  FOR A PARTICULAR PURPOSE.   IN NO EVENT SHALL     *|
238c2ecf20Sopenharmony_ci|*     NVIDIA, CORPORATION  BE LIABLE FOR ANY SPECIAL,  INDIRECT,  INCI-     *|
248c2ecf20Sopenharmony_ci|*     DENTAL, OR CONSEQUENTIAL DAMAGES,  OR ANY DAMAGES  WHATSOEVER RE-     *|
258c2ecf20Sopenharmony_ci|*     SULTING FROM LOSS OF USE,  DATA OR PROFITS,  WHETHER IN AN ACTION     *|
268c2ecf20Sopenharmony_ci|*     OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,  ARISING OUT OF     *|
278c2ecf20Sopenharmony_ci|*     OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE.     *|
288c2ecf20Sopenharmony_ci|*                                                                           *|
298c2ecf20Sopenharmony_ci|*     U.S. Government  End  Users.   This source code  is a "commercial     *|
308c2ecf20Sopenharmony_ci|*     item,"  as that  term is  defined at  48 C.F.R. 2.101 (OCT 1995),     *|
318c2ecf20Sopenharmony_ci|*     consisting  of "commercial  computer  software"  and  "commercial     *|
328c2ecf20Sopenharmony_ci|*     computer  software  documentation,"  as such  terms  are  used in     *|
338c2ecf20Sopenharmony_ci|*     48 C.F.R. 12.212 (SEPT 1995)  and is provided to the U.S. Govern-     *|
348c2ecf20Sopenharmony_ci|*     ment only as  a commercial end item.   Consistent with  48 C.F.R.     *|
358c2ecf20Sopenharmony_ci|*     12.212 and  48 C.F.R. 227.7202-1 through  227.7202-4 (JUNE 1995),     *|
368c2ecf20Sopenharmony_ci|*     all U.S. Government End Users  acquire the source code  with only     *|
378c2ecf20Sopenharmony_ci|*     those rights set forth herein.                                        *|
388c2ecf20Sopenharmony_ci|*                                                                           *|
398c2ecf20Sopenharmony_ci \***************************************************************************/
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci/*
428c2ecf20Sopenharmony_ci * GPL Licensing Note - According to Mark Vojkovich, author of the Xorg/
438c2ecf20Sopenharmony_ci * XFree86 'nv' driver, this source code is provided under MIT-style licensing
448c2ecf20Sopenharmony_ci * where the source code is provided "as is" without warranty of any kind.
458c2ecf20Sopenharmony_ci * The only usage restriction is for the copyright notices to be retained
468c2ecf20Sopenharmony_ci * whenever code is used.
478c2ecf20Sopenharmony_ci *
488c2ecf20Sopenharmony_ci * Antonino Daplas <adaplas@pol.net> 2005-03-11
498c2ecf20Sopenharmony_ci */
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci#define SURFACE_FORMAT                                              0x00000300
528c2ecf20Sopenharmony_ci#define SURFACE_FORMAT_DEPTH8                                       0x00000001
538c2ecf20Sopenharmony_ci#define SURFACE_FORMAT_DEPTH15                                      0x00000002
548c2ecf20Sopenharmony_ci#define SURFACE_FORMAT_DEPTH16                                      0x00000004
558c2ecf20Sopenharmony_ci#define SURFACE_FORMAT_DEPTH24                                      0x00000006
568c2ecf20Sopenharmony_ci#define SURFACE_PITCH                                               0x00000304
578c2ecf20Sopenharmony_ci#define SURFACE_PITCH_SRC                                           15:0
588c2ecf20Sopenharmony_ci#define SURFACE_PITCH_DST                                           31:16
598c2ecf20Sopenharmony_ci#define SURFACE_OFFSET_SRC                                          0x00000308
608c2ecf20Sopenharmony_ci#define SURFACE_OFFSET_DST                                          0x0000030C
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci#define ROP_SET                                                     0x00002300
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci#define PATTERN_FORMAT                                              0x00004300
658c2ecf20Sopenharmony_ci#define PATTERN_FORMAT_DEPTH8                                       0x00000003
668c2ecf20Sopenharmony_ci#define PATTERN_FORMAT_DEPTH16                                      0x00000001
678c2ecf20Sopenharmony_ci#define PATTERN_FORMAT_DEPTH24                                      0x00000003
688c2ecf20Sopenharmony_ci#define PATTERN_COLOR_0                                             0x00004310
698c2ecf20Sopenharmony_ci#define PATTERN_COLOR_1                                             0x00004314
708c2ecf20Sopenharmony_ci#define PATTERN_PATTERN_0                                           0x00004318
718c2ecf20Sopenharmony_ci#define PATTERN_PATTERN_1                                           0x0000431C
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci#define CLIP_POINT                                                  0x00006300
748c2ecf20Sopenharmony_ci#define CLIP_POINT_X                                                15:0
758c2ecf20Sopenharmony_ci#define CLIP_POINT_Y                                                31:16
768c2ecf20Sopenharmony_ci#define CLIP_SIZE                                                   0x00006304
778c2ecf20Sopenharmony_ci#define CLIP_SIZE_WIDTH                                             15:0
788c2ecf20Sopenharmony_ci#define CLIP_SIZE_HEIGHT                                            31:16
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci#define LINE_FORMAT                                                 0x00008300
818c2ecf20Sopenharmony_ci#define LINE_FORMAT_DEPTH8                                          0x00000003
828c2ecf20Sopenharmony_ci#define LINE_FORMAT_DEPTH16                                         0x00000001
838c2ecf20Sopenharmony_ci#define LINE_FORMAT_DEPTH24                                         0x00000003
848c2ecf20Sopenharmony_ci#define LINE_COLOR                                                  0x00008304
858c2ecf20Sopenharmony_ci#define LINE_MAX_LINES                                              16
868c2ecf20Sopenharmony_ci#define LINE_LINES(i)                                               0x00008400\
878c2ecf20Sopenharmony_ci                                                                    +(i)*8
888c2ecf20Sopenharmony_ci#define LINE_LINES_POINT0_X                                         15:0
898c2ecf20Sopenharmony_ci#define LINE_LINES_POINT0_Y                                         31:16
908c2ecf20Sopenharmony_ci#define LINE_LINES_POINT1_X                                         47:32
918c2ecf20Sopenharmony_ci#define LINE_LINES_POINT1_Y                                         63:48
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ci#define BLIT_POINT_SRC                                              0x0000A300
948c2ecf20Sopenharmony_ci#define BLIT_POINT_SRC_X                                            15:0
958c2ecf20Sopenharmony_ci#define BLIT_POINT_SRC_Y                                            31:16
968c2ecf20Sopenharmony_ci#define BLIT_POINT_DST                                              0x0000A304
978c2ecf20Sopenharmony_ci#define BLIT_POINT_DST_X                                            15:0
988c2ecf20Sopenharmony_ci#define BLIT_POINT_DST_Y                                            31:16
998c2ecf20Sopenharmony_ci#define BLIT_SIZE                                                   0x0000A308
1008c2ecf20Sopenharmony_ci#define BLIT_SIZE_WIDTH                                             15:0
1018c2ecf20Sopenharmony_ci#define BLIT_SIZE_HEIGHT                                            31:16
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci#define RECT_FORMAT                                                 0x0000C300
1048c2ecf20Sopenharmony_ci#define RECT_FORMAT_DEPTH8                                          0x00000003
1058c2ecf20Sopenharmony_ci#define RECT_FORMAT_DEPTH16                                         0x00000001
1068c2ecf20Sopenharmony_ci#define RECT_FORMAT_DEPTH24                                         0x00000003
1078c2ecf20Sopenharmony_ci#define RECT_SOLID_COLOR                                            0x0000C3FC
1088c2ecf20Sopenharmony_ci#define RECT_SOLID_RECTS_MAX_RECTS                                  32
1098c2ecf20Sopenharmony_ci#define RECT_SOLID_RECTS(i)                                         0x0000C400\
1108c2ecf20Sopenharmony_ci                                                                    +(i)*8
1118c2ecf20Sopenharmony_ci#define RECT_SOLID_RECTS_Y                                          15:0
1128c2ecf20Sopenharmony_ci#define RECT_SOLID_RECTS_X                                          31:16
1138c2ecf20Sopenharmony_ci#define RECT_SOLID_RECTS_HEIGHT                                     47:32
1148c2ecf20Sopenharmony_ci#define RECT_SOLID_RECTS_WIDTH                                      63:48
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_CLIP                                  0x0000C7EC
1178c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_CLIP_POINT0_X                         15:0
1188c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_CLIP_POINT0_Y                         31:16
1198c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_CLIP_POINT1_X                         47:32
1208c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_CLIP_POINT1_Y                         63:48
1218c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_COLOR                                 0x0000C7F4
1228c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_SIZE                                  0x0000C7F8
1238c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_SIZE_WIDTH                            15:0
1248c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_SIZE_HEIGHT                           31:16
1258c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_POINT                                 0x0000C7FC
1268c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_POINT_X                               15:0
1278c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_POINT_Y                               31:16
1288c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_DATA_MAX_DWORDS                       128
1298c2ecf20Sopenharmony_ci#define RECT_EXPAND_ONE_COLOR_DATA(i)                               0x0000C800\
1308c2ecf20Sopenharmony_ci                                                                    +(i)*4
1318c2ecf20Sopenharmony_ci
1328c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_CLIP                                  0x0000CBE4
1338c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_CLIP_POINT0_X                         15:0
1348c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_CLIP_POINT0_Y                         31:16
1358c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_CLIP_POINT1_X                         47:32
1368c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_CLIP_POINT1_Y                         63:48
1378c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_COLOR_0                               0x0000CBEC
1388c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_COLOR_1                               0x0000CBF0
1398c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_SIZE_IN                               0x0000CBF4
1408c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_SIZE_IN_WIDTH                         15:0
1418c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_SIZE_IN_HEIGHT                        31:16
1428c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_SIZE_OUT                              0x0000CBF8
1438c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_SIZE_OUT_WIDTH                        15:0
1448c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_SIZE_OUT_HEIGHT                       31:16
1458c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_POINT                                 0x0000CBFC
1468c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_POINT_X                               15:0
1478c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_POINT_Y                               31:16
1488c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_DATA_MAX_DWORDS                       128
1498c2ecf20Sopenharmony_ci#define RECT_EXPAND_TWO_COLOR_DATA(i)                               0x0000CC00\
1508c2ecf20Sopenharmony_ci                                                                    +(i)*4
1518c2ecf20Sopenharmony_ci
1528c2ecf20Sopenharmony_ci#define STRETCH_BLIT_FORMAT                                         0x0000E300
1538c2ecf20Sopenharmony_ci#define STRETCH_BLIT_FORMAT_DEPTH8                                  0x00000004
1548c2ecf20Sopenharmony_ci#define STRETCH_BLIT_FORMAT_DEPTH16                                 0x00000007
1558c2ecf20Sopenharmony_ci#define STRETCH_BLIT_FORMAT_DEPTH24                                 0x00000004
1568c2ecf20Sopenharmony_ci#define STRETCH_BLIT_FORMAT_X8R8G8B8                                0x00000004
1578c2ecf20Sopenharmony_ci#define STRETCH_BLIT_FORMAT_YUYV                                    0x00000005
1588c2ecf20Sopenharmony_ci#define STRETCH_BLIT_FORMAT_UYVY                                    0x00000006
1598c2ecf20Sopenharmony_ci#define STRETCH_BLIT_CLIP_POINT                                     0x0000E308
1608c2ecf20Sopenharmony_ci#define STRETCH_BLIT_CLIP_POINT_X                                   15:0
1618c2ecf20Sopenharmony_ci#define STRETCH_BLIT_CLIP_POINT_Y                                   31:16
1628c2ecf20Sopenharmony_ci#define STRETCH_BLIT_CLIP_POINT                                     0x0000E308
1638c2ecf20Sopenharmony_ci#define STRETCH_BLIT_CLIP_SIZE                                      0x0000E30C
1648c2ecf20Sopenharmony_ci#define STRETCH_BLIT_CLIP_SIZE_WIDTH                                15:0
1658c2ecf20Sopenharmony_ci#define STRETCH_BLIT_CLIP_SIZE_HEIGHT                               31:16
1668c2ecf20Sopenharmony_ci#define STRETCH_BLIT_DST_POINT                                      0x0000E310
1678c2ecf20Sopenharmony_ci#define STRETCH_BLIT_DST_POINT_X                                    15:0
1688c2ecf20Sopenharmony_ci#define STRETCH_BLIT_DST_POINT_Y                                    31:16
1698c2ecf20Sopenharmony_ci#define STRETCH_BLIT_DST_SIZE                                       0x0000E314
1708c2ecf20Sopenharmony_ci#define STRETCH_BLIT_DST_SIZE_WIDTH                                 15:0
1718c2ecf20Sopenharmony_ci#define STRETCH_BLIT_DST_SIZE_HEIGHT                                31:16
1728c2ecf20Sopenharmony_ci#define STRETCH_BLIT_DU_DX                                          0x0000E318
1738c2ecf20Sopenharmony_ci#define STRETCH_BLIT_DV_DY                                          0x0000E31C
1748c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_SIZE                                       0x0000E400
1758c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_SIZE_WIDTH                                 15:0
1768c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_SIZE_HEIGHT                                31:16
1778c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_FORMAT                                     0x0000E404
1788c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_FORMAT_PITCH                               15:0
1798c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_FORMAT_ORIGIN                              23:16
1808c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_FORMAT_ORIGIN_CENTER                       0x00000001
1818c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_FORMAT_ORIGIN_CORNER                       0x00000002
1828c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_FORMAT_FILTER                              31:24
1838c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_FORMAT_FILTER_POINT_SAMPLE                 0x00000000
1848c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_FORMAT_FILTER_BILINEAR                     0x00000001
1858c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_OFFSET                                     0x0000E408
1868c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_POINT                                      0x0000E40C
1878c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_POINT_U                                    15:0
1888c2ecf20Sopenharmony_ci#define STRETCH_BLIT_SRC_POINT_V                                    31:16
189