1 /* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_context.c,v 1.9 2003/09/24 02:43:12 dawes Exp $ */
2 /**************************************************************************
4 Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and
5 VA Linux Systems Inc., Fremont, California.
9 Permission is hereby granted, free of charge, to any person obtaining
10 a copy of this software and associated documentation files (the
11 "Software"), to deal in the Software without restriction, including
12 without limitation the rights to use, copy, modify, merge, publish,
13 distribute, sublicense, and/or sell copies of the Software, and to
14 permit persons to whom the Software is furnished to do so, subject to
15 the following conditions:
17 The above copyright notice and this permission notice (including the
18 next paragraph) shall be included in all copies or substantial
19 portions of the Software.
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
25 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 **************************************************************************/
33 * Kevin E. Martin <martin@valinux.com>
34 * Gareth Hughes <gareth@valinux.com>
35 * Keith Whitwell <keith@tungstengraphics.com>
38 #include "main/glheader.h"
39 #include "main/api_arrayelt.h"
40 #include "main/context.h"
41 #include "main/simple_list.h"
42 #include "main/imports.h"
43 #include "main/matrix.h"
44 #include "main/extensions.h"
45 #include "main/framebuffer.h"
46 #include "main/state.h"
48 #include "swrast/swrast.h"
49 #include "swrast_setup/swrast_setup.h"
53 #include "tnl/t_pipeline.h"
55 #include "drivers/common/driverfuncs.h"
57 #include "radeon_context.h"
58 #include "radeon_ioctl.h"
59 #include "radeon_state.h"
60 #include "radeon_span.h"
61 #include "radeon_tex.h"
62 #include "radeon_swtcl.h"
63 #include "radeon_tcl.h"
64 #include "radeon_maos.h"
66 #define need_GL_ARB_multisample
67 #define need_GL_ARB_texture_compression
68 #define need_GL_ARB_vertex_buffer_object
69 #define need_GL_EXT_blend_minmax
70 #define need_GL_EXT_fog_coord
71 #define need_GL_EXT_secondary_color
72 #include "extension_helper.h"
74 #define DRIVER_DATE "20061018"
78 #include "xmlpool.h" /* for symbolic values of enum-type options */
80 int RADEON_DEBUG
= (0);
84 /* Return various strings for glGetString().
86 static const GLubyte
*radeonGetString( GLcontext
*ctx
, GLenum name
)
88 radeonContextPtr rmesa
= RADEON_CONTEXT(ctx
);
89 static char buffer
[128];
91 GLuint agp_mode
= (rmesa
->radeonScreen
->card_type
==RADEON_CARD_PCI
) ? 0 :
92 rmesa
->radeonScreen
->AGPMode
;
96 return (GLubyte
*)"Tungsten Graphics, Inc.";
99 offset
= driGetRendererString( buffer
, "Radeon", DRIVER_DATE
,
102 sprintf( & buffer
[ offset
], " %sTCL",
103 !(rmesa
->TclFallback
& RADEON_TCL_FALLBACK_TCL_DISABLE
)
106 return (GLubyte
*)buffer
;
114 /* Extension strings exported by the R100 driver.
116 const struct dri_extension card_extensions
[] =
118 { "GL_ARB_multisample", GL_ARB_multisample_functions
},
119 { "GL_ARB_multitexture", NULL
},
120 { "GL_ARB_texture_border_clamp", NULL
},
121 { "GL_ARB_texture_compression", GL_ARB_texture_compression_functions
},
122 { "GL_ARB_texture_env_add", NULL
},
123 { "GL_ARB_texture_env_combine", NULL
},
124 { "GL_ARB_texture_env_crossbar", NULL
},
125 { "GL_ARB_texture_env_dot3", NULL
},
126 { "GL_ARB_texture_mirrored_repeat", NULL
},
127 { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions
},
128 { "GL_EXT_blend_logic_op", NULL
},
129 { "GL_EXT_blend_subtract", GL_EXT_blend_minmax_functions
},
130 { "GL_EXT_fog_coord", GL_EXT_fog_coord_functions
},
131 { "GL_EXT_secondary_color", GL_EXT_secondary_color_functions
},
132 { "GL_EXT_stencil_wrap", NULL
},
133 { "GL_EXT_texture_edge_clamp", NULL
},
134 { "GL_EXT_texture_env_combine", NULL
},
135 { "GL_EXT_texture_env_dot3", NULL
},
136 { "GL_EXT_texture_filter_anisotropic", NULL
},
137 { "GL_EXT_texture_lod_bias", NULL
},
138 { "GL_EXT_texture_mirror_clamp", NULL
},
139 { "GL_ATI_texture_env_combine3", NULL
},
140 { "GL_ATI_texture_mirror_once", NULL
},
141 { "GL_MESA_ycbcr_texture", NULL
},
142 { "GL_NV_blend_square", NULL
},
143 { "GL_SGIS_generate_mipmap", NULL
},
147 extern const struct tnl_pipeline_stage _radeon_render_stage
;
148 extern const struct tnl_pipeline_stage _radeon_tcl_stage
;
150 static const struct tnl_pipeline_stage
*radeon_pipeline
[] = {
152 /* Try and go straight to t&l
156 /* Catch any t&l fallbacks
158 &_tnl_vertex_transform_stage
,
159 &_tnl_normal_transform_stage
,
160 &_tnl_lighting_stage
,
161 &_tnl_fog_coordinate_stage
,
163 &_tnl_texture_transform_stage
,
165 &_radeon_render_stage
,
166 &_tnl_render_stage
, /* FALLBACK: */
172 /* Initialize the driver's misc functions.
174 static void radeonInitDriverFuncs( struct dd_function_table
*functions
)
176 functions
->GetString
= radeonGetString
;
179 static const struct dri_debug_control debug_control
[] =
181 { "fall", DEBUG_FALLBACKS
},
182 { "tex", DEBUG_TEXTURE
},
183 { "ioctl", DEBUG_IOCTL
},
184 { "prim", DEBUG_PRIMS
},
185 { "vert", DEBUG_VERTS
},
186 { "state", DEBUG_STATE
},
187 { "code", DEBUG_CODEGEN
},
188 { "vfmt", DEBUG_VFMT
},
189 { "vtxf", DEBUG_VFMT
},
190 { "verb", DEBUG_VERBOSE
},
191 { "dri", DEBUG_DRI
},
192 { "dma", DEBUG_DMA
},
193 { "san", DEBUG_SANITY
},
194 { "sync", DEBUG_SYNC
},
199 /* Create the device specific context.
202 radeonCreateContext( const __GLcontextModes
*glVisual
,
203 __DRIcontextPrivate
*driContextPriv
,
204 void *sharedContextPrivate
)
206 __DRIscreenPrivate
*sPriv
= driContextPriv
->driScreenPriv
;
207 radeonScreenPtr screen
= (radeonScreenPtr
)(sPriv
->private);
208 struct dd_function_table functions
;
209 radeonContextPtr rmesa
;
210 GLcontext
*ctx
, *shareCtx
;
212 int tcl_mode
, fthrottle_mode
;
215 assert(driContextPriv
);
218 /* Allocate the Radeon context */
219 rmesa
= (radeonContextPtr
) CALLOC( sizeof(*rmesa
) );
223 /* init exp fog table data */
224 radeonInitStaticFogData();
226 /* Parse configuration files.
227 * Do this here so that initialMaxAnisotropy is set before we create
228 * the default textures.
230 driParseConfigFiles (&rmesa
->optionCache
, &screen
->optionCache
,
231 screen
->driScreen
->myNum
, "radeon");
232 rmesa
->initialMaxAnisotropy
= driQueryOptionf(&rmesa
->optionCache
,
233 "def_max_anisotropy");
235 if ( driQueryOptionb( &rmesa
->optionCache
, "hyperz" ) ) {
236 if ( sPriv
->drm_version
.minor
< 13 )
237 fprintf( stderr
, "DRM version 1.%d too old to support HyperZ, "
238 "disabling.\n", sPriv
->drm_version
.minor
);
240 rmesa
->using_hyperz
= GL_TRUE
;
243 if ( sPriv
->drm_version
.minor
>= 15 )
244 rmesa
->texmicrotile
= GL_TRUE
;
246 /* Init default driver functions then plug in our Radeon-specific functions
247 * (the texture functions are especially important)
249 _mesa_init_driver_functions( &functions
);
250 radeonInitDriverFuncs( &functions
);
251 radeonInitTextureFuncs( &functions
);
253 /* Allocate the Mesa context */
254 if (sharedContextPrivate
)
255 shareCtx
= ((radeonContextPtr
) sharedContextPrivate
)->glCtx
;
258 rmesa
->glCtx
= _mesa_create_context(glVisual
, shareCtx
,
259 &functions
, (void *) rmesa
);
264 driContextPriv
->driverPrivate
= rmesa
;
266 /* Init radeon context data */
267 rmesa
->dri
.context
= driContextPriv
;
268 rmesa
->dri
.screen
= sPriv
;
269 rmesa
->dri
.drawable
= NULL
;
270 rmesa
->dri
.readable
= NULL
;
271 rmesa
->dri
.hwContext
= driContextPriv
->hHWContext
;
272 rmesa
->dri
.hwLock
= &sPriv
->pSAREA
->lock
;
273 rmesa
->dri
.fd
= sPriv
->fd
;
274 rmesa
->dri
.drmMinor
= sPriv
->drm_version
.minor
;
276 rmesa
->radeonScreen
= screen
;
277 rmesa
->sarea
= (drm_radeon_sarea_t
*)((GLubyte
*)sPriv
->pSAREA
+
278 screen
->sarea_priv_offset
);
281 rmesa
->dma
.buf0_address
= rmesa
->radeonScreen
->buffers
->list
[0].address
;
283 (void) memset( rmesa
->texture_heaps
, 0, sizeof( rmesa
->texture_heaps
) );
284 make_empty_list( & rmesa
->swapped
);
286 rmesa
->nr_heaps
= screen
->numTexHeaps
;
287 for ( i
= 0 ; i
< rmesa
->nr_heaps
; i
++ ) {
288 rmesa
->texture_heaps
[i
] = driCreateTextureHeap( i
, rmesa
,
291 RADEON_NR_TEX_REGIONS
,
292 (drmTextureRegionPtr
)rmesa
->sarea
->tex_list
[i
],
293 & rmesa
->sarea
->tex_age
[i
],
295 sizeof( radeonTexObj
),
296 (destroy_texture_object_t
*) radeonDestroyTexObj
);
298 driSetTextureSwapCounterLocation( rmesa
->texture_heaps
[i
],
299 & rmesa
->c_textureSwaps
);
301 rmesa
->texture_depth
= driQueryOptioni (&rmesa
->optionCache
,
303 if (rmesa
->texture_depth
== DRI_CONF_TEXTURE_DEPTH_FB
)
304 rmesa
->texture_depth
= ( screen
->cpp
== 4 ) ?
305 DRI_CONF_TEXTURE_DEPTH_32
: DRI_CONF_TEXTURE_DEPTH_16
;
307 rmesa
->swtcl
.RenderIndex
= ~0;
308 rmesa
->hw
.all_dirty
= GL_TRUE
;
310 /* Set the maximum texture size small enough that we can guarentee that
311 * all texture units can bind a maximal texture and have all of them in
312 * texturable memory at once. Depending on the allow_large_textures driconf
313 * setting allow larger textures.
317 ctx
->Const
.MaxTextureUnits
= driQueryOptioni (&rmesa
->optionCache
,
319 ctx
->Const
.MaxTextureImageUnits
= ctx
->Const
.MaxTextureUnits
;
320 ctx
->Const
.MaxTextureCoordUnits
= ctx
->Const
.MaxTextureUnits
;
322 i
= driQueryOptioni( &rmesa
->optionCache
, "allow_large_textures");
324 driCalculateMaxTextureLevels( rmesa
->texture_heaps
,
328 11, /* max 2D texture size is 2048x2048 */
330 9, /* \todo: max cube texture size seems to be 512x512(x6) */
331 11, /* max rect texture size is 2048x2048. */
337 ctx
->Const
.MaxTextureMaxAnisotropy
= 16.0;
341 ctx
->Const
.MinPointSize
= 1.0;
342 ctx
->Const
.MinPointSizeAA
= 1.0;
343 ctx
->Const
.MaxPointSize
= 1.0;
344 ctx
->Const
.MaxPointSizeAA
= 1.0;
346 ctx
->Const
.MinLineWidth
= 1.0;
347 ctx
->Const
.MinLineWidthAA
= 1.0;
348 ctx
->Const
.MaxLineWidth
= 10.0;
349 ctx
->Const
.MaxLineWidthAA
= 10.0;
350 ctx
->Const
.LineWidthGranularity
= 0.0625;
352 /* Set maxlocksize (and hence vb size) small enough to avoid
353 * fallbacks in radeon_tcl.c. ie. guarentee that all vertices can
354 * fit in a single dma buffer for indexed rendering of quad strips,
357 ctx
->Const
.MaxArrayLockSize
=
358 MIN2( ctx
->Const
.MaxArrayLockSize
,
359 RADEON_BUFFER_SIZE
/ RADEON_MAX_TCL_VERTSIZE
);
363 /* Initialize the software rasterizer and helper modules.
365 _swrast_CreateContext( ctx
);
366 _vbo_CreateContext( ctx
);
367 _tnl_CreateContext( ctx
);
368 _swsetup_CreateContext( ctx
);
369 _ae_create_context( ctx
);
371 /* Install the customized pipeline:
373 _tnl_destroy_pipeline( ctx
);
374 _tnl_install_pipeline( ctx
, radeon_pipeline
);
376 /* Try and keep materials and vertices separate:
378 /* _tnl_isolate_materials( ctx, GL_TRUE ); */
380 /* Configure swrast and T&L to match hardware characteristics:
382 _swrast_allow_pixel_fog( ctx
, GL_FALSE
);
383 _swrast_allow_vertex_fog( ctx
, GL_TRUE
);
384 _tnl_allow_pixel_fog( ctx
, GL_FALSE
);
385 _tnl_allow_vertex_fog( ctx
, GL_TRUE
);
388 for ( i
= 0 ; i
< RADEON_MAX_TEXTURE_UNITS
; i
++ ) {
389 _math_matrix_ctr( &rmesa
->TexGenMatrix
[i
] );
390 _math_matrix_ctr( &rmesa
->tmpmat
[i
] );
391 _math_matrix_set_identity( &rmesa
->TexGenMatrix
[i
] );
392 _math_matrix_set_identity( &rmesa
->tmpmat
[i
] );
395 driInitExtensions( ctx
, card_extensions
, GL_TRUE
);
396 if (rmesa
->radeonScreen
->drmSupportsCubeMapsR100
)
397 _mesa_enable_extension( ctx
, "GL_ARB_texture_cube_map" );
398 if (rmesa
->glCtx
->Mesa_DXTn
) {
399 _mesa_enable_extension( ctx
, "GL_EXT_texture_compression_s3tc" );
400 _mesa_enable_extension( ctx
, "GL_S3_s3tc" );
402 else if (driQueryOptionb (&rmesa
->optionCache
, "force_s3tc_enable")) {
403 _mesa_enable_extension( ctx
, "GL_EXT_texture_compression_s3tc" );
406 if (rmesa
->dri
.drmMinor
>= 9)
407 _mesa_enable_extension( ctx
, "GL_NV_texture_rectangle");
409 /* XXX these should really go right after _mesa_init_driver_functions() */
410 radeonInitIoctlFuncs( ctx
);
411 radeonInitStateFuncs( ctx
);
412 radeonInitSpanFuncs( ctx
);
413 radeonInitState( rmesa
);
414 radeonInitSwtcl( ctx
);
416 _mesa_vector4f_alloc( &rmesa
->tcl
.ObjClean
, 0,
417 ctx
->Const
.MaxArrayLockSize
, 32 );
419 fthrottle_mode
= driQueryOptioni(&rmesa
->optionCache
, "fthrottle_mode");
420 rmesa
->iw
.irq_seq
= -1;
421 rmesa
->irqsEmitted
= 0;
422 rmesa
->do_irqs
= (rmesa
->radeonScreen
->irq
!= 0 &&
423 fthrottle_mode
== DRI_CONF_FTHROTTLE_IRQS
);
425 rmesa
->do_usleeps
= (fthrottle_mode
== DRI_CONF_FTHROTTLE_USLEEPS
);
427 rmesa
->vblank_flags
= (rmesa
->radeonScreen
->irq
!= 0)
428 ? driGetDefaultVBlankFlags(&rmesa
->optionCache
) : VBLANK_FLAG_NO_IRQ
;
430 (*dri_interface
->getUST
)( & rmesa
->swap_ust
);
434 RADEON_DEBUG
= driParseDebugString( getenv( "RADEON_DEBUG" ),
438 tcl_mode
= driQueryOptioni(&rmesa
->optionCache
, "tcl_mode");
439 if (driQueryOptionb(&rmesa
->optionCache
, "no_rast")) {
440 fprintf(stderr
, "disabling 3D acceleration\n");
441 FALLBACK(rmesa
, RADEON_FALLBACK_DISABLE
, 1);
442 } else if (tcl_mode
== DRI_CONF_TCL_SW
||
443 !(rmesa
->radeonScreen
->chip_flags
& RADEON_CHIPSET_TCL
)) {
444 if (rmesa
->radeonScreen
->chip_flags
& RADEON_CHIPSET_TCL
) {
445 rmesa
->radeonScreen
->chip_flags
&= ~RADEON_CHIPSET_TCL
;
446 fprintf(stderr
, "Disabling HW TCL support\n");
448 TCL_FALLBACK(rmesa
->glCtx
, RADEON_TCL_FALLBACK_TCL_DISABLE
, 1);
451 if (rmesa
->radeonScreen
->chip_flags
& RADEON_CHIPSET_TCL
) {
452 /* _tnl_need_dlist_norm_lengths( ctx, GL_FALSE ); */
458 /* Destroy the device specific context.
460 /* Destroy the Mesa and driver specific context data.
462 void radeonDestroyContext( __DRIcontextPrivate
*driContextPriv
)
464 GET_CURRENT_CONTEXT(ctx
);
465 radeonContextPtr rmesa
= (radeonContextPtr
) driContextPriv
->driverPrivate
;
466 radeonContextPtr current
= ctx
? RADEON_CONTEXT(ctx
) : NULL
;
468 /* check if we're deleting the currently bound context */
469 if (rmesa
== current
) {
470 RADEON_FIREVERTICES( rmesa
);
471 _mesa_make_current(NULL
, NULL
, NULL
);
474 /* Free radeon context resources */
475 assert(rmesa
); /* should never be null */
477 GLboolean release_texture_heaps
;
480 release_texture_heaps
= (rmesa
->glCtx
->Shared
->RefCount
== 1);
481 _swsetup_DestroyContext( rmesa
->glCtx
);
482 _tnl_DestroyContext( rmesa
->glCtx
);
483 _vbo_DestroyContext( rmesa
->glCtx
);
484 _swrast_DestroyContext( rmesa
->glCtx
);
486 radeonDestroySwtcl( rmesa
->glCtx
);
487 radeonReleaseArrays( rmesa
->glCtx
, ~0 );
488 if (rmesa
->dma
.current
.buf
) {
489 radeonReleaseDmaRegion( rmesa
, &rmesa
->dma
.current
, __FUNCTION__
);
490 radeonFlushCmdBuf( rmesa
, __FUNCTION__
);
493 _mesa_vector4f_free( &rmesa
->tcl
.ObjClean
);
495 if (rmesa
->state
.scissor
.pClipRects
) {
496 FREE(rmesa
->state
.scissor
.pClipRects
);
497 rmesa
->state
.scissor
.pClipRects
= NULL
;
500 if ( release_texture_heaps
) {
501 /* This share group is about to go away, free our private
502 * texture object data.
506 for ( i
= 0 ; i
< rmesa
->nr_heaps
; i
++ ) {
507 driDestroyTextureHeap( rmesa
->texture_heaps
[ i
] );
508 rmesa
->texture_heaps
[ i
] = NULL
;
511 assert( is_empty_list( & rmesa
->swapped
) );
514 /* free the Mesa context */
515 rmesa
->glCtx
->DriverCtx
= NULL
;
516 _mesa_destroy_context( rmesa
->glCtx
);
518 /* free the option cache */
519 driDestroyOptionCache (&rmesa
->optionCache
);
529 radeonSwapBuffers( __DRIdrawablePrivate
*dPriv
)
532 if (dPriv
->driContextPriv
&& dPriv
->driContextPriv
->driverPrivate
) {
533 radeonContextPtr rmesa
;
535 rmesa
= (radeonContextPtr
) dPriv
->driContextPriv
->driverPrivate
;
537 if (ctx
->Visual
.doubleBufferMode
) {
538 _mesa_notifySwapBuffers( ctx
); /* flush pending rendering comands */
540 if ( rmesa
->doPageFlip
) {
541 radeonPageFlip( dPriv
);
544 radeonCopyBuffer( dPriv
, NULL
);
549 /* XXX this shouldn't be an error but we can't handle it for now */
550 _mesa_problem(NULL
, "%s: drawable has no context!", __FUNCTION__
);
554 void radeonCopySubBuffer(__DRIdrawablePrivate
* dPriv
,
555 int x
, int y
, int w
, int h
)
557 if (dPriv
->driContextPriv
&& dPriv
->driContextPriv
->driverPrivate
) {
558 radeonContextPtr radeon
;
561 radeon
= (radeonContextPtr
) dPriv
->driContextPriv
->driverPrivate
;
564 if (ctx
->Visual
.doubleBufferMode
) {
565 drm_clip_rect_t rect
;
566 rect
.x1
= x
+ dPriv
->x
;
567 rect
.y1
= (dPriv
->h
- y
- h
) + dPriv
->y
;
568 rect
.x2
= rect
.x1
+ w
;
569 rect
.y2
= rect
.y1
+ h
;
570 _mesa_notifySwapBuffers(ctx
); /* flush pending rendering comands */
571 radeonCopyBuffer(dPriv
, &rect
);
574 /* XXX this shouldn't be an error but we can't handle it for now */
575 _mesa_problem(NULL
, "%s: drawable has no context!",
580 /* Make context `c' the current context and bind it to the given
581 * drawing and reading surfaces.
584 radeonMakeCurrent( __DRIcontextPrivate
*driContextPriv
,
585 __DRIdrawablePrivate
*driDrawPriv
,
586 __DRIdrawablePrivate
*driReadPriv
)
588 if ( driContextPriv
) {
589 radeonContextPtr newCtx
=
590 (radeonContextPtr
) driContextPriv
->driverPrivate
;
592 if (RADEON_DEBUG
& DEBUG_DRI
)
593 fprintf(stderr
, "%s ctx %p\n", __FUNCTION__
, (void *) newCtx
->glCtx
);
595 if ( newCtx
->dri
.drawable
!= driDrawPriv
) {
596 /* XXX we may need to validate the drawable here!!! */
597 driDrawableInitVBlank( driDrawPriv
);
600 newCtx
->dri
.readable
= driReadPriv
;
602 if ( (newCtx
->dri
.drawable
!= driDrawPriv
) ||
603 newCtx
->lastStamp
!= driDrawPriv
->lastStamp
) {
604 newCtx
->dri
.drawable
= driDrawPriv
;
606 radeonSetCliprects(newCtx
);
607 radeonUpdateViewportOffset( newCtx
->glCtx
);
610 _mesa_make_current( newCtx
->glCtx
,
611 (GLframebuffer
*) driDrawPriv
->driverPrivate
,
612 (GLframebuffer
*) driReadPriv
->driverPrivate
);
614 _mesa_update_state( newCtx
->glCtx
);
616 if (RADEON_DEBUG
& DEBUG_DRI
)
617 fprintf(stderr
, "%s ctx is null\n", __FUNCTION__
);
618 _mesa_make_current( NULL
, NULL
, NULL
);
621 if (RADEON_DEBUG
& DEBUG_DRI
)
622 fprintf(stderr
, "End %s\n", __FUNCTION__
);
626 /* Force the context `c' to be unbound from its buffer.
629 radeonUnbindContext( __DRIcontextPrivate
*driContextPriv
)
631 radeonContextPtr rmesa
= (radeonContextPtr
) driContextPriv
->driverPrivate
;
633 if (RADEON_DEBUG
& DEBUG_DRI
)
634 fprintf(stderr
, "%s ctx %p\n", __FUNCTION__
, (void *) rmesa
->glCtx
);