3fb2bd99a82f8d3d01927efd45f58d6a3074c68a
[mesa.git] / src / mesa / tnl / t_context.h
1
2 /* $Id: t_context.h,v 1.2 2000/11/20 13:39:36 keithw Exp $ */
3
4 /*
5 * Mesa 3-D graphics library
6 * Version: 3.5
7 *
8 * Copyright (C) 1999 Brian Paul All Rights Reserved.
9 *
10 * Permission is hereby granted, free of charge, to any person obtaining a
11 * copy of this software and associated documentation files (the "Software"),
12 * to deal in the Software without restriction, including without limitation
13 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 * and/or sell copies of the Software, and to permit persons to whom the
15 * Software is furnished to do so, subject to the following conditions:
16 *
17 * The above copyright notice and this permission notice shall be included
18 * in all copies or substantial portions of the Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
24 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 */
27
28 #ifndef _T_CONTEXT_H
29 #define _T_CONTEXT_H
30
31 #include "glheader.h"
32 #include "types.h"
33
34 #include "math/m_matrix.h"
35 #include "math/m_vector.h"
36 #include "math/m_xform.h"
37
38 #include "t_trans_elt.h"
39
40
41
42 /*
43 * Bits to indicate which faces a vertex participates in,
44 * what facing the primitive provoked by that vertex has,
45 * and some misc. flags.
46 */
47 #define VERT_FACE_FRONT 0x1 /* is in a front-color primitive */
48 #define VERT_FACE_REAR 0x2 /* is in a rear-color primitive */
49 #define PRIM_FACE_FRONT 0x4 /* use front color */
50 #define PRIM_FACE_REAR 0x8 /* use rear color */
51 #define PRIM_CLIPPED 0x10 /* needs clipping */
52 #define PRIM_USER_CLIPPED CLIP_USER_BIT /* 0x40 */
53
54
55 #define PRIM_FLAG_SHIFT 2
56 #define PRIM_FACE_FLAGS (PRIM_FACE_FRONT|PRIM_FACE_REAR)
57 #define VERT_FACE_FLAGS (VERT_FACE_FRONT|VERT_FACE_REAR)
58
59 #define PRIM_ANY_CLIP (PRIM_CLIPPED|PRIM_USER_CLIPPED)
60 #define PRIM_NOT_CULLED (PRIM_ANY_CLIP|PRIM_FACE_FLAGS)
61
62 /* Flags for VB->CullMode.
63 */
64 #define CULL_MASK_ACTIVE 0x1
65 #define COMPACTED_NORMALS 0x2
66 #define CLIP_MASK_ACTIVE 0x4
67
68 /* Flags for selecting a shading function. The first two bits are
69 * shared with the cull mode (ie. cull_mask_active and
70 * compacted_normals.)
71 */
72 #define SHADE_TWOSIDE 0x4
73
74
75 /* KW: Flags that describe the current vertex state, and the contents
76 * of a vertex in a vertex-cassette.
77 *
78 * For really major expansion, consider a 'VERT_ADDITIONAL_FLAGS' flag,
79 * which means there is data in another flags array (eg, extra_flags[]).
80 */
81
82 #define VERT_OBJ_2 0x1 /* glVertex2 */
83 #define VERT_OBJ_3 0x2 /* glVertex3 */
84 #define VERT_OBJ_4 0x4 /* glVertex4 */
85 #define VERT_BEGIN 0x8 /* glBegin */
86 #define VERT_END 0x10 /* glEnd */
87 #define VERT_ELT 0x20 /* glArrayElement */
88 #define VERT_RGBA 0x40 /* glColor */
89 #define VERT_NORM 0x80 /* glNormal */
90 #define VERT_INDEX 0x100 /* glIndex */
91 #define VERT_EDGE 0x200 /* glEdgeFlag */
92 #define VERT_MATERIAL 0x400 /* glMaterial */
93 #define VERT_END_VB 0x800 /* end vb marker */
94 #define VERT_TEX0_12 0x1000
95 #define VERT_TEX0_3 0x2000
96 #define VERT_TEX0_4 0x4000
97 #define VERT_TEX1_12 0x8000
98 #define VERT_TEX1_3 0x10000
99 #define VERT_TEX1_4 0x20000
100 #define VERT_TEX2_12 0x40000
101 #define VERT_TEX2_3 0x80000
102 #define VERT_TEX2_4 0x100000
103 #define VERT_TEX3_12 0x200000
104 #define VERT_TEX3_3 0x400000
105 #define VERT_TEX3_4 0x800000
106 #define VERT_EVAL_C1 0x1000000 /* could reuse OBJ bits for this? */
107 #define VERT_EVAL_C2 0x2000000 /* - or just use 3 bits */
108 #define VERT_EVAL_P1 0x4000000 /* */
109 #define VERT_EVAL_P2 0x8000000 /* */
110 #define VERT_SPEC_RGB 0x10000000
111 #define VERT_FOG_COORD 0x20000000 /* internal use only, currently */
112
113 #define VERT_EYE VERT_BEGIN /* reuse */
114 #define VERT_WIN VERT_END /* reuse */
115 #define VERT_SETUP_FULL VERT_EVAL_P1 /* Rastersetup has been done */
116 #define VERT_PRECALC_DATA VERT_END_VB /* reuse */
117
118 /* Shorthands.
119 */
120 #define VERT_TEX0_SHIFT 11
121
122 #define VERT_EVAL_ANY (VERT_EVAL_C1|VERT_EVAL_P1| \
123 VERT_EVAL_C2|VERT_EVAL_P2)
124
125 #define VERT_OBJ_23 (VERT_OBJ_3|VERT_OBJ_2)
126 #define VERT_OBJ_234 (VERT_OBJ_4|VERT_OBJ_23)
127 #define VERT_OBJ_ANY VERT_OBJ_2
128
129 #define VERT_TEX0_123 (VERT_TEX0_3|VERT_TEX0_12)
130 #define VERT_TEX0_1234 (VERT_TEX0_4|VERT_TEX0_123)
131 #define VERT_TEX0_ANY VERT_TEX0_12
132
133 #define VERT_TEX1_123 (VERT_TEX1_3|VERT_TEX1_12)
134 #define VERT_TEX1_1234 (VERT_TEX1_4|VERT_TEX1_123)
135 #define VERT_TEX1_ANY VERT_TEX1_12
136
137 #define VERT_TEX2_123 (VERT_TEX2_3|VERT_TEX2_12)
138 #define VERT_TEX2_1234 (VERT_TEX2_4|VERT_TEX2_123)
139 #define VERT_TEX2_ANY VERT_TEX2_12
140
141 #define VERT_TEX3_123 (VERT_TEX3_3|VERT_TEX3_12)
142 #define VERT_TEX3_1234 (VERT_TEX3_4|VERT_TEX3_123)
143 #define VERT_TEX3_ANY VERT_TEX3_12
144
145 #define NR_TEXSIZE_BITS 3
146 #define VERT_TEX_ANY(i) (VERT_TEX0_ANY << ((i) * NR_TEXSIZE_BITS))
147
148 #define VERT_FIXUP (VERT_TEX0_ANY | \
149 VERT_TEX1_ANY | \
150 VERT_TEX2_ANY | \
151 VERT_TEX3_ANY | \
152 VERT_RGBA | \
153 VERT_SPEC_RGB | \
154 VERT_FOG_COORD | \
155 VERT_INDEX | \
156 VERT_EDGE | \
157 VERT_NORM)
158
159 #define VERT_DATA (VERT_TEX0_ANY | \
160 VERT_TEX1_ANY | \
161 VERT_TEX2_ANY | \
162 VERT_TEX3_ANY | \
163 VERT_RGBA | \
164 VERT_SPEC_RGB | \
165 VERT_FOG_COORD | \
166 VERT_INDEX | \
167 VERT_EDGE | \
168 VERT_NORM | \
169 VERT_OBJ_ANY | \
170 VERT_MATERIAL | \
171 VERT_ELT | \
172 VERT_EVAL_ANY | \
173 VERT_FOG_COORD)
174
175
176 /* For beginstate
177 */
178 #define VERT_BEGIN_0 0x1 /* glBegin (if initially inside beg/end) */
179 #define VERT_BEGIN_1 0x2 /* glBegin (if initially outside beg/end) */
180 #define VERT_ERROR_0 0x4 /* invalid_operation in initial state 0 */
181 #define VERT_ERROR_1 0x8 /* invalid_operation in initial state 1 */
182
183
184 struct gl_pipeline;
185 struct tnl_context;
186
187 /**
188 ** Vertex buffer/array structures
189 **/
190
191 struct vertex_data
192 {
193 GLfloat (*Obj)[4];
194 GLfloat (*Normal)[3];
195 GLchan (*Color)[4];
196 GLuint *Index;
197 GLubyte *EdgeFlag;
198 GLfloat (*TexCoord[MAX_TEXTURE_UNITS])[4];
199 GLuint *Elt;
200 GLfloat *FogCoord;
201 GLubyte (*SecondaryColor)[4];
202 };
203
204 struct vertex_arrays
205 {
206 GLvector4f Obj;
207 GLvector3f Normal;
208 GLvector4ub Color;
209 GLvector1ui Index;
210 GLvector1ub EdgeFlag;
211 GLvector4f TexCoord[MAX_TEXTURE_UNITS];
212 GLvector1ui Elt;
213 GLvector4ub SecondaryColor;
214 GLvector1f FogCoord;
215 };
216
217 struct vertex_array_pointers
218 {
219 GLvector4f *Obj;
220 GLvector3f *Normal;
221 GLvector4ub *Color;
222 GLvector1ui *Index;
223 GLvector1ub *EdgeFlag;
224 GLvector4f *TexCoord[MAX_TEXTURE_UNITS];
225 GLvector1ui *Elt;
226 GLvector4ub *SecondaryColor;
227 GLvector1f *FogCoord;
228 };
229
230 /* Values for VB->Type */
231 enum {
232 VB_IMMEDIATE,
233 VB_CVA_PRECALC
234 };
235
236
237 /* Values for immediate->BeginState */
238 #define VERT_BEGIN_0 0x1 /* glBegin (if initially inside beg/end) */
239 #define VERT_BEGIN_1 0x2 /* glBegin (if initially outside beg/end) */
240 #define VERT_ERROR_0 0x4 /* invalid_operation in initial state 0 */
241 #define VERT_ERROR_1 0x8 /* invalid_operation in initial state 1 */
242
243
244 /* KW: Represents everything that can take place between a begin and
245 * end, and can represent multiple begin/end pairs. This plus *any*
246 * state variable (GLcontext) should be all you need to replay the
247 * represented begin/end pairs as if they took place in that state.
248 *
249 * Thus this is sufficient for both immediate and compiled modes, but
250 * we could/should throw some elements away for compiled mode if we
251 * know they were empty.
252 */
253 struct immediate
254 {
255 struct immediate *next; /* for cache of free IM's */
256 GLuint id, ref_count;
257
258 /* This must be saved when immediates are shared in display lists.
259 */
260 GLuint Start, Count;
261 GLuint LastData; /* count or count+1 */
262 GLuint AndFlag, OrFlag, BeginState;
263 GLuint LastPrimitive;
264
265 GLuint ArrayAndFlags; /* precalc'ed for glArrayElt */
266 GLuint ArrayIncr;
267 GLuint ArrayEltFlush;
268 GLuint FlushElt;
269
270 GLuint TF1[MAX_TEXTURE_UNITS]; /* precalc'ed for glTexCoord */
271 GLuint TF2[MAX_TEXTURE_UNITS];
272 GLuint TF3[MAX_TEXTURE_UNITS];
273 GLuint TF4[MAX_TEXTURE_UNITS];
274
275 GLuint Primitive[VB_SIZE]; /* GLubyte would do... */
276 GLuint NextPrimitive[VB_SIZE];
277
278 /* allocate storage for these on demand:
279 */
280 struct gl_material (*Material)[2];
281 GLuint *MaterialMask;
282
283 GLfloat (*TexCoordPtr[MAX_TEXTURE_UNITS])[4];
284
285 struct vertex_arrays v;
286
287 struct __GLcontextRec *backref;
288
289 /* Normal lengths, zero if not available.
290 */
291 GLfloat *NormalLengths;
292 GLuint LastCalcedLength;
293
294 GLuint Flag[VB_SIZE]; /* bitwise-OR of VERT_ flags */
295 GLchan Color[VB_SIZE][4];
296 GLfloat Obj[VB_SIZE][4];
297 GLfloat Normal[VB_SIZE][3];
298 GLfloat TexCoord[MAX_TEXTURE_UNITS][VB_SIZE][4];
299 GLuint Elt[VB_SIZE];
300 GLubyte EdgeFlag[VB_SIZE];
301 GLuint Index[VB_SIZE];
302 GLubyte SecondaryColor[VB_SIZE][4];
303 GLfloat FogCoord[VB_SIZE];
304 };
305
306
307 /* Not so big on storage these days, although still has pointers to
308 * arrays used for temporary results.
309 */
310 typedef struct vertex_buffer
311 {
312 /* Backpointers.
313 */
314 struct __GLcontextRec *ctx;
315 struct tnl_context *tnlctx;
316
317 /* Driver_data is allocated in Driver.RegisterVB(), if required.
318 */
319 void *driver_data;
320
321 /* List of operations to process vertices in current state.
322 */
323 struct gl_pipeline *pipeline;
324
325 /* Temporary storage used by immediate mode functions and various
326 * operations in the pipeline.
327 */
328 struct immediate *IM;
329 struct vertex_array_pointers store;
330
331 /* Where to find outstanding untransformed vertices.
332 */
333 struct immediate *prev_buffer;
334
335 GLuint Type; /* Either VB_IMMEDIATE or VB_CVA_PRECALC */
336
337 GLuint Size, Start, Count;
338 GLuint Free, FirstFree;
339 GLuint CopyStart;
340 GLuint Parity, Ovf;
341 GLuint PurgeFlags;
342 GLuint IndirectCount; /* defaults to count */
343 GLuint OrFlag, SavedOrFlag;
344 GLuint EarlyCull;
345 GLuint Culled, CullDone;
346
347 /* Pointers to input data - default to buffers in 'im' above.
348 */
349 GLvector4f *ObjPtr;
350 GLvector3f *NormalPtr;
351 GLvector4ub *ColorPtr;
352 GLvector1ui *IndexPtr;
353 GLvector1ub *EdgeFlagPtr;
354 GLvector4f *TexCoordPtr[MAX_TEXTURE_UNITS];
355 GLvector1ui *EltPtr;
356 GLvector4ub *SecondaryColorPtr;
357 GLvector1f *FogCoordPtr;
358 GLuint *Flag, FlagMax;
359 struct gl_material (*Material)[2];
360 GLuint *MaterialMask;
361
362 GLuint *NextPrimitive;
363 GLuint *Primitive;
364 GLuint LastPrimitive;
365
366 GLfloat (*BoundsPtr)[3]; /* Bounds for cull check */
367 GLfloat *NormalLengthPtr; /* Array of precomputed inv. normal lengths */
368
369 /* Holds malloced storage for pipeline data not supplied by
370 * the immediate struct.
371 */
372 GLvector4f Eye;
373 GLvector4f Clip;
374 GLvector4f Win;
375 GLvector4ub BColor; /* not used in cva vb's */
376 GLvector1ui BIndex; /* not used in cva vb's */
377 GLvector4ub BSecondary; /* not used in cva vb's */
378
379 /* Temporary storage - may point into IM, or be dynamically
380 * allocated (for cva).
381 */
382 GLubyte *ClipMask;
383 GLubyte *UserClipMask;
384
385 /* Internal values. Where these point depends on whether
386 * there were any identity matrices defined as transformations
387 * in the pipeline.
388 */
389 GLvector4f *EyePtr;
390 GLvector4f *ClipPtr;
391 GLvector4f *Unprojected;
392 GLvector4f *Projected;
393 GLvector4f *CurrentTexCoord;
394 GLuint *Indirect; /* For eval rescue and cva render */
395
396 /* Currently active colors
397 */
398 GLvector4ub *Color[2];
399 GLvector1ui *Index[2];
400 GLvector4ub *SecondaryColor[2];
401
402 /* Storage for colors which have been lit but not yet fogged.
403 * Required for CVA, just point into store for normal VB's.
404 */
405 GLvector4ub *LitColor[2];
406 GLvector1ui *LitIndex[2];
407 GLvector4ub *LitSecondary[2];
408
409 /* Temporary values used in texgen.
410 */
411 GLfloat (*tmp_f)[3];
412 GLfloat *tmp_m;
413
414 /* Temporary values used in eval.
415 */
416 GLuint *EvaluatedFlags;
417
418 /* Not used for cva:
419 */
420 GLubyte *NormCullStart;
421 GLubyte *CullMask; /* Results of vertex culling */
422 GLubyte *NormCullMask; /* Compressed onto shared normals */
423
424 GLubyte ClipOrMask; /* bitwise-OR of all ClipMask[] values */
425 GLubyte ClipAndMask; /* bitwise-AND of all ClipMask[] values */
426 GLubyte CullFlag[2];
427 GLubyte CullMode; /* see flags below */
428
429 GLuint CopyCount; /* max 3 vertices to copy after transform */
430 GLuint Copy[3];
431 GLfloat CopyProj[3][4]; /* temporary store for projected clip coords */
432
433 /* Hooks for module private data
434 */
435 void *swsetup_vb;
436
437 } TNLvertexbuffer;
438
439
440 typedef void (*gl_shade_func)( struct vertex_buffer *VB );
441
442 typedef void (*clip_interp_func)( struct vertex_buffer *VB, GLuint dst,
443 GLfloat t, GLuint in, GLuint out );
444
445 typedef GLuint (*clip_line_func)( struct vertex_buffer *VB,
446 GLuint *i, GLuint *j,
447 GLubyte mask);
448
449 typedef GLuint (*clip_poly_func)( struct vertex_buffer *VB,
450 GLuint n, GLuint vlist[],
451 GLubyte mask );
452
453
454 #define MAX_PIPELINE_STAGES 30
455
456 #define PIPE_IMMEDIATE 0x1
457 #define PIPE_PRECALC 0x2
458
459 #define PIPE_OP_VERT_XFORM 0x1
460 #define PIPE_OP_NORM_XFORM 0x2
461 #define PIPE_OP_LIGHT 0x4
462 #define PIPE_OP_FOG 0x8
463 #define PIPE_OP_TEX0 0x10
464 #define PIPE_OP_TEX1 0x20
465 #define PIPE_OP_TEX2 0x40
466 #define PIPE_OP_TEX3 0x80
467 #define PIPE_OP_RAST_SETUP_0 0x100
468 #define PIPE_OP_RAST_SETUP_1 0x200
469 #define PIPE_OP_RENDER 0x400
470 #define PIPE_OP_CVA_PREPARE 0x800
471
472
473
474 struct gl_pipeline_stage {
475 const char *name;
476 GLuint ops; /* PIPE_OP flags */
477 GLuint type; /* VERT flags */
478 GLuint special; /* VERT flags - force update_inputs() */
479 GLuint state_change; /* state flags - trigger update_inputs() */
480 GLuint cva_state_change; /* state flags - recalc cva buffer */
481 GLuint elt_forbidden_inputs; /* VERT flags - force a pipeline recalc */
482 GLuint pre_forbidden_inputs; /* VERT flags - force a pipeline recalc */
483 GLuint active; /* VERT flags */
484 GLuint inputs; /* VERT flags */
485 GLuint outputs; /* VERT flags */
486 void (*check)( GLcontext *ctx, struct gl_pipeline_stage * );
487 void (*run)( struct vertex_buffer *VB );
488 };
489
490
491 struct gl_pipeline {
492 GLuint state_change; /* state changes which require recalc */
493 GLuint cva_state_change; /* ... which require re-run */
494 GLuint forbidden_inputs; /* inputs which require recalc */
495 GLuint ops; /* what gets done in this pipe */
496 GLuint changed_ops;
497 GLuint inputs;
498 GLuint outputs;
499 GLuint new_inputs;
500 GLuint new_outputs;
501 GLuint fallback;
502 GLuint type;
503 GLuint pipeline_valid:1;
504 GLuint data_valid:1;
505 GLuint copy_transformed_data:1;
506 GLuint replay_copied_vertices:1;
507 GLuint new_state; /* state changes since last recalc */
508 struct gl_pipeline_stage *stages[MAX_PIPELINE_STAGES];
509 };
510
511
512
513 /* All fields are derived.
514 */
515 struct gl_cva {
516 struct gl_pipeline pre;
517 struct gl_pipeline elt;
518
519 struct gl_client_array Elt;
520 trans_1ui_func EltFunc;
521
522 struct vertex_buffer *VB;
523 struct vertex_arrays v;
524 struct vertex_data store;
525
526 GLuint elt_count;
527 GLenum elt_mode;
528 GLuint elt_size;
529
530 GLuint forbidden_inputs;
531 GLuint orflag;
532 GLuint merge;
533
534 GLuint lock_changed;
535 GLuint last_orflag;
536 GLuint last_array_flags;
537 GLuint last_array_new_state;
538 };
539
540
541
542 typedef void (*texgen_func)( struct vertex_buffer *VB,
543 GLuint textureSet);
544
545
546
547 typedef struct tnl_context {
548
549 GLuint _ArrayFlag[VB_SIZE]; /* crock */
550 GLuint _ArrayFlags;
551 GLuint _ArraySummary; /* Like flags, but no size information */
552 GLuint _ArrayNewState; /* Tracks which arrays have been changed. */
553
554
555 /* Pipeline stages - shared between the two pipelines,
556 * which live in CVA.
557 */
558 struct gl_pipeline_stage PipelineStage[MAX_PIPELINE_STAGES];
559 GLuint NrPipelineStages;
560
561 /* Per-texunit derived state.
562 */
563 GLuint _TexgenSize[MAX_TEXTURE_UNITS];
564 GLuint _TexgenHoles[MAX_TEXTURE_UNITS];
565 texgen_func *_TexgenFunc[MAX_TEXTURE_UNITS];
566
567
568 /* Display list extensions
569 */
570 GLuint opcode_vertex_cassette;
571
572 /* Cva
573 */
574 struct gl_cva CVA;
575 GLboolean CompileCVAFlag;
576
577 clip_poly_func *_poly_clip_tab;
578 clip_line_func *_line_clip_tab;
579 clip_interp_func _ClipInterpFunc; /* Clip interpolation function */
580 normal_func *_NormalTransform;
581 gl_shade_func *_shade_func_tab; /* Current shading function table */
582
583 GLenum _CurrentPrimitive; /* Prim or GL_POLYGON+1 */
584 GLuint _CurrentFlag;
585
586 GLuint _RenderFlags; /* Active inputs to render stage */
587
588 /* Cache of unused immediate structs */
589 struct immediate *freed_im_queue;
590 GLuint nr_im_queued;
591
592 } TNLcontext;
593
594
595
596 #define TNL_CONTEXT(ctx) ((TNLcontext *)(ctx->swtnl_context))
597 #define TNL_CURRENT_IM(ctx) ((struct immediate *)(ctx->swtnl_im))
598 #define TNL_VB(ctx) ((struct vertex_buffer *)(ctx->swtnl_vb))
599
600 extern void _tnl_reset_immediate( GLcontext *ctx );
601 extern GLboolean _tnl_flush_vertices( GLcontext *ctx, GLuint flush_flags );
602
603
604 extern void
605 _tnl_MakeCurrent( GLcontext *ctx,
606 GLframebuffer *drawBuffer,
607 GLframebuffer *readBuffer );
608
609
610 extern void
611 _tnl_LightingSpaceChange( GLcontext *ctx );
612
613 /*
614 * Macros for fetching current input buffer.
615 */
616 #ifdef THREADS
617 #define GET_IMMEDIATE struct immediate *IM = TNL_CURRENT_IM(((GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context())))
618 #define SET_IMMEDIATE(ctx, im) ctx->swtnl_im = (void *)im
619 #else
620 extern struct immediate *_mesa_CurrentInput;
621 #define GET_IMMEDIATE struct immediate *IM = _mesa_CurrentInput
622 #define SET_IMMEDIATE(ctx, im) \
623 do { \
624 ctx->swtnl_im = (void *)im; \
625 _mesa_CurrentInput = im; \
626 } while (0)
627 #endif
628
629 #endif