Compare commits

...

25 Commits

Author SHA1 Message Date
Brian
131baefac3 fix date for 7.0 release 2007-06-22 16:41:36 -06:00
Brian
a450078b67 update version 2007-06-22 16:40:17 -06:00
Brian
f6b041bf6c bring in Eric's FreeBSD fixes for -pthread 2007-06-22 15:40:46 -06:00
Brian
4f340d181a set tentative 7.0 release date 2007-06-20 19:59:15 -06:00
Brian
b58e38e936 fix TEXTREL problem (bug 7459) 2007-06-12 09:52:05 -06:00
Brian
8713cb48a8 Fix TEXREL issues when using GLX_USE_TLS (see bug 7459). 2007-06-12 09:46:12 -06:00
Brian
277c5e57ed fix GLX_USE_TLS breakage 2007-06-12 08:57:39 -06:00
Brian
b3d62d5af5 disable depthBits check in check_compatible(), see bug 11161 2007-06-08 12:36:00 -06:00
Brian
9c0f0c8d81 remove old comment about DEFAULT_SOFTWARE_DEPTH_BITS 2007-06-08 12:35:37 -06:00
Brian
18a0a2a7ac document bug 11049 fix 2007-05-23 16:50:22 -06:00
Brian
8b99d9e33c restore GL_TEXTURE_LOD_BIAS in _mesa_PopAttrib(), bug 11049 2007-05-23 16:49:19 -06:00
Brian
01e7e153e3 document point attentuation fix 2007-05-23 08:59:02 -06:00
Brian
0ad4ca24d2 Fix point attentuation problem (bug 11042)
ctx->Point._Attentuation was computed in wrong place and the VB->Eye coord Z
array wasn't indexed correctly in run_point_stage().
2007-05-23 08:56:45 -06:00
Brian
724a155552 if light position is local, treat it as a homogeneous coord and divide by W (see bug 11009) 2007-05-21 10:55:15 -06:00
Roland Scheidegger
d38b74a316 fix miptree layout (i915) for small compressed mipmaps
This seems to work now. Also fix i945 set_level_info, need to match i915
behaviour for storing mip height, as it's assumed to be the mip width
(in texels) elsewhere and the division by 4 is done later (untested).
2007-05-19 04:43:50 +02:00
Roland Scheidegger
54cab4b47b fix copy & paste bug of previous commit, breaking dxt5 formats 2007-05-19 03:56:06 +02:00
Roland Scheidegger
c093666bc5 fix miptree comparison with compressed textures
TexelBytes is always 0 with compressed textures, thus would never match
mt->cpp. This caused constant blitting around of textures, and it fixes at
least the horrible performance of Q3 if compressed textures are enabled.
2007-05-19 01:39:54 +02:00
Roland Scheidegger
04972f6761 fix small s3tc mipmaps (#10968)
make sure that always whole blocks are uploaded.
(May still not work correctly if the top mip map is not at least a full block,
that is 4 pixels wide - not sure, but probably doesn't happen in real world)
2007-05-19 01:39:16 +02:00
Brian
67f8234622 set version to 7.0 2007-05-18 09:41:34 -06:00
Brian
201d6dbd9c fix STATE_HALF_VECTOR value (bug 10987) 2007-05-18 09:35:18 -06:00
Ian Romanick
fbcac5aa83 Refactor determining whether a texture target can use compressed format 2007-05-17 14:45:25 -07:00
Brian
2b72ab8f8f document glXDestroyPbuffer fix 2007-05-17 15:30:39 -06:00
Brian
0ea97b9408 In DestroyPbuffer(), use GetReq() intead of GetReqExtra(). See bug 10983. 2007-05-17 15:26:39 -06:00
Brian
28683ac7c0 version 7.0, not 7.1 2007-05-17 09:07:25 -06:00
Brian
c72e3e210f version should be 7.0 2007-05-17 09:04:19 -06:00
27 changed files with 160 additions and 131 deletions

View File

@@ -162,10 +162,10 @@ ultrix-gcc:
# Rules for making release tarballs
DIRECTORY = Mesa-7.1pre
LIB_NAME = MesaLib-7.1pre
DEMO_NAME = MesaDemos-7.1pre
GLUT_NAME = MesaGLUT-7.1pre
DIRECTORY = Mesa-7.0
LIB_NAME = MesaLib-7.0
DEMO_NAME = MesaDemos-7.0
GLUT_NAME = MesaGLUT-7.0
MAIN_FILES = \
$(DIRECTORY)/Makefile* \

View File

@@ -104,6 +104,10 @@ do
# this is a special case (see bugzilla 10876)
DEPS="$DEPS $1"
;;
'-pthread')
# for FreeBSD
DEPS="$DEPS -pthread"
;;
'-cplusplus')
CPLUSPLUS=1
;;

View File

@@ -27,9 +27,9 @@ ASM_SOURCES =
# Library/program dependencies
LIBDRM_CFLAGS = `pkg-config --cflags 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 \
-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
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lX11

View File

@@ -9,11 +9,7 @@
<H1>Downloading</H1>
<p>
Last development release: <b>6.5.3</b>
</p>
<p>
Last stable release: <b>6.4.2</b>
Last stable release: <b>7.0</b>
</p>
<p>

View File

@@ -129,7 +129,7 @@ GL_ARB_fragment_program extensions.
</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.
</p>

View File

@@ -11,7 +11,7 @@
<H1>News</H1>
<h2>May ???, 2007</h2>
<h2>June 22, 2007</h2>
<p>
<a href="relnotes-7.0.html">Mesa 7.0</a> is released.
This is a stable release featuring OpenGL 2.1 support.

View File

@@ -8,10 +8,11 @@
<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>
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>
@@ -37,6 +38,12 @@ TBD
<li>Fixed R300 vertex program/matrix bug (10848)
<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>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>

View File

@@ -1,8 +1,8 @@
/*
* 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
* copy of this software and associated documentation files (the "Software"),

View File

@@ -150,7 +150,7 @@ DestroyPbuffer( Display * dpy, GLXDrawable drawable )
if ( (priv->majorVersion > 1) || (priv->minorVersion >= 3) ) {
xGLXDestroyPbufferReq * req;
GetReqExtra( GLXDestroyPbuffer, 4, req );
GetReq( GLXDestroyPbuffer, req );
req->reqType = opcode;
req->glxCode = X_GLXDestroyPbuffer;
req->pbuffer = (GLXPbuffer) drawable;

View File

@@ -172,12 +172,8 @@ static void i915LayoutTextureImages( i915ContextPtr i915,
t->intel.image[0][i].offset = total_height * pitch;
t->intel.image[0][i].internalFormat = baseImage->_BaseFormat;
if (t->intel.image[0][i].image->IsCompressed)
{
if (t->intel.image[0][i].image->Height > 4)
total_height += t->intel.image[0][i].image->Height/4;
else
total_height += 1;
if (t->intel.image[0][i].image->IsCompressed) {
total_height += (t->intel.image[0][i].image->Height + 3) / 4;
}
else
total_height += MAX2(2, t->intel.image[0][i].image->Height);

View File

@@ -634,11 +634,32 @@ static void intelUploadTexImage( intelContextPtr intel,
image->Height);
}
else if (image->IsCompressed) {
GLuint row_len = image->Width * 2;
GLuint row_len = 0;
GLubyte *dst = (GLubyte *)(t->BufAddr + offset);
GLubyte *src = (GLubyte *)image->Data;
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)
fprintf(stderr,
"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,
row_len, t->Pitch, t->depth_pitch);
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:
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;
if (row_len) {
for (j = 0 ; j < (image->Height + 3)/4 ; j++, dst += (t->Pitch)) {
__memcpy(dst, src, row_len );
src += row_len;
}
}
}
/* Time for another vtbl entry:

View File

@@ -161,11 +161,9 @@ i915_miptree_layout(struct intel_mipmap_tree * mt)
if (mt->compressed)
img_height = MAX2(1, height / 4);
else
img_height = MAX2(2, height);
img_height = (MAX2(2, height) + 1) & ~1;
mt->total_height += img_height;
mt->total_height += 1;
mt->total_height &= ~1;
width = minify(width);
height = minify(height);

View File

@@ -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 intel_texture_object *intelObj = intel_texture_object(tObj);
int comp_byte = 0;
int cpp;
GLuint face, i;
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);
}
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
* 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->height0 != firstImage->base.Height ||
intelObj->mt->depth0 != firstImage->base.Depth ||
intelObj->mt->cpp != firstImage->base.TexFormat->TexelBytes ||
intelObj->mt->cpp != cpp ||
intelObj->mt->compressed != firstImage->base.IsCompressed)) {
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:
*/
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->base.Target,
firstImage->base.InternalFormat,
@@ -186,8 +190,7 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
firstImage->base.Width,
firstImage->base.Height,
firstImage->base.Depth,
firstImage->base.TexFormat->
TexelBytes,
cpp,
comp_byte);
}

View File

@@ -74,7 +74,7 @@ void i945_miptree_layout_2d( struct intel_mipmap_tree *mt )
GLuint img_height;
intel_miptree_set_level_info(mt, level, 1, x, y, width,
mt->compressed ? height/4 : height, 1);
height, 1);
if (mt->compressed)
img_height = MAX2(1, height/4);

View File

@@ -141,7 +141,7 @@ static void
SetCurrentContext(GLXContext c)
{
#if defined(GLX_USE_TLS)
CurrentContext = context;
CurrentContext = c;
#elif defined(THREADS)
_glthread_SetTSD(&ContextTSD, c);
#else

View File

@@ -82,12 +82,18 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print ''
print '#ifdef GLX_USE_TLS'
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 'ALIGNTEXT16;\t\t\t\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 '\tCALL(_x86_get_dispatch) ;\t\t\t\\'
print '\tNOP ;\t\t\t\t\t\t\\'
print '\tCTX_INSNS ; \\'
print '\tJMP(GL_OFFSET(off))'
print ''
print '#elif defined(PTHREADS)'
@@ -138,7 +144,10 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '\tHIDDEN(GLNAME(_x86_get_dispatch))'
print 'ALIGNTEXT16'
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 ''
print '#elif defined(PTHREADS)'
@@ -158,7 +167,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '#endif'
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 '#endif /* defined( GLX_USE_TLS ) */'

View File

@@ -1028,22 +1028,24 @@ _glapi_check_table(const struct _glapi_table *table)
#if defined(PTHREADS) || defined(GLX_USE_TLS)
/**
* Perform platform-specific GL API entry-point fixups.
*
*
*/
static void
init_glapi_relocs( void )
{
#if defined( USE_X86_ASM ) && defined( GLX_USE_TLS )
extern void * _x86_get_dispatch(void);
const GLubyte * const get_disp = (const GLubyte *) _x86_get_dispatch;
#if defined(USE_X86_ASM) && defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT)
extern unsigned long _x86_get_dispatch(void);
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;
*offset = _x86_get_dispatch();
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;
}
#endif /* defined( USE_X86_ASM ) && defined( GLX_USE_TLS ) */
}
#endif
}
#endif /* defined(PTHREADS) || defined(GLX_USE_TLS) */

View File

@@ -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_TexParameterf(target, GL_TEXTURE_MIN_LOD, obj->MinLod);
_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);
if (target != GL_TEXTURE_RECTANGLE_ARB)
_mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, obj->MaxLevel);

View File

@@ -5,9 +5,9 @@
/*
* 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
* copy of this software and associated documentation files (the "Software"),
@@ -240,10 +240,7 @@
/**
* Bits per depth buffer value.
*
* Any reasonable value up to 31 will work. 32 doesn't work because of integer
* overflow problems in the rasterizer code.
* Bits per depth buffer value (max is 32).
*/
#ifndef DEFAULT_SOFTWARE_DEPTH_BITS
#define DEFAULT_SOFTWARE_DEPTH_BITS 16

View File

@@ -6,9 +6,9 @@
/*
* 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
* 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;
if (ctxvis->blueMask && ctxvis->blueMask != bufvis->blueMask)
return GL_FALSE;
#if 0
/* disabled (see bug 11161) */
if (ctxvis->depthBits && ctxvis->depthBits != bufvis->depthBits)
return GL_FALSE;
#endif
if (ctxvis->stencilBits && ctxvis->stencilBits != bufvis->stencilBits)
return GL_FALSE;

View File

@@ -1,8 +1,8 @@
/*
* 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
* 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;
}
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 (ctx->_NeedEyeCoords) {

View File

@@ -5,9 +5,9 @@
/*
* 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
* copy of this software and associated documentation files (the "Software"),
@@ -61,10 +61,6 @@ _mesa_PointSize( GLfloat size )
ctx->Point.MinSize,
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)
ctx->Driver.PointSize(ctx, size);
}
@@ -122,6 +118,9 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params)
return;
FLUSH_VERTICES(ctx, _NEW_POINT);
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 {
_mesa_error(ctx, GL_INVALID_ENUM,

View File

@@ -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.
*
@@ -1515,21 +1529,10 @@ texture_error_check( GLcontext *ctx, GLenum target,
/* additional checks for compressed textures */
if (is_compressed_format(ctx, internalFormat)) {
if (target == GL_TEXTURE_2D || target == GL_PROXY_TEXTURE_2D) {
/* 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 {
if (!isProxy) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glTexImage%d(target)", dimensions);
return GL_TRUE;
}
if (!target_can_be_compressed(ctx, target) && !isProxy) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glTexImage%d(target)", dimensions);
return GL_TRUE;
}
if (border != 0) {
if (!isProxy) {
@@ -1704,16 +1707,7 @@ subtexture_error_check2( GLcontext *ctx, GLuint dimensions,
#endif
if (destTex->IsCompressed) {
if (target == GL_TEXTURE_2D || target == GL_PROXY_TEXTURE_2D) {
/* 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 {
if (!target_can_be_compressed(ctx, target)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glTexSubImage%D(target)", dimensions);
return GL_TRUE;

View File

@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
* Version: 7.1
* Version: 7.0
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -29,9 +29,9 @@
/* Mesa version */
#define MESA_MAJOR 7
#define MESA_MINOR 1
#define MESA_MINOR 0
#define MESA_PATCH 0
#define MESA_VERSION_STRING "7.1"
#define MESA_VERSION_STRING "7.0"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

View File

@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
* Version: 6.5.3
* Version: 7.0
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -121,17 +121,17 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
return;
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:
* half-vector = light_position + (0, 0, 1)
* and then normalize. w = 0
*
* halfVector = normalize(normalize(lightPos) + (0, 0, 1))
* 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);
value[3] = 0;
value[3] = 1.0;
}
return;
case STATE_POSITION_NORMALIZED:

View File

@@ -1,8 +1,8 @@
/*
* 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
* 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) {
struct point_stage_data *store = POINT_STAGE_DATA(stage);
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 p1 = ctx->Point.Params[1];
const GLfloat p2 = ctx->Point.Params[2];
@@ -59,10 +60,11 @@ run_point_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
GLuint 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 atten = (q != 0.0) ? SQRTF(1.0 / q) : 1.0;
size[i][0] = pointSize * atten; /* clamping done in rasterization */
eyeCoord += eyeCoordStride;
}
VB->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->PointSize;

View File

@@ -58,12 +58,18 @@
#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) \
ALIGNTEXT16; \
GLOBL_FN(GL_PREFIX(fn, fn_alt)); \
GL_PREFIX(fn, fn_alt): \
CALL(_x86_get_dispatch) ; \
NOP ; \
CTX_INSNS ; \
JMP(GL_OFFSET(off))
#elif defined(PTHREADS)
@@ -114,7 +120,10 @@ SEG_TEXT
HIDDEN(GLNAME(_x86_get_dispatch))
ALIGNTEXT16
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
#elif defined(PTHREADS)
@@ -133,7 +142,7 @@ GLNAME(_x86_get_dispatch):
EXTERN GLNAME(_glapi_get_dispatch)
#endif
#if defined( GLX_USE_TLS )
#if defined( GLX_USE_TLS ) && !defined( GLX_X86_READONLY_TEXT )
.section wtext, "awx", @progbits
#endif /* defined( GLX_USE_TLS ) */