forked from iCatButler/pcsxr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpgxp_debug.h
155 lines (144 loc) · 3.46 KB
/
pgxp_debug.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/***************************************************************************
* Copyright (C) 2016 by iCatButler *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
***************************************************************************/
/**************************************************************************
* pgxp_debug.h
* PGXP - Parallel/Precision Geometry Xform Pipeline
*
* Created on: 07 Jun 2016
* Author: iCatButler
***************************************************************************/
#ifndef _PGXP_DEBUG_H_
#define _PGXP_DEBUG_H_
#include "psxcommon.h"
//#define PGXP_CPU_DEBUG
//#define PGXP_OUTPUT_ALL
//#define PGXP_FORCE_INPUT_VALUES
//#define PGXP_TEST_OUTPUT_VALUES
#define PGXP_DEBUG_TOLERANCE 2.f
// Debug wrappers
void PGXP_psxTraceOp(u32 eOp, u32 code);
void PGXP_psxTraceOp1(u32 eOp, u32 code, u32 op1);
void PG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