aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-27 08:32:52 +0200
committermarha <marha@users.sourceforge.net>2011-10-27 08:32:52 +0200
commitd662d461634660f5c0f3998b5eb7d7ed3bd5a25f (patch)
treeacb25086e94250ff8edf746705bdffb5551c00d8 /mesalib/src/mesa/state_tracker
parent4f005bade376d15ee60e90ca45a831aff9725087 (diff)
downloadvcxsrv-d662d461634660f5c0f3998b5eb7d7ed3bd5a25f.tar.gz
vcxsrv-d662d461634660f5c0f3998b5eb7d7ed3bd5a25f.tar.bz2
vcxsrv-d662d461634660f5c0f3998b5eb7d7ed3bd5a25f.zip
mesa git update 27 okt 2011
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_texture.c58
-rw-r--r--mesalib/src/mesa/state_tracker/st_context.c4
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c2
3 files changed, 9 insertions, 55 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c
index 169e235ac..f82346bc6 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c
@@ -543,45 +543,6 @@ st_AllocTextureImageBuffer(struct gl_context *ctx,
}
}
-
-/**
- * Adjust pixel unpack params and image dimensions to strip off the
- * texture border.
- * Gallium doesn't support texture borders. They've seldem been used
- * and seldom been implemented correctly anyway.
- * \param unpackNew returns the new pixel unpack parameters
- */
-static void
-strip_texture_border(GLint border,
- GLint *width, GLint *height, GLint *depth,
- const struct gl_pixelstore_attrib *unpack,
- struct gl_pixelstore_attrib *unpackNew)
-{
- assert(border > 0); /* sanity check */
-
- *unpackNew = *unpack;
-
- if (unpackNew->RowLength == 0)
- unpackNew->RowLength = *width;
-
- if (depth && unpackNew->ImageHeight == 0)
- unpackNew->ImageHeight = *height;
-
- unpackNew->SkipPixels += border;
- if (height)
- unpackNew->SkipRows += border;
- if (depth)
- unpackNew->SkipImages += border;
-
- assert(*width >= 3);
- *width = *width - 2 * border;
- if (height && *height >= 3)
- *height = *height - 2 * border;
- if (depth && *depth >= 3)
- *depth = *depth - 2 * border;
-}
-
-
/**
* Do glTexImage1/2/3D().
*/
@@ -602,7 +563,6 @@ st_TexImage(struct gl_context * ctx,
struct st_texture_object *stObj = st_texture_object(texObj);
struct st_texture_image *stImage = st_texture_image(texImage);
GLuint dstRowStride = 0;
- struct gl_pixelstore_attrib unpackNB;
enum pipe_transfer_usage transfer_usage = 0;
GLubyte *dstMap;
@@ -627,21 +587,9 @@ st_TexImage(struct gl_context * ctx,
stObj->surface_based = GL_FALSE;
}
- /* gallium does not support texture borders, strip it off */
- if (border) {
- strip_texture_border(border, &width, &height, &depth, unpack, &unpackNB);
- unpack = &unpackNB;
- texImage->Width = width;
- texImage->Height = height;
- texImage->Depth = depth;
- texImage->Border = 0;
- border = 0;
- }
- else {
- assert(texImage->Width == width);
- assert(texImage->Height == height);
- assert(texImage->Depth == depth);
- }
+ assert(texImage->Width == width);
+ assert(texImage->Height == height);
+ assert(texImage->Depth == depth);
stImage->base.Face = _mesa_tex_target_to_face(target);
stImage->base.Level = level;
diff --git a/mesalib/src/mesa/state_tracker/st_context.c b/mesalib/src/mesa/state_tracker/st_context.c
index 6d4bc544d..a1817720d 100644
--- a/mesalib/src/mesa/state_tracker/st_context.c
+++ b/mesalib/src/mesa/state_tracker/st_context.c
@@ -144,6 +144,10 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe )
/* we want all vertex data to be placed in buffer objects */
vbo_use_buffer_objects(ctx);
+
+ /* make sure that no VBOs are left mapped when we're drawing. */
+ vbo_always_unmap_buffers(ctx);
+
/* Need these flags:
*/
st->ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index 37f36de93..6b9ff6b72 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/src/mesa/state_tracker/st_extensions.c
@@ -222,6 +222,8 @@ void st_init_limits(struct st_context *st)
_mesa_override_glsl_version(st->ctx);
c->UniformBooleanTrue = ~0;
}
+
+ c->StripTextureBorder = GL_TRUE;
}