Compare commits
9 Commits
mesa_7_6_r
...
mesa_7_5_2
Author | SHA1 | Date | |
---|---|---|---|
|
18f3afbe88 | ||
|
b807d49f18 | ||
|
d09941c8cc | ||
|
fc613848e6 | ||
|
c7d0f0b46c | ||
|
c7fddaf612 | ||
|
e3a6f57ad6 | ||
|
41d0606b7f | ||
|
126d62edd1 |
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.5.2 Release Notes, (date tbd)</H1>
|
||||
<H1>Mesa 7.5.2 Release Notes, 28 September 2009</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.5.2 is a bug-fix release fixing issues found since the 7.5.1 release.
|
||||
@@ -31,7 +31,15 @@ for DRI hardware acceleration.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
tbd
|
||||
43a90191dd9f76cd65dcc1ac91f3be70 MesaLib-7.5.2.tar.gz
|
||||
94e47a499f1226803869c2e37a6a8e3a MesaLib-7.5.2.tar.bz2
|
||||
1ecb822b567ad67a0617361d45206b67 MesaLib-7.5.2.zip
|
||||
2718fdce7e075911d6147beb8f27104b MesaDemos-7.5.2.tar.gz
|
||||
4e0f5ccd58afe21eddcd94327d926e86 MesaDemos-7.5.2.tar.bz2
|
||||
f621f8c223b278d7c8e49a012d56ca25 MesaDemos-7.5.2.zip
|
||||
83c16c1d6bcfcc3f97aab5d2fe430b4c MesaGLUT-7.5.2.tar.gz
|
||||
e5d03bedae369ea3705783573bb33813 MesaGLUT-7.5.2.tar.bz2
|
||||
e82ba28e00d653e6f437d32be8ca8481 MesaGLUT-7.5.2.zip
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -49,8 +57,11 @@ tbd
|
||||
(such as bug 23946)
|
||||
<li>glUseProgram() is now compiled into display lists (bug 23746).
|
||||
<li>glUniform functions are now compiled into display lists
|
||||
<li>Auto mipmap generation didn't work reliably with Gallium.
|
||||
<li>Fixed random number usage in GLX code.
|
||||
<li>Fixed invalid GL_OUT_OF_MEMORY error sometimes raised by glTexSubImage2D
|
||||
when using Gallium.
|
||||
</ul>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1519,6 +1519,17 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
|
||||
uint zslice = 0;
|
||||
uint offset;
|
||||
|
||||
/* The texture object should have room for the levels which we're
|
||||
* about to generate.
|
||||
*/
|
||||
assert(lastLevel <= pt->last_level);
|
||||
|
||||
/* If this fails, why are we here? */
|
||||
assert(lastLevel > baseLevel);
|
||||
|
||||
assert(filter == PIPE_TEX_FILTER_LINEAR ||
|
||||
filter == PIPE_TEX_FILTER_NEAREST);
|
||||
|
||||
/* check if we can render in the texture's format */
|
||||
if (!screen->is_format_supported(screen, pt->format, PIPE_TEXTURE_2D,
|
||||
PIPE_TEXTURE_USAGE_RENDER_TARGET, 0)) {
|
||||
|
@@ -88,6 +88,12 @@
|
||||
|
||||
#define HASH_ALLOC malloc
|
||||
#define HASH_FREE free
|
||||
#ifndef __GLIBC__
|
||||
#define HASH_RANDOM_DECL char *ps, rs[256]
|
||||
#define HASH_RANDOM_INIT(seed) ps = initstate(seed, rs, sizeof(rs))
|
||||
#define HASH_RANDOM random()
|
||||
#define HASH_RANDOM_DESTROY setstate(ps)
|
||||
#else
|
||||
#define HASH_RANDOM_DECL struct random_data rd; int32_t rv; char rs[256]
|
||||
#define HASH_RANDOM_INIT(seed) \
|
||||
do { \
|
||||
@@ -96,6 +102,7 @@
|
||||
} while(0)
|
||||
#define HASH_RANDOM ((void) random_r(&rd, &rv), rv)
|
||||
#define HASH_RANDOM_DESTROY
|
||||
#endif
|
||||
|
||||
typedef struct __glxHashBucket
|
||||
{
|
||||
|
@@ -209,7 +209,10 @@ intel_bufferobj_get_subdata(GLcontext * ctx,
|
||||
struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
|
||||
|
||||
assert(intel_obj);
|
||||
dri_bo_get_subdata(intel_obj->buffer, offset, size, data);
|
||||
if (intel_obj->sys_buffer)
|
||||
memcpy(data, (char *)intel_obj->sys_buffer + offset, size);
|
||||
else
|
||||
dri_bo_get_subdata(intel_obj->buffer, offset, size, data);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -31,7 +31,7 @@
|
||||
#define MESA_MAJOR 7
|
||||
#define MESA_MINOR 5
|
||||
#define MESA_PATCH 2
|
||||
#define MESA_VERSION_STRING "7.5.2-devel"
|
||||
#define MESA_VERSION_STRING "7.5.2"
|
||||
|
||||
/* To make version comparison easy */
|
||||
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
@@ -1708,53 +1708,6 @@ st_CopyTexSubImage3D(GLcontext * ctx, GLenum target, GLint level,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Compute which mipmap levels that really need to be sent to the hardware.
|
||||
* This depends on the base image size, GL_TEXTURE_MIN_LOD,
|
||||
* GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, and GL_TEXTURE_MAX_LEVEL.
|
||||
*/
|
||||
static void
|
||||
calculate_first_last_level(struct st_texture_object *stObj)
|
||||
{
|
||||
struct gl_texture_object *tObj = &stObj->base;
|
||||
|
||||
/* These must be signed values. MinLod and MaxLod can be negative numbers,
|
||||
* and having firstLevel and lastLevel as signed prevents the need for
|
||||
* extra sign checks.
|
||||
*/
|
||||
GLint firstLevel;
|
||||
GLint lastLevel;
|
||||
|
||||
/* Yes, this looks overly complicated, but it's all needed.
|
||||
*/
|
||||
switch (tObj->Target) {
|
||||
case GL_TEXTURE_1D:
|
||||
case GL_TEXTURE_2D:
|
||||
case GL_TEXTURE_3D:
|
||||
case GL_TEXTURE_CUBE_MAP:
|
||||
if (tObj->MinFilter == GL_NEAREST || tObj->MinFilter == GL_LINEAR) {
|
||||
/* GL_NEAREST and GL_LINEAR only care about GL_TEXTURE_BASE_LEVEL.
|
||||
*/
|
||||
firstLevel = lastLevel = tObj->BaseLevel;
|
||||
}
|
||||
else {
|
||||
firstLevel = 0;
|
||||
lastLevel = MIN2(tObj->MaxLevel,
|
||||
(int) tObj->Image[0][tObj->BaseLevel]->WidthLog2);
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_RECTANGLE_NV:
|
||||
case GL_TEXTURE_4D_SGIS:
|
||||
firstLevel = lastLevel = 0;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
stObj->lastLevel = lastLevel;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
copy_image_data_to_texture(struct st_context *st,
|
||||
struct st_texture_object *stObj,
|
||||
@@ -1818,13 +1771,16 @@ st_finalize_texture(GLcontext *ctx,
|
||||
|
||||
*needFlush = GL_FALSE;
|
||||
|
||||
/* We know/require this is true by now:
|
||||
*/
|
||||
assert(stObj->base._Complete);
|
||||
if (stObj->base._Complete) {
|
||||
/* The texture is complete and we know exactly how many mipmap levels
|
||||
* are present/needed. This is conditional because we may be called
|
||||
* from the st_generate_mipmap() function when the texture object is
|
||||
* incomplete. In that case, we'll have set stObj->lastLevel before
|
||||
* we get here.
|
||||
*/
|
||||
stObj->lastLevel = stObj->base._MaxLevel - stObj->base.BaseLevel;
|
||||
}
|
||||
|
||||
/* What levels must the texture include at a minimum?
|
||||
*/
|
||||
calculate_first_last_level(stObj);
|
||||
firstImage = st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]);
|
||||
|
||||
/* If both firstImage and stObj point to a texture which can contain
|
||||
|
@@ -27,6 +27,7 @@
|
||||
|
||||
|
||||
#include "main/imports.h"
|
||||
#include "main/macros.h"
|
||||
#include "main/mipmap.h"
|
||||
#include "main/teximage.h"
|
||||
#include "main/texformat.h"
|
||||
@@ -161,6 +162,43 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Compute the expected number of mipmap levels in the texture given
|
||||
* the width/height/depth of the base image and the GL_TEXTURE_BASE_LEVEL/
|
||||
* GL_TEXTURE_MAX_LEVEL settings. This will tell us how many mipmap
|
||||
* level should be generated.
|
||||
*/
|
||||
static GLuint
|
||||
compute_num_levels(GLcontext *ctx,
|
||||
struct gl_texture_object *texObj,
|
||||
GLenum target)
|
||||
{
|
||||
if (target == GL_TEXTURE_RECTANGLE_ARB) {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
const GLuint maxLevels = texObj->MaxLevel - texObj->BaseLevel + 1;
|
||||
const struct gl_texture_image *baseImage =
|
||||
_mesa_get_tex_image(ctx, texObj, target, texObj->BaseLevel);
|
||||
GLuint size, numLevels;
|
||||
|
||||
size = MAX2(baseImage->Width2, baseImage->Height2);
|
||||
size = MAX2(size, baseImage->Depth2);
|
||||
|
||||
numLevels = 0;
|
||||
|
||||
while (size > 0) {
|
||||
numLevels++;
|
||||
size >>= 1;
|
||||
}
|
||||
|
||||
numLevels = MIN2(numLevels, maxLevels);
|
||||
|
||||
return numLevels;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
st_generate_mipmap(GLcontext *ctx, GLenum target,
|
||||
struct gl_texture_object *texObj)
|
||||
@@ -174,9 +212,49 @@ st_generate_mipmap(GLcontext *ctx, GLenum target,
|
||||
if (!pt)
|
||||
return;
|
||||
|
||||
lastLevel = pt->last_level;
|
||||
/* find expected last mipmap level */
|
||||
lastLevel = compute_num_levels(ctx, texObj, target) - 1;
|
||||
|
||||
if (!st_render_mipmap(st, target, pt, baseLevel, lastLevel)) {
|
||||
if (pt->last_level < lastLevel) {
|
||||
/* The current gallium texture doesn't have space for all the
|
||||
* mipmap levels we need to generate. So allocate a new texture.
|
||||
*/
|
||||
struct st_texture_object *stObj = st_texture_object(texObj);
|
||||
struct pipe_texture *oldTex = stObj->pt;
|
||||
GLboolean needFlush;
|
||||
|
||||
/* create new texture with space for more levels */
|
||||
stObj->pt = st_texture_create(st,
|
||||
oldTex->target,
|
||||
oldTex->format,
|
||||
lastLevel,
|
||||
oldTex->width[0],
|
||||
oldTex->height[0],
|
||||
oldTex->depth[0],
|
||||
oldTex->tex_usage);
|
||||
|
||||
/* The texture isn't in a "complete" state yet so set the expected
|
||||
* lastLevel here, since it won't get done in st_finalize_texture().
|
||||
*/
|
||||
stObj->lastLevel = lastLevel;
|
||||
|
||||
/* This will copy the old texture's base image into the new texture
|
||||
* which we just allocated.
|
||||
*/
|
||||
st_finalize_texture(ctx, st->pipe, texObj, &needFlush);
|
||||
|
||||
/* release the old tex (will likely be freed too) */
|
||||
pipe_texture_reference(&oldTex, NULL);
|
||||
|
||||
pt = stObj->pt;
|
||||
}
|
||||
|
||||
assert(lastLevel <= pt->last_level);
|
||||
|
||||
/* Recall that the Mesa BaseLevel image is stored in the gallium
|
||||
* texture's level[0] position. So pass baseLevel=0 here.
|
||||
*/
|
||||
if (!st_render_mipmap(st, target, pt, 0, lastLevel)) {
|
||||
fallback_generate_mipmap(ctx, target, texObj);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user