Compare commits
	
		
			25 Commits
		
	
	
		
			mesa-23.1.
			...
			mesa_7_0
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 131baefac3 | ||
|  | a450078b67 | ||
|  | f6b041bf6c | ||
|  | 4f340d181a | ||
|  | b58e38e936 | ||
|  | 8713cb48a8 | ||
|  | 277c5e57ed | ||
|  | b3d62d5af5 | ||
|  | 9c0f0c8d81 | ||
|  | 18a0a2a7ac | ||
|  | 8b99d9e33c | ||
|  | 01e7e153e3 | ||
|  | 0ad4ca24d2 | ||
|  | 724a155552 | ||
|  | d38b74a316 | ||
|  | 54cab4b47b | ||
|  | c093666bc5 | ||
|  | 04972f6761 | ||
|  | 67f8234622 | ||
|  | 201d6dbd9c | ||
|  | fbcac5aa83 | ||
|  | 2b72ab8f8f | ||
|  | 0ea97b9408 | ||
|  | 28683ac7c0 | ||
|  | c72e3e210f | 
							
								
								
									
										8
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Makefile
									
									
									
									
									
								
							| @@ -162,10 +162,10 @@ ultrix-gcc: | |||||||
|  |  | ||||||
| # Rules for making release tarballs | # Rules for making release tarballs | ||||||
|  |  | ||||||
| DIRECTORY = Mesa-7.1pre | DIRECTORY = Mesa-7.0 | ||||||
| LIB_NAME = MesaLib-7.1pre | LIB_NAME = MesaLib-7.0 | ||||||
| DEMO_NAME = MesaDemos-7.1pre | DEMO_NAME = MesaDemos-7.0 | ||||||
| GLUT_NAME = MesaGLUT-7.1pre | GLUT_NAME = MesaGLUT-7.0 | ||||||
|  |  | ||||||
| MAIN_FILES = \ | MAIN_FILES = \ | ||||||
| 	$(DIRECTORY)/Makefile*						\ | 	$(DIRECTORY)/Makefile*						\ | ||||||
|   | |||||||
| @@ -104,6 +104,10 @@ do | |||||||
| 	    # this is a special case (see bugzilla 10876) | 	    # this is a special case (see bugzilla 10876) | ||||||
| 	    DEPS="$DEPS $1" | 	    DEPS="$DEPS $1" | ||||||
| 	    ;; | 	    ;; | ||||||
|  | 	'-pthread') | ||||||
|  | 	    # for FreeBSD | ||||||
|  | 	    DEPS="$DEPS -pthread" | ||||||
|  | 	    ;; | ||||||
| 	'-cplusplus') | 	'-cplusplus') | ||||||
| 	    CPLUSPLUS=1 | 	    CPLUSPLUS=1 | ||||||
| 	    ;; | 	    ;; | ||||||
|   | |||||||
| @@ -27,9 +27,9 @@ ASM_SOURCES = | |||||||
| # Library/program dependencies | # Library/program dependencies | ||||||
| LIBDRM_CFLAGS = `pkg-config --cflags libdrm` | LIBDRM_CFLAGS = `pkg-config --cflags libdrm` | ||||||
| LIBDRM_LIB = `pkg-config --libs libdrm` | LIBDRM_LIB = `pkg-config --libs libdrm` | ||||||
| DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat $(LIBDRM_LIB) | DRI_LIB_DEPS = -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB) | ||||||
| GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ | GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ | ||||||
| 	-lm -lpthread $(LIBDRM_LIB) | 	-lm -pthread $(LIBDRM_LIB) | ||||||
|  |  | ||||||
| GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm | GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm | ||||||
| GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lX11 | GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lX11 | ||||||
|   | |||||||
| @@ -9,11 +9,7 @@ | |||||||
| <H1>Downloading</H1> | <H1>Downloading</H1> | ||||||
|  |  | ||||||
| <p> | <p> | ||||||
| Last development release: <b>6.5.3</b> | Last stable release: <b>7.0</b> | ||||||
| </p> |  | ||||||
|  |  | ||||||
| <p> |  | ||||||
| Last stable release: <b>6.4.2</b> |  | ||||||
| </p> | </p> | ||||||
|  |  | ||||||
| <p> | <p> | ||||||
|   | |||||||
| @@ -129,7 +129,7 @@ GL_ARB_fragment_program extensions. | |||||||
| </p> | </p> | ||||||
|  |  | ||||||
| <p> | <p> | ||||||
| May 2007: Mesa 7.0 is released, implementing the OpenGL 2.1 specification | June 2007: Mesa 7.0 is released, implementing the OpenGL 2.1 specification | ||||||
| and OpenGL Shading Language. | and OpenGL Shading Language. | ||||||
| </p> | </p> | ||||||
|  |  | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ | |||||||
| <H1>News</H1> | <H1>News</H1> | ||||||
|  |  | ||||||
|  |  | ||||||
| <h2>May ???, 2007</h2> | <h2>June 22, 2007</h2> | ||||||
| <p> | <p> | ||||||
| <a href="relnotes-7.0.html">Mesa 7.0</a> is released. | <a href="relnotes-7.0.html">Mesa 7.0</a> is released. | ||||||
| This is a stable release featuring OpenGL 2.1 support. | This is a stable release featuring OpenGL 2.1 support. | ||||||
|   | |||||||
| @@ -8,10 +8,11 @@ | |||||||
|  |  | ||||||
| <body bgcolor="#eeeeee"> | <body bgcolor="#eeeeee"> | ||||||
|  |  | ||||||
| <H1>Mesa 7.0 Release Notes / (<em>in progress</em>)</H1> | <H1>Mesa 7.0 Release Notes / June 22, 2007</H1> | ||||||
|  |  | ||||||
| <p> | <p> | ||||||
| Mesa 7.0 is a stable release, featuring OpenGL 2.1 API support. | Mesa 7.0 is a stable release, featuring OpenGL 2.1 API support. | ||||||
|  | A number of bugs have been fixed since the 6.5.3 release. | ||||||
| </p> | </p> | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -37,6 +38,12 @@ TBD | |||||||
| <li>Fixed R300 vertex program/matrix bug (10848) | <li>Fixed R300 vertex program/matrix bug (10848) | ||||||
| <li>GLSL dFdx() and dFdy() work for fragment program inputs now (texcoords) | <li>GLSL dFdx() and dFdy() work for fragment program inputs now (texcoords) | ||||||
| <li>Specifying an invalid texture unit as a sampler could lead to a crash | <li>Specifying an invalid texture unit as a sampler could lead to a crash | ||||||
|  | <li>The GLX protocol request for glXDestroyPBuffer() was incorrect (bug 10983) | ||||||
|  | <li>ARB vp state.light[n].half value was incorrect (bug 10987) | ||||||
|  | <li>Fixed a positional light source bug (bug 11009) | ||||||
|  | <li>Fixed point size attenuation problem (bug 11042) | ||||||
|  | <li>glPopAttrib didn't restore texture object's LOD bias (bug 11049) | ||||||
|  | <li>Fixed a TLS / TEXTREL problem (bug 7459) | ||||||
| </ul> | </ul> | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,8 +1,8 @@ | |||||||
| /* | /* | ||||||
|  * Mesa 3-D graphics library |  * Mesa 3-D graphics library | ||||||
|  * Version:  6.5.1 |  * Version:  7.0 | ||||||
|  * |  * | ||||||
|  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved. |  * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved. | ||||||
|  * |  * | ||||||
|  * Permission is hereby granted, free of charge, to any person obtaining a |  * Permission is hereby granted, free of charge, to any person obtaining a | ||||||
|  * copy of this software and associated documentation files (the "Software"), |  * copy of this software and associated documentation files (the "Software"), | ||||||
|   | |||||||
| @@ -150,7 +150,7 @@ DestroyPbuffer( Display * dpy, GLXDrawable drawable ) | |||||||
|    if ( (priv->majorVersion > 1) || (priv->minorVersion >= 3) ) { |    if ( (priv->majorVersion > 1) || (priv->minorVersion >= 3) ) { | ||||||
|       xGLXDestroyPbufferReq * req; |       xGLXDestroyPbufferReq * req; | ||||||
|  |  | ||||||
|       GetReqExtra( GLXDestroyPbuffer, 4, req ); |       GetReq( GLXDestroyPbuffer, req ); | ||||||
|       req->reqType = opcode; |       req->reqType = opcode; | ||||||
|       req->glxCode = X_GLXDestroyPbuffer; |       req->glxCode = X_GLXDestroyPbuffer; | ||||||
|       req->pbuffer = (GLXPbuffer) drawable; |       req->pbuffer = (GLXPbuffer) drawable; | ||||||
|   | |||||||
| @@ -172,12 +172,8 @@ static void i915LayoutTextureImages( i915ContextPtr i915, | |||||||
| 	  | 	  | ||||||
| 	 t->intel.image[0][i].offset = total_height * pitch; | 	 t->intel.image[0][i].offset = total_height * pitch; | ||||||
| 	 t->intel.image[0][i].internalFormat = baseImage->_BaseFormat; | 	 t->intel.image[0][i].internalFormat = baseImage->_BaseFormat; | ||||||
| 	 if (t->intel.image[0][i].image->IsCompressed) | 	 if (t->intel.image[0][i].image->IsCompressed) { | ||||||
| 	 { | 	    total_height += (t->intel.image[0][i].image->Height + 3) / 4; | ||||||
| 	   if (t->intel.image[0][i].image->Height > 4) |  | ||||||
| 	     total_height += t->intel.image[0][i].image->Height/4; |  | ||||||
| 	   else |  | ||||||
| 	     total_height += 1; |  | ||||||
| 	 } | 	 } | ||||||
| 	 else | 	 else | ||||||
| 	   total_height += MAX2(2, t->intel.image[0][i].image->Height); | 	   total_height += MAX2(2, t->intel.image[0][i].image->Height); | ||||||
|   | |||||||
| @@ -634,11 +634,32 @@ static void intelUploadTexImage( intelContextPtr intel, | |||||||
| 			       image->Height); | 			       image->Height); | ||||||
|    } |    } | ||||||
|    else if (image->IsCompressed) { |    else if (image->IsCompressed) { | ||||||
|       GLuint row_len = image->Width * 2; |       GLuint row_len = 0; | ||||||
|       GLubyte *dst = (GLubyte *)(t->BufAddr + offset); |       GLubyte *dst = (GLubyte *)(t->BufAddr + offset); | ||||||
|       GLubyte *src = (GLubyte *)image->Data; |       GLubyte *src = (GLubyte *)image->Data; | ||||||
|       GLuint j; |       GLuint j; | ||||||
|  |  | ||||||
|  |       /* must always copy whole blocks (8/16 bytes) */ | ||||||
|  |       switch (image->InternalFormat) { | ||||||
|  | 	case GL_COMPRESSED_RGB_FXT1_3DFX: | ||||||
|  | 	case GL_COMPRESSED_RGBA_FXT1_3DFX: | ||||||
|  | 	case GL_RGB_S3TC: | ||||||
|  | 	case GL_RGB4_S3TC: | ||||||
|  | 	case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: | ||||||
|  | 	case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: | ||||||
|  | 	  row_len = (image->Width * 2 + 7) & ~7; | ||||||
|  | 	  break; | ||||||
|  | 	case GL_RGBA_S3TC: | ||||||
|  | 	case GL_RGBA4_S3TC: | ||||||
|  | 	case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: | ||||||
|  | 	case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: | ||||||
|  | 	  row_len = (image->Width * 4 + 15) & ~15; | ||||||
|  | 	  break; | ||||||
|  | 	default: | ||||||
|  | 	  fprintf(stderr,"Internal Compressed format not supported %d\n", image->InternalFormat); | ||||||
|  | 	  break; | ||||||
|  |       } | ||||||
|  |  | ||||||
|       if (INTEL_DEBUG & DEBUG_TEXTURE) |       if (INTEL_DEBUG & DEBUG_TEXTURE) | ||||||
| 	 fprintf(stderr,  | 	 fprintf(stderr,  | ||||||
| 		 "Upload image %dx%dx%d offset %xm row_len %x " | 		 "Upload image %dx%dx%d offset %xm row_len %x " | ||||||
| @@ -646,30 +667,11 @@ static void intelUploadTexImage( intelContextPtr intel, | |||||||
| 		 image->Width, image->Height, image->Depth, offset, | 		 image->Width, image->Height, image->Depth, offset, | ||||||
| 		 row_len, t->Pitch, t->depth_pitch); | 		 row_len, t->Pitch, t->depth_pitch); | ||||||
|  |  | ||||||
|       switch (image->InternalFormat) { |       if (row_len) { | ||||||
| 	case GL_COMPRESSED_RGB_FXT1_3DFX: | 	 for (j = 0 ; j < (image->Height + 3)/4 ; j++, dst += (t->Pitch)) { | ||||||
| 	case GL_COMPRESSED_RGBA_FXT1_3DFX: | 	   __memcpy(dst, src, row_len ); | ||||||
| 	case GL_RGB_S3TC: | 	   src += row_len; | ||||||
| 	case GL_RGB4_S3TC: | 	 } | ||||||
| 	case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: |  | ||||||
| 	case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: |  | ||||||
| 	  for (j = 0 ; j < image->Height/4 ; j++, dst += (t->Pitch)) { |  | ||||||
| 	    __memcpy(dst, src, row_len ); |  | ||||||
| 	    src += row_len; |  | ||||||
| 	  } |  | ||||||
| 	  break; |  | ||||||
| 	case GL_RGBA_S3TC: |  | ||||||
| 	case GL_RGBA4_S3TC: |  | ||||||
| 	case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: |  | ||||||
| 	case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: |  | ||||||
| 	  for (j = 0 ; j < image->Height/4 ; j++, dst += (t->Pitch)) { |  | ||||||
| 	    __memcpy(dst, src, (image->Width*4) ); |  | ||||||
| 	    src += image->Width*4; |  | ||||||
| 	  } |  | ||||||
| 	  break; |  | ||||||
| 	default: |  | ||||||
| 	  fprintf(stderr,"Internal Compressed format not supported %d\n", image->InternalFormat); |  | ||||||
| 	  break; |  | ||||||
|       } |       } | ||||||
|    } |    } | ||||||
|    /* Time for another vtbl entry: |    /* Time for another vtbl entry: | ||||||
|   | |||||||
| @@ -161,11 +161,9 @@ i915_miptree_layout(struct intel_mipmap_tree * mt) | |||||||
|             if (mt->compressed) |             if (mt->compressed) | ||||||
|                img_height = MAX2(1, height / 4); |                img_height = MAX2(1, height / 4); | ||||||
|             else |             else | ||||||
|                img_height = MAX2(2, height); |                img_height = (MAX2(2, height) + 1) & ~1; | ||||||
|  |  | ||||||
| 	    mt->total_height += img_height; | 	    mt->total_height += img_height; | ||||||
| 	    mt->total_height += 1; |  | ||||||
| 	    mt->total_height &= ~1; |  | ||||||
|  |  | ||||||
|             width = minify(width); |             width = minify(width); | ||||||
|             height = minify(height); |             height = minify(height); | ||||||
|   | |||||||
| @@ -105,6 +105,8 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) | |||||||
| { | { | ||||||
|    struct gl_texture_object *tObj = intel->ctx.Texture.Unit[unit]._Current; |    struct gl_texture_object *tObj = intel->ctx.Texture.Unit[unit]._Current; | ||||||
|    struct intel_texture_object *intelObj = intel_texture_object(tObj); |    struct intel_texture_object *intelObj = intel_texture_object(tObj); | ||||||
|  |    int comp_byte = 0; | ||||||
|  |    int cpp; | ||||||
|  |  | ||||||
|    GLuint face, i; |    GLuint face, i; | ||||||
|    GLuint nr_faces = 0; |    GLuint nr_faces = 0; | ||||||
| @@ -148,6 +150,12 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) | |||||||
|       intel_miptree_reference(&intelObj->mt, firstImage->mt); |       intel_miptree_reference(&intelObj->mt, firstImage->mt); | ||||||
|    } |    } | ||||||
|  |  | ||||||
|  |    if (firstImage->base.IsCompressed) { | ||||||
|  |       comp_byte = intel_compressed_num_bytes(firstImage->base.TexFormat->MesaFormat); | ||||||
|  |       cpp = comp_byte; | ||||||
|  |    } | ||||||
|  |    else cpp = firstImage->base.TexFormat->TexelBytes; | ||||||
|  |  | ||||||
|    /* Check tree can hold all active levels.  Check tree matches |    /* Check tree can hold all active levels.  Check tree matches | ||||||
|     * target, imageFormat, etc. |     * target, imageFormat, etc. | ||||||
|     *  |     *  | ||||||
| @@ -165,7 +173,7 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) | |||||||
| 	intelObj->mt->width0 != firstImage->base.Width || | 	intelObj->mt->width0 != firstImage->base.Width || | ||||||
| 	intelObj->mt->height0 != firstImage->base.Height || | 	intelObj->mt->height0 != firstImage->base.Height || | ||||||
| 	intelObj->mt->depth0 != firstImage->base.Depth || | 	intelObj->mt->depth0 != firstImage->base.Depth || | ||||||
| 	intelObj->mt->cpp != firstImage->base.TexFormat->TexelBytes || | 	intelObj->mt->cpp != cpp || | ||||||
| 	intelObj->mt->compressed != firstImage->base.IsCompressed)) { | 	intelObj->mt->compressed != firstImage->base.IsCompressed)) { | ||||||
|       intel_miptree_release(intel, &intelObj->mt); |       intel_miptree_release(intel, &intelObj->mt); | ||||||
|    } |    } | ||||||
| @@ -174,10 +182,6 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) | |||||||
|    /* May need to create a new tree: |    /* May need to create a new tree: | ||||||
|     */ |     */ | ||||||
|    if (!intelObj->mt) { |    if (!intelObj->mt) { | ||||||
|       int comp_byte = 0; |  | ||||||
|        |  | ||||||
|       if (firstImage->base.IsCompressed) |  | ||||||
| 	 comp_byte = intel_compressed_num_bytes(firstImage->base.TexFormat->MesaFormat); |  | ||||||
|       intelObj->mt = intel_miptree_create(intel, |       intelObj->mt = intel_miptree_create(intel, | ||||||
|                                           intelObj->base.Target, |                                           intelObj->base.Target, | ||||||
|                                           firstImage->base.InternalFormat, |                                           firstImage->base.InternalFormat, | ||||||
| @@ -186,8 +190,7 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) | |||||||
|                                           firstImage->base.Width, |                                           firstImage->base.Width, | ||||||
|                                           firstImage->base.Height, |                                           firstImage->base.Height, | ||||||
|                                           firstImage->base.Depth, |                                           firstImage->base.Depth, | ||||||
|                                           firstImage->base.TexFormat-> |                                           cpp, | ||||||
|                                           TexelBytes, |  | ||||||
|                                           comp_byte); |                                           comp_byte); | ||||||
|    } |    } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -74,7 +74,7 @@ void i945_miptree_layout_2d( struct intel_mipmap_tree *mt ) | |||||||
|       GLuint img_height; |       GLuint img_height; | ||||||
|  |  | ||||||
|       intel_miptree_set_level_info(mt, level, 1, x, y, width,  |       intel_miptree_set_level_info(mt, level, 1, x, y, width,  | ||||||
| 				   mt->compressed ? height/4 : height, 1); | 				   height, 1); | ||||||
|  |  | ||||||
|       if (mt->compressed) |       if (mt->compressed) | ||||||
| 	 img_height = MAX2(1, height/4); | 	 img_height = MAX2(1, height/4); | ||||||
|   | |||||||
| @@ -141,7 +141,7 @@ static void | |||||||
| SetCurrentContext(GLXContext c) | SetCurrentContext(GLXContext c) | ||||||
| { | { | ||||||
| #if defined(GLX_USE_TLS) | #if defined(GLX_USE_TLS) | ||||||
|    CurrentContext = context; |    CurrentContext = c; | ||||||
| #elif defined(THREADS) | #elif defined(THREADS) | ||||||
|    _glthread_SetTSD(&ContextTSD, c); |    _glthread_SetTSD(&ContextTSD, c); | ||||||
| #else | #else | ||||||
|   | |||||||
| @@ -82,12 +82,18 @@ class PrintGenericStubs(gl_XML.gl_print_base): | |||||||
| 		print '' | 		print '' | ||||||
| 		print '#ifdef GLX_USE_TLS' | 		print '#ifdef GLX_USE_TLS' | ||||||
| 		print '' | 		print '' | ||||||
|  | 		print '#ifdef GLX_X86_READONLY_TEXT' | ||||||
|  | 		print '# define CTX_INSNS MOV_L(GS:(EAX), EAX)' | ||||||
|  | 		print '#else' | ||||||
|  | 		print '# define CTX_INSNS NOP /* Pad for init_glapi_relocs() */' | ||||||
|  | 		print '#endif' | ||||||
|  | 		print '' | ||||||
| 		print '#  define GL_STUB(fn,off,fn_alt)\t\t\t\\' | 		print '#  define GL_STUB(fn,off,fn_alt)\t\t\t\\' | ||||||
| 		print 'ALIGNTEXT16;\t\t\t\t\t\t\\' | 		print 'ALIGNTEXT16;\t\t\t\t\t\t\\' | ||||||
| 		print 'GLOBL_FN(GL_PREFIX(fn, fn_alt));\t\t\t\\' | 		print 'GLOBL_FN(GL_PREFIX(fn, fn_alt));\t\t\t\\' | ||||||
| 		print 'GL_PREFIX(fn, fn_alt):\t\t\t\t\t\\' | 		print 'GL_PREFIX(fn, fn_alt):\t\t\t\t\t\\' | ||||||
| 		print '\tCALL(_x86_get_dispatch) ;\t\t\t\\' | 		print '\tCALL(_x86_get_dispatch) ;\t\t\t\\' | ||||||
| 		print '\tNOP ;\t\t\t\t\t\t\\' | 		print '\tCTX_INSNS ;					\\' | ||||||
| 		print '\tJMP(GL_OFFSET(off))' | 		print '\tJMP(GL_OFFSET(off))' | ||||||
| 		print '' | 		print '' | ||||||
| 		print '#elif defined(PTHREADS)' | 		print '#elif defined(PTHREADS)' | ||||||
| @@ -138,7 +144,10 @@ class PrintGenericStubs(gl_XML.gl_print_base): | |||||||
| 		print '\tHIDDEN(GLNAME(_x86_get_dispatch))' | 		print '\tHIDDEN(GLNAME(_x86_get_dispatch))' | ||||||
| 		print 'ALIGNTEXT16' | 		print 'ALIGNTEXT16' | ||||||
| 		print 'GLNAME(_x86_get_dispatch):' | 		print 'GLNAME(_x86_get_dispatch):' | ||||||
| 		print '\tmovl\t%gs:_glapi_tls_Dispatch@NTPOFF, %eax' | 		print '\tcall	1f' | ||||||
|  | 		print '1:\tpopl	%eax' | ||||||
|  | 		print '\taddl	$_GLOBAL_OFFSET_TABLE_+[.-1b], %eax' | ||||||
|  | 		print '\tmovl	_glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax' | ||||||
| 		print '\tret' | 		print '\tret' | ||||||
| 		print '' | 		print '' | ||||||
| 		print '#elif defined(PTHREADS)' | 		print '#elif defined(PTHREADS)' | ||||||
| @@ -158,7 +167,7 @@ class PrintGenericStubs(gl_XML.gl_print_base): | |||||||
| 		print '#endif' | 		print '#endif' | ||||||
| 		print '' | 		print '' | ||||||
|  |  | ||||||
| 		print '#if defined( GLX_USE_TLS )' | 		print '#if defined( GLX_USE_TLS ) && !defined( GLX_X86_READONLY_TEXT )' | ||||||
| 		print '\t\t.section\twtext, "awx", @progbits' | 		print '\t\t.section\twtext, "awx", @progbits' | ||||||
| 		print '#endif /* defined( GLX_USE_TLS ) */' | 		print '#endif /* defined( GLX_USE_TLS ) */' | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1028,22 +1028,24 @@ _glapi_check_table(const struct _glapi_table *table) | |||||||
| #if defined(PTHREADS) || defined(GLX_USE_TLS) | #if defined(PTHREADS) || defined(GLX_USE_TLS) | ||||||
| /** | /** | ||||||
|  * Perform platform-specific GL API entry-point fixups. |  * Perform platform-specific GL API entry-point fixups. | ||||||
|  *  |  | ||||||
|  *  |  | ||||||
|  */ |  */ | ||||||
| static void | static void | ||||||
| init_glapi_relocs( void ) | init_glapi_relocs( void ) | ||||||
| { | { | ||||||
| #if defined( USE_X86_ASM ) && defined( GLX_USE_TLS ) | #if defined(USE_X86_ASM) && defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT) | ||||||
|     extern void * _x86_get_dispatch(void); |     extern unsigned long _x86_get_dispatch(void); | ||||||
|     const GLubyte * const get_disp = (const GLubyte *) _x86_get_dispatch; |     char run_time_patch[] = { | ||||||
|  |        0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */ | ||||||
|  |     }; | ||||||
|  |     GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */ | ||||||
|  |     const GLubyte * const get_disp = (const GLubyte *) run_time_patch; | ||||||
|     GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start; |     GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start; | ||||||
|  |  | ||||||
|  |     *offset = _x86_get_dispatch(); | ||||||
|     while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) { |     while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) { | ||||||
| 	(void) memcpy( curr_func, get_disp, 6 ); | 	(void) memcpy( curr_func, get_disp, sizeof(run_time_patch)); | ||||||
| 	curr_func += DISPATCH_FUNCTION_SIZE; | 	curr_func += DISPATCH_FUNCTION_SIZE; | ||||||
|     } |     } | ||||||
| #endif /* defined( USE_X86_ASM ) && defined( GLX_USE_TLS ) */ |  | ||||||
| } |  | ||||||
| #endif | #endif | ||||||
|  | } | ||||||
|  | #endif /* defined(PTHREADS) || defined(GLX_USE_TLS) */ | ||||||
|   | |||||||
| @@ -764,6 +764,7 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib) | |||||||
|          _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, obj->MagFilter); |          _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, obj->MagFilter); | ||||||
|          _mesa_TexParameterf(target, GL_TEXTURE_MIN_LOD, obj->MinLod); |          _mesa_TexParameterf(target, GL_TEXTURE_MIN_LOD, obj->MinLod); | ||||||
|          _mesa_TexParameterf(target, GL_TEXTURE_MAX_LOD, obj->MaxLod); |          _mesa_TexParameterf(target, GL_TEXTURE_MAX_LOD, obj->MaxLod); | ||||||
|  |          _mesa_TexParameterf(target, GL_TEXTURE_LOD_BIAS, obj->LodBias); | ||||||
|          _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, obj->BaseLevel); |          _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, obj->BaseLevel); | ||||||
|          if (target != GL_TEXTURE_RECTANGLE_ARB) |          if (target != GL_TEXTURE_RECTANGLE_ARB) | ||||||
|             _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, obj->MaxLevel); |             _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, obj->MaxLevel); | ||||||
|   | |||||||
| @@ -5,9 +5,9 @@ | |||||||
|  |  | ||||||
| /* | /* | ||||||
|  * Mesa 3-D graphics library |  * Mesa 3-D graphics library | ||||||
|  * Version:  6.5.2 |  * Version:  7.0 | ||||||
|  * |  * | ||||||
|  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved. |  * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved. | ||||||
|  * |  * | ||||||
|  * Permission is hereby granted, free of charge, to any person obtaining a |  * Permission is hereby granted, free of charge, to any person obtaining a | ||||||
|  * copy of this software and associated documentation files (the "Software"), |  * copy of this software and associated documentation files (the "Software"), | ||||||
| @@ -240,10 +240,7 @@ | |||||||
|  |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Bits per depth buffer value.   |  * Bits per depth buffer value (max is 32). | ||||||
|  * |  | ||||||
|  * Any reasonable value up to 31 will work.  32 doesn't work because of integer |  | ||||||
|  * overflow problems in the rasterizer code. |  | ||||||
|  */ |  */ | ||||||
| #ifndef DEFAULT_SOFTWARE_DEPTH_BITS | #ifndef DEFAULT_SOFTWARE_DEPTH_BITS | ||||||
| #define DEFAULT_SOFTWARE_DEPTH_BITS 16 | #define DEFAULT_SOFTWARE_DEPTH_BITS 16 | ||||||
|   | |||||||
| @@ -6,9 +6,9 @@ | |||||||
|  |  | ||||||
| /* | /* | ||||||
|  * Mesa 3-D graphics library |  * Mesa 3-D graphics library | ||||||
|  * Version:  6.5 |  * Version:  7.0 | ||||||
|  * |  * | ||||||
|  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved. |  * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved. | ||||||
|  * |  * | ||||||
|  * Permission is hereby granted, free of charge, to any person obtaining a |  * Permission is hereby granted, free of charge, to any person obtaining a | ||||||
|  * copy of this software and associated documentation files (the "Software"), |  * copy of this software and associated documentation files (the "Software"), | ||||||
| @@ -1382,8 +1382,11 @@ check_compatible(const GLcontext *ctx, const GLframebuffer *buffer) | |||||||
|       return GL_FALSE; |       return GL_FALSE; | ||||||
|    if (ctxvis->blueMask && ctxvis->blueMask != bufvis->blueMask) |    if (ctxvis->blueMask && ctxvis->blueMask != bufvis->blueMask) | ||||||
|       return GL_FALSE; |       return GL_FALSE; | ||||||
|  | #if 0 | ||||||
|  |    /* disabled (see bug 11161) */ | ||||||
|    if (ctxvis->depthBits && ctxvis->depthBits != bufvis->depthBits) |    if (ctxvis->depthBits && ctxvis->depthBits != bufvis->depthBits) | ||||||
|       return GL_FALSE; |       return GL_FALSE; | ||||||
|  | #endif | ||||||
|    if (ctxvis->stencilBits && ctxvis->stencilBits != bufvis->stencilBits) |    if (ctxvis->stencilBits && ctxvis->stencilBits != bufvis->stencilBits) | ||||||
|       return GL_FALSE; |       return GL_FALSE; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,8 +1,8 @@ | |||||||
| /* | /* | ||||||
|  * Mesa 3-D graphics library |  * Mesa 3-D graphics library | ||||||
|  * Version:  6.5.3 |  * Version:  7.0 | ||||||
|  * |  * | ||||||
|  * Copyright (C) 1999-2005  Brian Paul   All Rights Reserved. |  * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved. | ||||||
|  * |  * | ||||||
|  * Permission is hereby granted, free of charge, to any person obtaining a |  * Permission is hereby granted, free of charge, to any person obtaining a | ||||||
|  * copy of this software and associated documentation files (the "Software"), |  * copy of this software and associated documentation files (the "Software"), | ||||||
| @@ -1117,6 +1117,13 @@ compute_light_positions( GLcontext *ctx ) | |||||||
| 	 } | 	 } | ||||||
| 	 light->_VP_inf_spot_attenuation = 1.0; | 	 light->_VP_inf_spot_attenuation = 1.0; | ||||||
|       } |       } | ||||||
|  |       else { | ||||||
|  |          /* positional light w/ homogeneous coordinate, divide by W */ | ||||||
|  |          GLfloat wInv = 1.0 / light->_Position[3]; | ||||||
|  |          light->_Position[0] *= wInv; | ||||||
|  |          light->_Position[1] *= wInv; | ||||||
|  |          light->_Position[2] *= wInv; | ||||||
|  |       } | ||||||
|  |  | ||||||
|       if (light->_Flags & LIGHT_SPOT) { |       if (light->_Flags & LIGHT_SPOT) { | ||||||
| 	 if (ctx->_NeedEyeCoords) { | 	 if (ctx->_NeedEyeCoords) { | ||||||
|   | |||||||
| @@ -5,9 +5,9 @@ | |||||||
|  |  | ||||||
| /* | /* | ||||||
|  * Mesa 3-D graphics library |  * Mesa 3-D graphics library | ||||||
|  * Version:  6.5.1 |  * Version:  7.0 | ||||||
|  * |  * | ||||||
|  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved. |  * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved. | ||||||
|  * |  * | ||||||
|  * Permission is hereby granted, free of charge, to any person obtaining a |  * Permission is hereby granted, free of charge, to any person obtaining a | ||||||
|  * copy of this software and associated documentation files (the "Software"), |  * copy of this software and associated documentation files (the "Software"), | ||||||
| @@ -61,10 +61,6 @@ _mesa_PointSize( GLfloat size ) | |||||||
| 			    ctx->Point.MinSize, | 			    ctx->Point.MinSize, | ||||||
| 			    ctx->Point.MaxSize); | 			    ctx->Point.MaxSize); | ||||||
|  |  | ||||||
|    ctx->Point._Attenuated = (ctx->Point.Params[0] != 1.0 || |  | ||||||
|                              ctx->Point.Params[1] != 0.0 || |  | ||||||
|                              ctx->Point.Params[2] != 0.0); |  | ||||||
|  |  | ||||||
|    if (ctx->Driver.PointSize) |    if (ctx->Driver.PointSize) | ||||||
|       ctx->Driver.PointSize(ctx, size); |       ctx->Driver.PointSize(ctx, size); | ||||||
| } | } | ||||||
| @@ -122,6 +118,9 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params) | |||||||
| 	       return; | 	       return; | ||||||
| 	    FLUSH_VERTICES(ctx, _NEW_POINT); | 	    FLUSH_VERTICES(ctx, _NEW_POINT); | ||||||
|             COPY_3V(ctx->Point.Params, params); |             COPY_3V(ctx->Point.Params, params); | ||||||
|  |             ctx->Point._Attenuated = (ctx->Point.Params[0] != 1.0 || | ||||||
|  |                                       ctx->Point.Params[1] != 0.0 || | ||||||
|  |                                       ctx->Point.Params[2] != 0.0); | ||||||
|          } |          } | ||||||
|          else { |          else { | ||||||
|             _mesa_error(ctx, GL_INVALID_ENUM, |             _mesa_error(ctx, GL_INVALID_ENUM, | ||||||
|   | |||||||
| @@ -1299,6 +1299,20 @@ _mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level, | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Helper function to determine whether a target supports compressed textures | ||||||
|  |  */ | ||||||
|  | static GLboolean | ||||||
|  | target_can_be_compressed(GLcontext *ctx, GLenum target) | ||||||
|  | { | ||||||
|  |    return (((target == GL_TEXTURE_2D || target == GL_PROXY_TEXTURE_2D)) | ||||||
|  |            || ((ctx->Extensions.ARB_texture_cube_map && | ||||||
|  |                 (target == GL_PROXY_TEXTURE_CUBE_MAP || | ||||||
|  |                  (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && | ||||||
|  |                   target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z))))); | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Test the glTexImage[123]D() parameters for errors. |  * Test the glTexImage[123]D() parameters for errors. | ||||||
|  *  |  *  | ||||||
| @@ -1515,21 +1529,10 @@ texture_error_check( GLcontext *ctx, GLenum target, | |||||||
|  |  | ||||||
|    /* additional checks for compressed textures */ |    /* additional checks for compressed textures */ | ||||||
|    if (is_compressed_format(ctx, internalFormat)) { |    if (is_compressed_format(ctx, internalFormat)) { | ||||||
|       if (target == GL_TEXTURE_2D || target == GL_PROXY_TEXTURE_2D) { |       if (!target_can_be_compressed(ctx, target) && !isProxy) { | ||||||
|          /* OK */ |          _mesa_error(ctx, GL_INVALID_ENUM, | ||||||
|       } |                      "glTexImage%d(target)", dimensions); | ||||||
|       else if (ctx->Extensions.ARB_texture_cube_map && |          return GL_TRUE; | ||||||
|                (target == GL_PROXY_TEXTURE_CUBE_MAP || |  | ||||||
|                 (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && |  | ||||||
|                  target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z))) { |  | ||||||
|          /* OK */ |  | ||||||
|       } |  | ||||||
|       else { |  | ||||||
|          if (!isProxy) { |  | ||||||
|             _mesa_error(ctx, GL_INVALID_ENUM, |  | ||||||
|                         "glTexImage%d(target)", dimensions); |  | ||||||
|             return GL_TRUE; |  | ||||||
|          } |  | ||||||
|       } |       } | ||||||
|       if (border != 0) { |       if (border != 0) { | ||||||
|          if (!isProxy) { |          if (!isProxy) { | ||||||
| @@ -1704,16 +1707,7 @@ subtexture_error_check2( GLcontext *ctx, GLuint dimensions, | |||||||
| #endif | #endif | ||||||
|  |  | ||||||
|    if (destTex->IsCompressed) { |    if (destTex->IsCompressed) { | ||||||
|       if (target == GL_TEXTURE_2D || target == GL_PROXY_TEXTURE_2D) { |       if (!target_can_be_compressed(ctx, target)) { | ||||||
|          /* OK */ |  | ||||||
|       } |  | ||||||
|       else if (ctx->Extensions.ARB_texture_cube_map && |  | ||||||
|                (target == GL_PROXY_TEXTURE_CUBE_MAP || |  | ||||||
|                 (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && |  | ||||||
|                  target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z))) { |  | ||||||
|          /* OK */ |  | ||||||
|       } |  | ||||||
|       else { |  | ||||||
|          _mesa_error(ctx, GL_INVALID_ENUM, |          _mesa_error(ctx, GL_INVALID_ENUM, | ||||||
|                      "glTexSubImage%D(target)", dimensions); |                      "glTexSubImage%D(target)", dimensions); | ||||||
|          return GL_TRUE; |          return GL_TRUE; | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  * Mesa 3-D graphics library |  * Mesa 3-D graphics library | ||||||
|  * Version:  7.1 |  * Version:  7.0 | ||||||
|  * |  * | ||||||
|  * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved. |  * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved. | ||||||
|  * |  * | ||||||
| @@ -29,9 +29,9 @@ | |||||||
|  |  | ||||||
| /* Mesa version */ | /* Mesa version */ | ||||||
| #define MESA_MAJOR 7 | #define MESA_MAJOR 7 | ||||||
| #define MESA_MINOR 1 | #define MESA_MINOR 0 | ||||||
| #define MESA_PATCH 0 | #define MESA_PATCH 0 | ||||||
| #define MESA_VERSION_STRING "7.1" | #define MESA_VERSION_STRING "7.0" | ||||||
|  |  | ||||||
| /* To make version comparison easy */ | /* To make version comparison easy */ | ||||||
| #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) | #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* | /* | ||||||
|  * Mesa 3-D graphics library |  * Mesa 3-D graphics library | ||||||
|  * Version:  6.5.3 |  * Version:  7.0 | ||||||
|  * |  * | ||||||
|  * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved. |  * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved. | ||||||
|  * |  * | ||||||
| @@ -121,17 +121,17 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], | |||||||
|             return; |             return; | ||||||
|          case STATE_HALF_VECTOR: |          case STATE_HALF_VECTOR: | ||||||
|             { |             { | ||||||
|                GLfloat eye_z[] = {0, 0, 1}; |                static const GLfloat eye_z[] = {0, 0, 1}; | ||||||
| 					 |                GLfloat p[3]; | ||||||
|                /* Compute infinite half angle vector: |                /* Compute infinite half angle vector: | ||||||
|                 *   half-vector = light_position + (0, 0, 1)  |                 *   halfVector = normalize(normalize(lightPos) + (0, 0, 1)) | ||||||
|                 * and then normalize.  w = 0 |  | ||||||
| 		* |  | ||||||
| 		* light.EyePosition.w should be 0 for infinite lights. | 		* light.EyePosition.w should be 0 for infinite lights. | ||||||
|                 */ |                 */ | ||||||
| 	       ADD_3V(value, eye_z, ctx->Light.Light[ln].EyePosition); |                COPY_3V(p, ctx->Light.Light[ln].EyePosition); | ||||||
|  |                NORMALIZE_3FV(p); | ||||||
|  | 	       ADD_3V(value, p, eye_z); | ||||||
| 	       NORMALIZE_3FV(value); | 	       NORMALIZE_3FV(value); | ||||||
| 	       value[3] = 0; | 	       value[3] = 1.0; | ||||||
|             }						   |             }						   | ||||||
|             return; |             return; | ||||||
| 	 case STATE_POSITION_NORMALIZED: | 	 case STATE_POSITION_NORMALIZED: | ||||||
|   | |||||||
| @@ -1,8 +1,8 @@ | |||||||
| /* | /* | ||||||
|  * Mesa 3-D graphics library |  * Mesa 3-D graphics library | ||||||
|  * Version:  6.5 |  * Version:  7.0 | ||||||
|  * |  * | ||||||
|  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved. |  * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved. | ||||||
|  * |  * | ||||||
|  * Permission is hereby granted, free of charge, to any person obtaining a |  * Permission is hereby granted, free of charge, to any person obtaining a | ||||||
|  * copy of this software and associated documentation files (the "Software"), |  * copy of this software and associated documentation files (the "Software"), | ||||||
| @@ -50,7 +50,8 @@ run_point_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) | |||||||
|    if (ctx->Point._Attenuated && !ctx->VertexProgram._Current) { |    if (ctx->Point._Attenuated && !ctx->VertexProgram._Current) { | ||||||
|       struct point_stage_data *store = POINT_STAGE_DATA(stage); |       struct point_stage_data *store = POINT_STAGE_DATA(stage); | ||||||
|       struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; |       struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; | ||||||
|       const GLfloat (*eye)[4] = (const GLfloat (*)[4]) VB->EyePtr->data; |       const GLfloat *eyeCoord = (GLfloat *) VB->EyePtr->data + 2; | ||||||
|  |       const GLint eyeCoordStride = VB->EyePtr->stride / sizeof(GLfloat); | ||||||
|       const GLfloat p0 = ctx->Point.Params[0]; |       const GLfloat p0 = ctx->Point.Params[0]; | ||||||
|       const GLfloat p1 = ctx->Point.Params[1]; |       const GLfloat p1 = ctx->Point.Params[1]; | ||||||
|       const GLfloat p2 = ctx->Point.Params[2]; |       const GLfloat p2 = ctx->Point.Params[2]; | ||||||
| @@ -59,10 +60,11 @@ run_point_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) | |||||||
|       GLuint i; |       GLuint i; | ||||||
|  |  | ||||||
|       for (i = 0; i < VB->Count; i++) { |       for (i = 0; i < VB->Count; i++) { | ||||||
|          const GLfloat dist = FABSF(eye[i][2]); |          const GLfloat dist = FABSF(*eyeCoord); | ||||||
|          const GLfloat q = p0 + dist * (p1 + dist * p2); |          const GLfloat q = p0 + dist * (p1 + dist * p2); | ||||||
|          const GLfloat atten = (q != 0.0) ? SQRTF(1.0 / q) : 1.0; |          const GLfloat atten = (q != 0.0) ? SQRTF(1.0 / q) : 1.0; | ||||||
|          size[i][0] = pointSize * atten; /* clamping done in rasterization */ |          size[i][0] = pointSize * atten; /* clamping done in rasterization */ | ||||||
|  |          eyeCoord += eyeCoordStride; | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       VB->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->PointSize; |       VB->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->PointSize; | ||||||
|   | |||||||
| @@ -58,12 +58,18 @@ | |||||||
|  |  | ||||||
| #ifdef GLX_USE_TLS | #ifdef GLX_USE_TLS | ||||||
|  |  | ||||||
|  | #ifdef GLX_X86_READONLY_TEXT | ||||||
|  | # define CTX_INSNS MOV_L(GS:(EAX), EAX) | ||||||
|  | #else | ||||||
|  | # define CTX_INSNS NOP /* Pad for init_glapi_relocs() */ | ||||||
|  | #endif | ||||||
|  |  | ||||||
| #  define GL_STUB(fn,off,fn_alt)			\ | #  define GL_STUB(fn,off,fn_alt)			\ | ||||||
| ALIGNTEXT16;						\ | ALIGNTEXT16;						\ | ||||||
| GLOBL_FN(GL_PREFIX(fn, fn_alt));			\ | GLOBL_FN(GL_PREFIX(fn, fn_alt));			\ | ||||||
| GL_PREFIX(fn, fn_alt):					\ | GL_PREFIX(fn, fn_alt):					\ | ||||||
| 	CALL(_x86_get_dispatch) ;			\ | 	CALL(_x86_get_dispatch) ;			\ | ||||||
| 	NOP ;						\ | 	CTX_INSNS ;					\ | ||||||
| 	JMP(GL_OFFSET(off)) | 	JMP(GL_OFFSET(off)) | ||||||
|  |  | ||||||
| #elif defined(PTHREADS) | #elif defined(PTHREADS) | ||||||
| @@ -114,7 +120,10 @@ SEG_TEXT | |||||||
| 	HIDDEN(GLNAME(_x86_get_dispatch)) | 	HIDDEN(GLNAME(_x86_get_dispatch)) | ||||||
| ALIGNTEXT16 | ALIGNTEXT16 | ||||||
| GLNAME(_x86_get_dispatch): | GLNAME(_x86_get_dispatch): | ||||||
| 	movl	%gs:_glapi_tls_Dispatch@NTPOFF, %eax | 	call	1f | ||||||
|  | 1:	popl	%eax | ||||||
|  | 	addl	$_GLOBAL_OFFSET_TABLE_+[.-1b], %eax | ||||||
|  | 	movl	_glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax | ||||||
| 	ret | 	ret | ||||||
|  |  | ||||||
| #elif defined(PTHREADS) | #elif defined(PTHREADS) | ||||||
| @@ -133,7 +142,7 @@ GLNAME(_x86_get_dispatch): | |||||||
| EXTERN GLNAME(_glapi_get_dispatch) | EXTERN GLNAME(_glapi_get_dispatch) | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #if defined( GLX_USE_TLS ) | #if defined( GLX_USE_TLS ) && !defined( GLX_X86_READONLY_TEXT ) | ||||||
| 		.section	wtext, "awx", @progbits | 		.section	wtext, "awx", @progbits | ||||||
| #endif /* defined( GLX_USE_TLS ) */ | #endif /* defined( GLX_USE_TLS ) */ | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user