XQuartz: GLX: Create a new dispatch table rather than modifying the existing one
Fixes regression introduced by b0c665ac0f
0   X11.bin                       	0x0000000100118293 __glXAquaScreenCreateContext + 684
1   X11.bin                       	0x00000001001315b0 DoCreateContext + 163
2   X11.bin                       	0x000000010013509f __glXDispatch + 211
3   X11.bin                       	0x00000001000c7dad Dispatch + 785
4   X11.bin                       	0x00000001000b97e5 dix_main + 1022
5   X11.bin                       	0x00000001000122bc server_thread + 50
6   libSystem.B.dylib             	0x00007fff836554f6 _pthread_start + 331
7   libSystem.B.dylib             	0x00007fff836553a9 thread_start + 13
http://lists.apple.com/archives/X11-users/2011/May/msg00045.html
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
			
			
This commit is contained in:
		
							parent
							
								
									c5b72fd350
								
							
						
					
					
						commit
						38df706c6b
					
				|  | @ -666,7 +666,15 @@ GLuint __glFloorLog2(GLuint val) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void setup_dispatch_table(void) { | static void setup_dispatch_table(void) { | ||||||
|     struct _glapi_table *disp=_glapi_get_dispatch(); |     static struct _glapi_table *disp = NULL; | ||||||
|  | 
 | ||||||
|  |     if(disp)  { | ||||||
|  |         _glapi_set_dispatch(disp); | ||||||
|  |         return; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     disp=calloc(1,sizeof(struct _glapi_table)); | ||||||
|  |     assert(disp); | ||||||
| 
 | 
 | ||||||
|     /* to update:
 |     /* to update:
 | ||||||
|      * for f in $(grep 'define SET_' ../../../glx/dispatch.h  | cut -f2 -d' ' | cut -f1 -d\( | sort -u); do grep -q $f indirect.c || echo $f ; done | grep -v by_offset | sed 's:SET_\(.*\)$:SET_\1(disp, gl\1)\;:' | pbcopy |      * for f in $(grep 'define SET_' ../../../glx/dispatch.h  | cut -f2 -d' ' | cut -f1 -d\( | sort -u); do grep -q $f indirect.c || echo $f ; done | grep -v by_offset | sed 's:SET_\(.*\)$:SET_\1(disp, gl\1)\;:' | pbcopy | ||||||
|  | @ -1610,4 +1618,6 @@ static void setup_dispatch_table(void) { | ||||||
|     SET_PixelTexGenParameterivSGIS(disp, glPixelTexGenParameterivSGIS); |     SET_PixelTexGenParameterivSGIS(disp, glPixelTexGenParameterivSGIS); | ||||||
|     SET_PixelTexGenSGIX(disp, glPixelTexGenSGIX); |     SET_PixelTexGenSGIX(disp, glPixelTexGenSGIX); | ||||||
| #endif | #endif | ||||||
|  | 
 | ||||||
|  |     _glapi_set_dispatch(disp); | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue