Merge branch '7.8'

This commit is contained in:
Brian Paul 2010-03-08 11:43:20 -07:00
commit e5923a1240
9 changed files with 96 additions and 24 deletions

View file

@ -13,7 +13,6 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
<<<<<<< HEAD:docs/relnotes.html
<LI><A HREF="relnotes-7.8.html">7.8 release notes</A>
<LI><A HREF="relnotes-7.7.1.html">7.7.1 release notes</A>
<LI><A HREF="relnotes-7.7.html">7.7 release notes</A>

View file

@ -1,6 +1,7 @@
arbfplight
arbfslight
arbocclude
arbocclude2
bounce
clearspd
copypix

View file

@ -15,6 +15,7 @@ PROGS = \
arbfplight \
arbfslight \
arbocclude \
arbocclude2 \
bounce \
clearspd \
copypix \

View file

@ -538,6 +538,9 @@ lp_build_sample_wrap_linear(struct lp_build_sample_context *bld,
default:
assert(0);
coord0 = NULL;
coord1 = NULL;
weight = NULL;
}
*x0_out = coord0;
@ -700,6 +703,7 @@ lp_build_sample_wrap_nearest(struct lp_build_sample_context *bld,
default:
assert(0);
icoord = NULL;
}
return icoord;

View file

@ -299,13 +299,14 @@ sp_tile_cache_flush_clear(struct softpipe_tile_cache *tc)
x, y, TILE_SIZE, TILE_SIZE,
tc->tile.data.color32, 0/*STRIDE*/);
/* do this? */
clear_clear_flag(tc->clear_flags, addr);
numCleared++;
}
}
}
/* reset all clear flags to zero */
memset(tc->clear_flags, 0, sizeof(tc->clear_flags));
#if 0
debug_printf("num cleared: %u\n", numCleared);
#endif

View file

@ -639,9 +639,6 @@ VGint paint_bind_samplers(struct vg_paint *paint, struct pipe_sampler_state **sa
}
break;
default:
samplers[0] = &paint->pattern.sampler; /* dummy */
textures[0] = 0;
return 0;
break;
}
return 0;

View file

@ -140,6 +140,7 @@ static const struct dri_extension card_extensions[] = {
{"GL_NV_blend_square", NULL},
{"GL_NV_vertex_program", GL_NV_vertex_program_functions},
{"GL_SGIS_generate_mipmap", NULL},
{"GL_ARB_pixel_buffer_object", NULL},
{NULL, NULL}
/* *INDENT-ON* */
};

View file

@ -84,6 +84,14 @@ texture_get_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
}
}
else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
GLuint *zValues = (GLuint *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
trb->TexImage->FetchTexelf(trb->TexImage, x + i, y, z, &flt);
zValues[i] = (GLuint) (flt * 0xffffff);
}
}
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_get_row");
}
@ -139,6 +147,15 @@ texture_get_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
}
}
else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
GLuint *zValues = (GLuint *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
trb->TexImage->FetchTexelf(trb->TexImage, x[i], y[i] + trb->Yoffset,
z, &flt);
zValues[i] = (GLuint) (flt * 0xffffff);
}
}
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_get_values");
}
@ -193,6 +210,15 @@ texture_put_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
}
}
}
else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
const GLuint *zValues = (const GLuint *) values;
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff));
trb->Store(trb->TexImage, x + i, y, z, &flt);
}
}
}
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_put_row");
}
@ -246,6 +272,15 @@ texture_put_row_rgb(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
}
}
}
else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
const GLuint *zValues = (const GLuint *) values;
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff));
trb->Store(trb->TexImage, x + i, y, z, &flt);
}
}
}
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_put_row");
}
@ -296,6 +331,15 @@ texture_put_mono_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
}
}
}
else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
const GLuint zValue = *((const GLuint *) value);
const GLfloat flt = (GLfloat) ((zValue & 0xffffff) * (1.0 / 0xffffff));
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
trb->Store(trb->TexImage, x + i, y, z, &flt);
}
}
}
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_put_mono_row");
}
@ -346,6 +390,15 @@ texture_put_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
}
}
}
else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
const GLuint *zValues = (const GLuint *) values;
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff));
trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
}
}
}
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_put_values");
}
@ -395,6 +448,15 @@ texture_put_mono_values(GLcontext *ctx, struct gl_renderbuffer *rb,
}
}
}
else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
const GLuint zValue = *((const GLuint *) value);
const GLfloat flt = (GLfloat) ((zValue & 0xffffff) * (1.0 / 0xffffff));
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
}
}
}
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_put_mono_values");
}
@ -491,24 +553,35 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
trb->Base.Width = trb->TexImage->Width;
trb->Base.Height = trb->TexImage->Height;
trb->Base.InternalFormat = trb->TexImage->InternalFormat;
trb->Base.Format = trb->TexImage->TexFormat;
/* XXX may need more special cases here */
if (trb->TexImage->TexFormat == MESA_FORMAT_Z24_S8) {
trb->Base.Format = MESA_FORMAT_Z24_S8;
switch (trb->TexImage->TexFormat) {
case MESA_FORMAT_Z24_S8:
trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
trb->Base._BaseFormat = GL_DEPTH_STENCIL;
}
else if (trb->TexImage->TexFormat == MESA_FORMAT_Z16) {
trb->Base.Format = MESA_FORMAT_Z16;
trb->Base.DataType = GL_UNSIGNED_SHORT;
break;
case MESA_FORMAT_S8_Z24:
trb->Base.DataType = GL_UNSIGNED_INT_8_24_REV_MESA;
trb->Base._BaseFormat = GL_DEPTH_STENCIL;
}
else if (trb->TexImage->TexFormat == MESA_FORMAT_Z32) {
trb->Base.Format = MESA_FORMAT_Z32;
break;
case MESA_FORMAT_Z24_X8:
trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
break;
case MESA_FORMAT_X8_Z24:
trb->Base.DataType = GL_UNSIGNED_INT_8_24_REV_MESA;
trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
break;
case MESA_FORMAT_Z16:
trb->Base.DataType = GL_UNSIGNED_SHORT;
trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
break;
case MESA_FORMAT_Z32:
trb->Base.DataType = GL_UNSIGNED_INT;
trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
}
else {
trb->Base.Format = trb->TexImage->TexFormat;
break;
default:
trb->Base.DataType = CHAN_TYPE;
trb->Base._BaseFormat = GL_RGBA;
}

View file

@ -410,17 +410,12 @@ st_finish_render_texture(GLcontext *ctx,
st_flush( ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL );
if (strb->surface)
pipe_surface_reference( &strb->surface, NULL );
strb->rtt = NULL;
/*
printf("FINISH RENDER TO TEXTURE surf=%p\n", strb->surface);
*/
_mesa_reference_renderbuffer(&att->Renderbuffer, NULL);
/* restore previous framebuffer state */
st_invalidate_state(ctx, _NEW_BUFFERS);
}