From b2c925e360e2c366526de15b44603f855f94139c Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 19 Sep 2011 13:23:24 +0200 Subject: xtrans libX11 libXext libXdmcp libXau libXft libXinerama libXmu libfontenc mesa git update 19 sept 2011 --- mesalib/src/mesa/state_tracker/st_cb_clear.c | 22 +++++++++++----------- mesalib/src/mesa/state_tracker/st_cb_texture.c | 15 ++++++++++----- mesalib/src/mesa/state_tracker/st_format.h | 1 - 3 files changed, 21 insertions(+), 17 deletions(-) (limited to 'mesalib/src/mesa/state_tracker') diff --git a/mesalib/src/mesa/state_tracker/st_cb_clear.c b/mesalib/src/mesa/state_tracker/st_cb_clear.c index a4799e3cc..83802a5ea 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_clear.c +++ b/mesalib/src/mesa/state_tracker/st_cb_clear.c @@ -136,7 +136,7 @@ set_vertex_shader(struct st_context *st) static void draw_quad(struct st_context *st, float x0, float y0, float x1, float y1, GLfloat z, - const GLfloat color[4]) + const union pipe_color_union *color) { struct pipe_context *pipe = st->pipe; @@ -182,10 +182,10 @@ draw_quad(struct st_context *st, for (i = 0; i < 4; i++) { st->clear.vertices[i][0][2] = z; st->clear.vertices[i][0][3] = 1.0; - st->clear.vertices[i][1][0] = color[0]; - st->clear.vertices[i][1][1] = color[1]; - st->clear.vertices[i][1][2] = color[2]; - st->clear.vertices[i][1][3] = color[3]; + st->clear.vertices[i][1][0] = color->f[0]; + st->clear.vertices[i][1][1] = color->f[1]; + st->clear.vertices[i][1][2] = color->f[2]; + st->clear.vertices[i][1][3] = color->f[3]; } /* put vertex data into vbuf */ @@ -227,7 +227,7 @@ clear_with_quad(struct gl_context *ctx, const GLfloat x1 = (GLfloat) ctx->DrawBuffer->_Xmax / fb_width * 2.0f - 1.0f; const GLfloat y0 = (GLfloat) ctx->DrawBuffer->_Ymin / fb_height * 2.0f - 1.0f; const GLfloat y1 = (GLfloat) ctx->DrawBuffer->_Ymax / fb_height * 2.0f - 1.0f; - float clearColor[4]; + union pipe_color_union clearColor; /* printf("%s %s%s%s %f,%f %f,%f\n", __FUNCTION__, @@ -325,11 +325,11 @@ clear_with_quad(struct gl_context *ctx, if (ctx->DrawBuffer->_ColorDrawBuffers[0]) { st_translate_color(ctx->Color.ClearColor.f, ctx->DrawBuffer->_ColorDrawBuffers[0]->_BaseFormat, - clearColor); + clearColor.f); } /* draw quad matching scissor rect */ - draw_quad(st, x0, y0, x1, y1, (GLfloat) ctx->Depth.Clear, clearColor); + draw_quad(st, x0, y0, x1, y1, (GLfloat) ctx->Depth.Clear, &clearColor); /* Restore pipe state */ cso_restore_blend(st->cso_context); @@ -572,7 +572,7 @@ st_Clear(struct gl_context *ctx, GLbitfield mask) * required from the visual. Hence fix this up to avoid potential * read-modify-write in the driver. */ - float clearColor[4]; + union pipe_color_union clearColor; if ((clear_buffers & PIPE_CLEAR_DEPTHSTENCIL) && ((clear_buffers & PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL) && @@ -584,10 +584,10 @@ st_Clear(struct gl_context *ctx, GLbitfield mask) if (ctx->DrawBuffer->_ColorDrawBuffers[0]) { st_translate_color(ctx->Color.ClearColor.f, ctx->DrawBuffer->_ColorDrawBuffers[0]->_BaseFormat, - clearColor); + clearColor.f); } - st->pipe->clear(st->pipe, clear_buffers, clearColor, + st->pipe->clear(st->pipe, clear_buffers, &clearColor, ctx->Depth.Clear, ctx->Stencil.Clear); } if (mask & BUFFER_BIT_ACCUM) diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c index eab02fb3b..68323a35a 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_texture.c +++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c @@ -38,7 +38,6 @@ #include "main/pbo.h" #include "main/pixeltransfer.h" #include "main/texcompress.h" -#include "main/texfetch.h" #include "main/texgetimage.h" #include "main/teximage.h" #include "main/texobj.h" @@ -106,6 +105,15 @@ st_NewTextureImage(struct gl_context * ctx) } +/** called via ctx->Driver.DeleteTextureImage() */ +static void +st_DeleteTextureImage(struct gl_context * ctx, struct gl_texture_image *img) +{ + /* nothing special (yet) for st_texture_image */ + _mesa_delete_texture_image(ctx, img); +} + + /** called via ctx->Driver.NewTextureObject() */ static struct gl_texture_object * st_NewTextureObject(struct gl_context * ctx, GLuint name, GLenum target) @@ -552,8 +560,6 @@ st_TexImage(struct gl_context * ctx, stImage->base.Face = _mesa_tex_target_to_face(target); stImage->base.Level = level; - _mesa_set_fetch_functions(texImage, dims); - /* Release the reference to a potentially orphaned buffer. * Release any old malloced memory. */ @@ -975,8 +981,6 @@ st_get_tex_image(struct gl_context * ctx, GLenum target, GLint level, dest = (GLubyte *) pixels; - _mesa_set_fetch_functions(texImage, get_texture_dims(target)); - for (i = 0; i < depth; i++) { if (compressed_dst) { _mesa_get_compressed_teximage(ctx, target, level, dest, @@ -1923,6 +1927,7 @@ st_init_texture_functions(struct dd_function_table *functions) functions->NewTextureObject = st_NewTextureObject; functions->NewTextureImage = st_NewTextureImage; + functions->DeleteTextureImage = st_DeleteTextureImage; functions->DeleteTexture = st_DeleteTextureObject; functions->FreeTextureImageBuffer = st_FreeTextureImageBuffer; functions->MapTextureImage = st_MapTextureImage; diff --git a/mesalib/src/mesa/state_tracker/st_format.h b/mesalib/src/mesa/state_tracker/st_format.h index 1c1f5965f..10ffeaa73 100644 --- a/mesalib/src/mesa/state_tracker/st_format.h +++ b/mesalib/src/mesa/state_tracker/st_format.h @@ -83,5 +83,4 @@ extern void st_translate_color(const GLfloat colorIn[4], GLenum baseFormat, GLfloat colorOut[4]); - #endif /* ST_FORMAT_H */ -- cgit v1.2.3