summaryrefslogtreecommitdiffstats
path: root/graphics/dri/files/patch-radeondri
blob: 33d2bc6562b42e96fc2a24a3741438387f2f9ff7 (plain)
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
diff -ru -x CVS lib/GL/mesa/src/drv.orig/r200/r200_context.c lib/GL/mesa/src/drv/r200/r200_context.c
--- lib/GL/mesa/src/drv.orig/r200/r200_context.c	Tue Mar 11 17:51:23 2003
+++ lib/GL/mesa/src/drv/r200/r200_context.c	Tue Mar 11 17:46:57 2003
@@ -391,6 +391,7 @@
     */
    _tnl_destroy_pipeline( ctx );
    _tnl_install_pipeline( ctx, r200_pipeline );
+   ctx->Driver.FlushVertices = r200FlushVertices;
 
    /* Try and keep materials and vertices separate:
     */
diff -ru -x CVS lib/GL/mesa/src/drv.orig/r200/r200_swtcl.c lib/GL/mesa/src/drv/r200/r200_swtcl.c
--- lib/GL/mesa/src/drv.orig/r200/r200_swtcl.c	Tue Mar 11 17:51:29 2003
+++ lib/GL/mesa/src/drv/r200/r200_swtcl.c	Tue Mar 11 17:46:57 2003
@@ -44,6 +44,7 @@
 #include "math/m_translate.h"
 #include "tnl/tnl.h"
 #include "tnl/t_context.h"
+#include "tnl/t_imm_exec.h"
 #include "tnl/t_pipeline.h"
 
 #include "r200_context.h"
@@ -1220,6 +1221,14 @@
       r200ChooseVertexState( ctx );
 }
 
+
+void r200FlushVertices( GLcontext *ctx, GLuint flags )
+{
+   _tnl_flush_vertices( ctx, flags );
+
+   if (flags & FLUSH_STORED_VERTICES) 
+      R200_FIREVERTICES( R200_CONTEXT( ctx ) );
+}
 
 /**********************************************************************/
 /*                            Initialization.                         */
diff -ru -x CVS lib/GL/mesa/src/drv.orig/r200/r200_swtcl.h lib/GL/mesa/src/drv/r200/r200_swtcl.h
--- lib/GL/mesa/src/drv.orig/r200/r200_swtcl.h	Tue Mar 11 17:51:29 2003
+++ lib/GL/mesa/src/drv/r200/r200_swtcl.h	Tue Mar 11 17:46:57 2003
@@ -42,6 +42,7 @@
 extern void r200InitSwtcl( GLcontext *ctx );
 extern void r200DestroySwtcl( GLcontext *ctx );
 
+extern void r200FlushVertices( GLcontext *ctx, GLuint flags );
 extern void r200ChooseRenderState( GLcontext *ctx );
 extern void r200ChooseVertexState( GLcontext *ctx );
 
diff -ru -x CVS lib/GL/mesa/src/drv.orig/r200/r200_vtxfmt.c lib/GL/mesa/src/drv/r200/r200_vtxfmt.c
--- lib/GL/mesa/src/drv.orig/r200/r200_vtxfmt.c	Tue Mar 11 17:51:29 2003
+++ lib/GL/mesa/src/drv/r200/r200_vtxfmt.c	Tue Mar 11 17:47:00 2003
@@ -38,6 +38,7 @@
 #include "r200_ioctl.h"
 #include "r200_tex.h"
 #include "r200_tcl.h"
+#include "r200_swtcl.h"
 #include "r200_vtxfmt.h"
 
 #include "api_noop.h"
@@ -59,7 +60,7 @@
 
 struct r200_vb vb;
 
-static void r200FlushVertices( GLcontext *, GLuint );
+static void r200VtxFmtFlushVertices( GLcontext *, GLuint );
 
 static void count_func( const char *name,  struct dynfn *l )
 {
@@ -357,12 +358,13 @@
       fprintf(stderr, "%s from %s\n", __FUNCTION__, caller);
 
    if (ctx->Driver.NeedFlush) 
-      r200FlushVertices( ctx, ctx->Driver.NeedFlush );
+      r200VtxFmtFlushVertices( ctx, ctx->Driver.NeedFlush );
 
    if (ctx->NewState)
       _mesa_update_state( ctx ); /* clear state so fell_back sticks */
 
    _tnl_wakeup_exec( ctx );
+   ctx->Driver.FlushVertices = r200FlushVertices;
 
    assert( rmesa->dma.flush == 0 );
    rmesa->vb.fell_back = GL_TRUE;
@@ -404,6 +406,7 @@
    prim = rmesa->vb.prim[0];
    ctx->Driver.CurrentExecPrimitive = GL_POLYGON+1;
    _tnl_wakeup_exec( ctx );
+   ctx->Driver.FlushVertices = r200FlushVertices;
 
    assert(rmesa->dma.flush == 0);
    rmesa->vb.fell_back = GL_TRUE;
@@ -756,7 +759,7 @@
 	    fprintf(stderr, "reinstall (new install)\n");
 
 	 _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt );
-	 ctx->Driver.FlushVertices = r200FlushVertices;
+	 ctx->Driver.FlushVertices = r200VtxFmtFlushVertices;
 	 ctx->Driver.NewList = r200NewList;
 	 rmesa->vb.installed = GL_TRUE;
 	 vb.context = ctx;
@@ -772,6 +775,7 @@
 	 if (rmesa->dma.flush)
 	    rmesa->dma.flush( rmesa );
 	 _tnl_wakeup_exec( ctx );
+	 ctx->Driver.FlushVertices = r200FlushVertices;
 	 rmesa->vb.installed = GL_FALSE;
 	 vb.context = 0;
       }
@@ -931,7 +935,7 @@
    return GL_TRUE;
 }
 
-static void r200FlushVertices( GLcontext *ctx, GLuint flags )
+static void r200VtxFmtFlushVertices( GLcontext *ctx, GLuint flags )
 {
    r200ContextPtr rmesa = R200_CONTEXT( ctx );
 
diff -ru -x CVS lib/GL/mesa/src/drv.orig/radeon/radeon_context.c lib/GL/mesa/src/drv/radeon/radeon_context.c
--- lib/GL/mesa/src/drv.orig/radeon/radeon_context.c	Tue Mar 11 17:51:29 2003
+++ lib/GL/mesa/src/drv/radeon/radeon_context.c	Tue Mar 11 17:47:00 2003
@@ -382,6 +382,7 @@
     */
    _tnl_destroy_pipeline( ctx );
    _tnl_install_pipeline( ctx, radeon_pipeline );
+   ctx->Driver.FlushVertices = radeonFlushVertices;
 
    /* Try and keep materials and vertices separate:
     */
diff -ru -x CVS lib/GL/mesa/src/drv.orig/radeon/radeon_swtcl.c lib/GL/mesa/src/drv/radeon/radeon_swtcl.c
--- lib/GL/mesa/src/drv.orig/radeon/radeon_swtcl.c	Tue Mar 11 17:51:29 2003
+++ lib/GL/mesa/src/drv/radeon/radeon_swtcl.c	Tue Mar 11 17:47:00 2003
@@ -45,6 +45,7 @@
 #include "math/m_translate.h"
 #include "tnl/tnl.h"
 #include "tnl/t_context.h"
+#include "tnl/t_imm_exec.h"
 #include "tnl/t_pipeline.h"
 
 #include "radeon_context.h"
@@ -1133,6 +1134,14 @@
    }
 }
 
+
+void radeonFlushVertices( GLcontext *ctx, GLuint flags )
+{
+   _tnl_flush_vertices( ctx, flags );
+
+   if (flags & FLUSH_STORED_VERTICES) 
+      RADEON_FIREVERTICES( RADEON_CONTEXT( ctx ) );
+}
 
 /**********************************************************************/
 /*                            Initialization.                         */
diff -ru -x CVS lib/GL/mesa/src/drv.orig/radeon/radeon_swtcl.h lib/GL/mesa/src/drv/radeon/radeon_swtcl.h
--- lib/GL/mesa/src/drv.orig/radeon/radeon_swtcl.h	Tue Mar 11 17:51:29 2003
+++ lib/GL/mesa/src/drv/radeon/radeon_swtcl.h	Tue Mar 11 17:47:00 2003
@@ -43,6 +43,7 @@
 extern void radeonInitSwtcl( GLcontext *ctx );
 extern void radeonDestroySwtcl( GLcontext *ctx );
 
+extern void radeonFlushVertices( GLcontext *ctx, GLuint flags );
 extern void radeonChooseRenderState( GLcontext *ctx );
 extern void radeonChooseVertexState( GLcontext *ctx );
 
diff -ru -x CVS lib/GL/mesa/src/drv.orig/radeon/radeon_vtxfmt.c lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.c
--- lib/GL/mesa/src/drv.orig/radeon/radeon_vtxfmt.c	Tue Mar 11 17:51:29 2003
+++ lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.c	Tue Mar 11 17:47:01 2003
@@ -38,6 +38,7 @@
 #include "radeon_ioctl.h"
 #include "radeon_tex.h"
 #include "radeon_tcl.h"
+#include "radeon_swtcl.h"
 #include "radeon_vtxfmt.h"
 
 #include "api_noop.h"
@@ -59,7 +60,7 @@
 
 struct radeon_vb vb;
 
-static void radeonFlushVertices( GLcontext *, GLuint );
+static void radeonVtxfmtFlushVertices( GLcontext *, GLuint );
 
 static void count_func( const char *name,  struct dynfn *l )
 {
@@ -336,12 +337,13 @@
       fprintf(stderr, "%s from %s\n", __FUNCTION__, caller);
 
    if (ctx->Driver.NeedFlush) 
-      radeonFlushVertices( ctx, ctx->Driver.NeedFlush );
+      radeonVtxfmtFlushVertices( ctx, ctx->Driver.NeedFlush );
 
    if (ctx->NewState)
       _mesa_update_state( ctx ); /* clear state so fell_back sticks */
 
    _tnl_wakeup_exec( ctx );
+   ctx->Driver.FlushVertices = radeonFlushVertices;
 
    assert( rmesa->dma.flush == 0 );
    rmesa->vb.fell_back = GL_TRUE;
@@ -382,6 +384,7 @@
    prim = rmesa->vb.prim[0];
    ctx->Driver.CurrentExecPrimitive = GL_POLYGON+1;
    _tnl_wakeup_exec( ctx );
+   ctx->Driver.FlushVertices = radeonFlushVertices;
 
    assert(rmesa->dma.flush == 0);
    rmesa->vb.fell_back = GL_TRUE;
@@ -731,7 +734,7 @@
 	    fprintf(stderr, "reinstall (new install)\n");
 
 	 _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt );
-	 ctx->Driver.FlushVertices = radeonFlushVertices;
+	 ctx->Driver.FlushVertices = radeonVtxfmtFlushVertices;
 	 ctx->Driver.NewList = radeonNewList;
 	 rmesa->vb.installed = GL_TRUE;
 	 vb.context = ctx;
@@ -747,6 +750,7 @@
 	 if (rmesa->dma.flush)
 	    rmesa->dma.flush( rmesa );
 	 _tnl_wakeup_exec( ctx );
+	 ctx->Driver.FlushVertices = radeonFlushVertices;
 	 rmesa->vb.installed = GL_FALSE;
 	 vb.context = 0;
       }
@@ -905,7 +909,7 @@
    return GL_TRUE;
 }
 
-static void radeonFlushVertices( GLcontext *ctx, GLuint flags )
+static void radeonVtxfmtFlushVertices( GLcontext *ctx, GLuint flags )
 {
    radeonContextPtr rmesa = RADEON_CONTEXT( ctx );
 
OpenPOWER on IntegriCloud