Merge branch 'mesa_7_5_branch'
[mesa.git] / src / mesa / drivers / dri / r600 / r700_debug.h
1 /*
2 * Copyright (C) 2008-2009 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 */
21
22 /*
23 * Authors:
24 * Richard Li <RichardZ.Li@amd.com>, <richardradeon@gmail.com>
25 * CooperYuan <cooper.yuan@amd.com>, <cooperyuan@gmail.com>
26 */
27
28 #ifndef _R700_DEBUG_H_
29 #define _R700_DEBUG_H_
30
31 enum R700_ERROR
32 {
33 ERROR_ASM_VTX_CLAUSE = 0x1000,
34 ERROR_ASM_UNKOWNCLAUSE = 0x1001,
35 ERROR_ASM_ALLOCEXPORTCF = 0x1002,
36 ERROR_ASM_ALLOCVTXCF = 0x1003,
37 ERROR_ASM_ALLOCTEXCF = 0x1004,
38 ERROR_ASM_ALLOCALUCF = 0x1005,
39 ERROR_ASM_UNKNOWNILINST = 0x1006,
40 ERROR_ASM_SRCARGUMENT = 0x1007,
41 ERROR_ASM_DSTARGUMENT = 0x1008,
42 ERROR_ASM_TEXINSTRUCTION = 0x1009,
43 ERROR_ASM_ALUINSTRUCTION = 0x100A,
44 ERROR_ASM_INSTDSTTRACK = 0x100B,
45 ERROR_ASM_TEXDSTBADTYPE = 0x100C,
46 ERROR_ASM_ALUSRCBADTYPE = 0x100D,
47 ERROR_ASM_ALUSRCSELECT = 0x100E,
48 ERROR_ASM_ALUSRCNUMBER = 0x100F,
49 ERROR_ASM_ALUDSTBADTYPE = 0x1010,
50 ERROR_ASM_CONSTCHANNEL = 0x1011,
51 ERROR_ASM_BADSCALARBZ = 0x1012,
52 ERROR_ASM_BADGPRRESERVE = 0x1013,
53 ERROR_ASM_BADVECTORBZ = 0x1014,
54 ERROR_ASM_BADTEXINST = 0x1015,
55 ERROR_ASM_BADTEXSRC = 0x1016,
56 ERROR_ASM_BADEXPORTTYPE = 0x1017,
57
58
59 TODO_ASM_CONSTTEXADDR = 0x8000,
60 TODO_ASM_NEEDIMPINST = 0x8001,
61 TODO_ASM_TXB = 0x8002,
62 TODO_ASM_TXP = 0x8003
63 };
64
65 enum R700_DUMP_TYPE
66 {
67 DUMP_VERTEX_SHADER = 0x1,
68 DUMP_PIXEL_SHADER = 0x2,
69 DUMP_FETCH_SHADER = 0x4,
70 };
71
72 #define DEBUGF printf
73 #define DEBUGP printf
74
75 void NormalizeLogErrorCode(int nError);
76 /*NormalizeLogErrorCode(nLocalError); */
77 void r700_error(int nLocalError, char *fmt, ...);
78 extern void DumpHwBinary(int, void *, int);
79
80 #ifdef STANDALONE_COMPILER
81 #ifdef __cplusplus
82 extern "C"
83 {
84 #endif //__cplusplus
85
86 void LogString(char* szStr);
87
88 #ifdef __cplusplus
89 }
90 #endif //__cplusplus
91 #endif /*STANDALONE_COMPILER*/
92
93 #endif /*_R700_DEBUG_H_*/