File: glide2x-pregasp

package info (click to toggle)
glide 2002.04.10ds1-15
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 59,556 kB
  • sloc: ansic: 290,125; asm: 23,305; sh: 8,089; pascal: 3,854; makefile: 1,276; perl: 73
file content (580 lines) | stat: -rw-r--r-- 15,470 bytes parent folder | download | duplicates (6)
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
Status: wont-apply

Index: b/glide2x/cvg/glide/src/makefile.linux
===================================================================
--- a/glide2x/cvg/glide/src/makefile.linux
+++ b/glide2x/cvg/glide/src/makefile.linux
@@ -259,7 +259,8 @@ gdraw.o: fxinline.h
 endif
 
 xdraw2.o : xdraw2.S xdraw2.inc.S fxgasm.h fxinline.h
-	gasp xdraw2.S $(ASM_OPTS) $(LAOPTS) | as -V -Qy -o xdraw2.o
+	#gasp xdraw2.S $(ASM_OPTS) $(LAOPTS) | as -V -Qy -o xdraw2.o
+	as -V -Qy xdraw2.gasp -o xdraw2.o
 
 cpudtect.o :
 	gasp cpudtect.S $(LAOPTS) | as -V -Qy -o cpudtect.o
Index: b/glide2x/cvg/glide/src/xdraw2.gasp
===================================================================
--- /dev/null
+++ b/glide2x/cvg/glide/src/xdraw2.gasp
@@ -0,0 +1,559 @@
+	## THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
+	## PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
+	## TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
+	## INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE 
+	## DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). 
+	## THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER 
+	## EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
+	## FULL TEXT OF THE NON-WARRANTY PROVISIONS.  
+	## 
+	## USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
+	## RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
+	## TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
+	## AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
+	## SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
+	## THE UNITED STATES.  
+	## 
+	## COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
+	##
+	## $Header: /cvsroot/glide/glide2x/cvg/glide/src/xdraw2.S,v 1.1 2000/1/6 20:35:11 joseph Exp $
+	## $Revision: 1.1 $
+	## $Log: xdraw2.S,v $
+	## Revision 1.1  2000/1/6 20:35:11  joseph
+	## Changes to support building against shared swlibs.
+	##
+	## Revision 1.2  1999/12/11 0:42:21  joseph
+	## Changed .data to .section .data to fix build errors with binutils 2.9.5.
+	##
+	## Revision 1.1.1.1  1999/12/7 21:49:13  joseph
+	## Initial checkin into SourceForge.
+	##
+	##
+	## 
+	## 7     5/18/98 12:16p Peter
+	## culling enabling
+	#	
+	# 6     1/15/98 1:12p Peter
+	# dispatch w/o packing
+	# 
+	# 5     11/6/97 3:47p Peter
+	# 
+	# 4     11/4/97 5:4p Peter
+	# cataclysm part deux
+	# 
+	# 3     11/1/97 10:1a Peter
+	# tri dispatch stuff
+	# 
+	# 2     10/30/97 6:53p Peter
+	# first real cut at tri asm
+	# 
+	# 1     10/30/97 4:29p Peter
+	# asm tri code
+	# 
+	# 2     7/7/97 2:14p Jdt
+	# assembly now on par with C code.
+	# 
+	# 1     7/7/97 8:37a Jdt
+	# B4 Chip field fix.
+	##
+
+	.file   "xdraw2.s"
+	#OPTION OLDSTRUCTS       
+	# 586P
+
+	# This was xdraw2.s but I renamed it for now to work with the shared
+	# swlibs.  It hasn't changed to the format used in the .S files for
+	# the Voodoo3 Glide soruces.
+	# some useful floating load and store macros <ala gmt>
+	#flds    TEXTEQU <fld  DWORD PTR>
+	#fsubs   TEXTEQU <fsub DWORD PTR>
+	#fmuls   TEXTEQU <fmul DWORD PTR>
+
+	.align	4
+	.section	.data
+One:	.long	0x03f800000
+Area:	.long	0
+dxAB:	.long	0
+dxBC:	.long	0
+dyAB:	.long	0
+dyBC:	.long	0
+culltest:	.long	0
+
+	## Extra junk to pad out to the next cache line.
+bias0:	.long	0
+pad1:	.long	0
+pad2:	.long	0
+pad3:	.long	0
+pad4:	.long	0
+pad5:	.long	0
+pad6:	.long	0
+pad7:	.long	0
+bias1:	.long	0
+
+	#	_DATA   ENDS
+
+	# Ugly, but seems to workaround the problem with locally defined
+	# data segment globals not getting relocated properly when using
+	# djgpp.
+
+
+	### Definitions of cvg regs and glide root structures.
+
+	#----------------------------------------------------------------------
+	# Assembler offsets for SSTREGS struct
+	#----------------------------------------------------------------------
+
+
+
+	#----------------------------------------------------------------------
+	# Assembler offsets for GC struct
+	#----------------------------------------------------------------------
+
+
+
+	#----------------------------------------------------------------------
+	# Assembler offsets for GlideRoot struct
+	#----------------------------------------------------------------------
+
+
+
+	#----------------------------------------------------------------------
+	# Assembler offsets for GrVertex struct
+	#----------------------------------------------------------------------
+
+
+
+	## enables/disables 116 and 120 counters
+
+	#--------------------------------------------------------------------------
+	# Arguments : STKOFF = 16 from 4 pushes
+	#.AIF  EQ 1
+	#STKOFF	.EQU  20
+	#.AELSE
+	#.AENDI
+
+	# edx is used as index, loading from *src
+
+	.text
+
+	.align	4
+	.globl  _trisetup_cull
+	.type _trisetup_cull, @function
+_trisetup_cull:
+	#        .code
+
+
+	## -*-asm-*-
+	## THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
+	## PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
+	## TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
+	## INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE 
+	## DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). 
+	## THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER 
+	## EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
+	## FULL TEXT OF THE NON-WARRANTY PROVISIONS.  
+	## 
+	## USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
+	## RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
+	## TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
+	## AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
+	## SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
+	## THE UNITED STATES.  
+	## 
+	## COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
+	##
+	## $Header: /cvsroot/glide/glide2x/cvg/glide/src/xdraw2.inc.S,v 1.1 2000/1/6 20:35:11 joseph Exp $
+	## $Revision: 1.1 $
+	## $Log: xdraw2.inc.S,v $
+	## Revision 1.1  2000/1/6 20:35:11  joseph
+	## Changes to support building against shared swlibs.
+	##
+	## Revision 1.1.1.1  1999/12/7 21:49:13  joseph
+	## Initial checkin into SourceForge.
+	##
+	# 
+	# 2     10/30/97 6:53p Peter
+	# first real cut at tri asm
+	# 
+	# 1     10/30/97 4:29p Peter
+	# asm tri code
+	# 
+	# 2     7/7/97 2:14p Jdt
+	# assembly now on par with C code.
+	# 
+	# 1     7/7/97 8:3728 Jdt
+	# B4 Chip field fix.
+	##
+
+	.file "xdraw2.inc.s"
+	#.586P
+	#EXTRN   _GlideRoot:DWORD
+	#EXTRN   _FifoMakeRoom:NEAR
+
+	# Ugly, but seems to workaround the problem with locally defined
+	# data segment globals not getting relocated properly when using
+	# djgpp.
+
+	#One   .EQU One+4
+	#One   .EQU One+8
+	#One   .EQU One+12
+	#One   .EQU One+16
+	#One   .EQU One+20
+	#One .EQU One+24
+
+
+	## Prologue stuff
+	push    %esi
+	push    %edi
+
+	push    %ebx	
+	push    %ebp
+
+	mov     (_GlideRoot + 12), %esi    ## GR_DCL_GC
+
+	.align	4
+
+	## Pre-load the current culling mode before all of the
+	## floating point area stuff.
+	mov     584(%esi), %edx
+	mov     20(%esp), %eax
+
+	mov	    24(%esp), %ebx
+	mov     28(%esp), %ecx
+	shl     $31, %edx
+	.LCULLArea_Computation:	
+	# 47-3
+	# jmp ret_pop0f
+	flds    0(%eax)		#  xa
+	fsubs   0(%ebx)		#  dxAB
+	flds    0(%ebx)		#  |    xb
+	fsubs   0(%ecx)		#  |    dxBC
+	flds    4(%ebx)		#  |    |    yb
+	fsubs   4(%ecx)		#  |    |    dyBC
+	flds    4(%eax)		#  |    |     |   ya
+	fsubs   4(%ebx)		#  |    |     |   dyAB
+	fld     %st(3)              #  |    |    |    |    dxAB
+	fmul    %st(2), %st         #  |    |    |    |    t0         t0=dxAB*dyBC
+	fld     %st(3)              #  |    |    |    |    |    dxBC
+	fmul    %st(2), %st         #  |    |    |    |    |    t1    t1=dxBC*dyAB
+	fsubrp  %st, %st(1)         #  |    |    |    |    area
+	fsts    One	        #  |    |    |    |    area
+
+	## Pop temp things from the sw culling off the fp stack
+	fstp    %st   # 4
+	fstp    %st   # 3
+	fstp    %st   # 2
+	fstp    %st   # 1
+	fstp    %st   # 0    
+	mov     One, %ebp        # j = *(long *)&area
+	xor     %eax, %eax		  # Clear the returnv value (0 == culled)
+	# Zero Area Triangle Check
+	and     $0x7fffffff, %ebp  # if ((j & 0x7FFFFFFF) == 0)
+	jz .LCULL__triDone
+
+	## Triangle area check vs culling mode
+	mov     One, %ebp
+	xor     %edx, %ebp
+
+	jge .LCULL__triDone
+
+	.align	4
+	## Check to make sure that we have enough room for
+	## the complete triangle packet.
+	mov	    (_GlideRoot + 24), %eax
+	mov	    888(%esi), %ebx
+	add	    $4, %eax
+	cmp	    %eax, %ebx
+	jge .LCULL__triBegin
+
+	push    $0
+	push    $0
+	push    %eax
+	call    _FifoMakeRoom
+
+	add	    $12, %esp
+
+	## Send triangle parameters
+
+
+
+	.align	4
+	.LCULL__triBegin:	
+	mov     880(%esi), %ebp		# Fetch Fifo Ptr
+	mov	    $4, %ecx			# Starting %edx    
+
+	mov	    848(%esi), %eax 	# Packet 3 header
+	nop
+
+	# Write packet header to %ebp    
+	mov    %eax, 0(%ebp)
+	add	    $4, %ebp			# Advance %ebp for hdr & 0/4 coordinate
+
+	.align	4
+	.LCULL__vertexStart:	
+	mov	    16(%esp,%ecx), %edx	# Current %edx
+	add	    $8, %ebp    
+
+	nop						# Avoid p5 agi w/ load of %edx ptr
+	nop
+	movl    0(%edx), %eax			# 0
+	lea	    396(%esi), %ebx		# Reset the dataList
+	# PCI write 0
+	mov    %eax, -8(%ebp)
+	movl    4(%edx), %eax			# 4 
+
+	xor	    %edi, %edi			# Clear packed color
+	# PCI write 4
+	mov    %eax, -4(%ebp)
+
+
+	.LCULL__doParams:	
+	movl    (%ebx), %eax				# Get first offset from the data list
+	add     $4, %ebx				# %ebx++
+
+	cmp	    $0, %eax				# Are we done?
+	je .LCULL__nextVertex
+
+	## Not using align directive here because it sometimes
+	## introduces an agi for the eax use below.
+	nop
+	nop
+	.LCULL__paramLoop:	
+	movl    (%eax, %edx), %edi
+	add	    $4, %ebp
+	movl    (%ebx), %eax
+	add     $4, %ebx
+	cmp	    $0, %eax
+	mov    %edi, -4(%ebp)
+
+	jne .LCULL__paramLoop
+
+	.align	4
+	.LCULL__nextVertex:	
+	## On to the next %edx
+	add	    $4, %ecx
+	mov     (_GlideRoot + 12), %esi		# Reload %esi incase we trashed it as 28 temp
+
+	cmp	    $16, %ecx			# Offset of one past last %edx?
+
+	jne .LCULL__vertexStart
+
+	## Update %esi->880 and %esi->888
+	mov	    %ebp, %eax
+	mov     880(%esi), %ebx
+	mov	    %ebp, 880(%esi)
+	sub     %ebx, %eax
+
+	mov     (_GlideRoot + 120), %ebx	
+	sub	    %eax, 888(%esi)
+
+	add     $1, %ebx
+	mov     %ebx, (_GlideRoot + 120)
+
+	## return 1 (triangle drawn)
+	mov     $1, %eax
+
+	.LCULL__triDone:	
+	## Restore trashed registers
+	mov     (_GlideRoot + 116), %esi
+	pop     %ebp
+
+	add     $1, %esi
+	pop     %ebx
+	pop     %edi
+	mov     %esi, (_GlideRoot + 116)
+
+	pop     %esi
+	ret
+	.L_end_trisetup_cull:
+	.size _trisetup_cull,.L_end_trisetup_cull-_trisetup_cull
+
+
+			.align	4
+	.global	  _trisetup
+	.type _trisetup, @function
+_trisetup:
+	#            .code
+
+	## -*-asm-*-
+	## THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
+	## PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
+	## TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
+	## INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE 
+	## DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). 
+	## THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER 
+	## EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
+	## FULL TEXT OF THE NON-WARRANTY PROVISIONS.  
+	## 
+	## USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
+	## RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
+	## TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
+	## AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
+	## SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
+	## THE UNITED STATES.  
+	## 
+	## COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
+	##
+	## $Header: /cvsroot/glide/glide2x/cvg/glide/src/xdraw2.inc.S,v 1.1 2000/1/6 20:35:11 joseph Exp $
+	## $Revision: 1.1 $
+	## $Log: xdraw2.inc.S,v $
+	## Revision 1.1  2000/1/6 20:35:11  joseph
+	## Changes to support building against shared swlibs.
+	##
+	## Revision 1.1.1.1  1999/12/7 21:49:13  joseph
+	## Initial checkin into SourceForge.
+	##
+	# 
+	# 2     10/30/97 6:53p Peter
+	# first real cut at tri asm
+	# 
+	# 1     10/30/97 4:29p Peter
+	# asm tri code
+	# 
+	# 2     7/7/97 2:14p Jdt
+	# assembly now on par with C code.
+	# 
+	# 1     7/7/97 8:3728 Jdt
+	# B4 Chip field fix.
+	##
+
+	.file "xdraw2.inc.s"
+	#.586P
+	#EXTRN   _GlideRoot:DWORD
+	#EXTRN   _FifoMakeRoom:NEAR
+
+	# Ugly, but seems to workaround the problem with locally defined
+	# data segment globals not getting relocated properly when using
+	# djgpp.
+
+	#One   .EQU One+4
+	#One   .EQU One+8
+	#One   .EQU One+12
+	#One   .EQU One+16
+	#One   .EQU One+20
+	#One .EQU One+24
+
+
+	## Prologue stuff
+	push    %esi
+	push    %edi
+
+	push    %ebx	
+	push    %ebp
+
+	mov     (_GlideRoot + 12), %esi    ## GR_DCL_GC
+
+	.align	4
+	.align	4
+	## Check to make sure that we have enough room for
+	## the complete triangle packet.
+	mov	    (_GlideRoot + 24), %eax
+	mov	    888(%esi), %ebx
+	add	    $4, %eax
+	cmp	    %eax, %ebx
+	jge .LNOCULL__triBegin
+
+	push    $0
+	push    $0
+	push    %eax
+	call    _FifoMakeRoom
+
+	add	    $12, %esp
+
+	## Send triangle parameters
+
+
+
+	.align	4
+	.LNOCULL__triBegin:	
+	mov     880(%esi), %ebp		# Fetch Fifo Ptr
+	mov	    $4, %ecx			# Starting %edx    
+
+	mov	    848(%esi), %eax 	# Packet 3 header
+	nop
+
+	# Write packet header to %ebp    
+	mov    %eax, 0(%ebp)
+	add	    $4, %ebp			# Advance %ebp for hdr & 0/4 coordinate
+
+	.align	4
+	.LNOCULL__vertexStart:	
+	mov	    16(%esp,%ecx), %edx	# Current %edx
+	add	    $8, %ebp    
+
+	nop						# Avoid p5 agi w/ load of %edx ptr
+	nop
+	movl    0(%edx), %eax			# 0
+	lea	    396(%esi), %ebx		# Reset the dataList
+	# PCI write 0
+	mov    %eax, -8(%ebp)
+	movl    4(%edx), %eax			# 4 
+
+	xor	    %edi, %edi			# Clear packed color
+	# PCI write 4
+	mov    %eax, -4(%ebp)
+
+
+	.LNOCULL__doParams:	
+	movl    (%ebx), %eax				# Get first offset from the data list
+	add     $4, %ebx				# %ebx++
+
+	cmp	    $0, %eax				# Are we done?
+	je .LNOCULL__nextVertex
+
+	## Not using align directive here because it sometimes
+	## introduces an agi for the eax use below.
+	nop
+	nop
+	.LNOCULL__paramLoop:	
+	movl    (%eax, %edx), %edi
+	add	    $4, %ebp
+	movl    (%ebx), %eax
+	add     $4, %ebx
+	cmp	    $0, %eax
+	mov    %edi, -4(%ebp)
+
+	jne .LNOCULL__paramLoop
+
+	.align	4
+	.LNOCULL__nextVertex:	
+	## On to the next %edx
+	add	    $4, %ecx
+	mov     (_GlideRoot + 12), %esi		# Reload %esi incase we trashed it as 28 temp
+
+	cmp	    $16, %ecx			# Offset of one past last %edx?
+
+	jne .LNOCULL__vertexStart
+
+	## Update %esi->880 and %esi->888
+	mov	    %ebp, %eax
+	mov     880(%esi), %ebx
+	mov	    %ebp, 880(%esi)
+	sub     %ebx, %eax
+
+	mov     (_GlideRoot + 120), %ebx	
+	sub	    %eax, 888(%esi)
+
+	add     $1, %ebx
+	mov     %ebx, (_GlideRoot + 120)
+
+	## return 1 (triangle drawn)
+	mov     $1, %eax
+
+	.LNOCULL__triDone:	
+	## Restore trashed registers
+	mov     (_GlideRoot + 116), %esi
+	pop     %ebp
+
+	add     $1, %esi
+	pop     %ebx
+	pop     %edi
+	mov     %esi, (_GlideRoot + 116)
+
+	pop     %esi
+	ret
+	.L_end_trisetup:
+	.size _trisetup,.L_end_trisetup-_trisetup
+
+		
+	#_TEXT ENDS