summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.c3
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c28
-rw-r--r--src/mesa/x86/sse_xform2.S1
-rw-r--r--src/mesa/x86/sse_xform3.S1
4 files changed, 24 insertions, 9 deletions
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 4d9ff01c77..8c1fd5ce02 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -236,6 +236,9 @@ st_bufferobj_map_range(GLcontext *ctx, GLenum target,
if (access & GL_MAP_READ_BIT)
flags |= PIPE_BUFFER_USAGE_CPU_READ;
+ if (access & GL_MAP_FLUSH_EXPLICIT_BIT)
+ flags |= PIPE_BUFFER_USAGE_FLUSH_EXPLICIT;
+
/* ... other flags ...
*/
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index c939b7b633..5442a409ad 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -282,9 +282,14 @@ void
vbo_exec_vtx_map( struct vbo_exec_context *exec )
{
GLcontext *ctx = exec->ctx;
- GLenum target = GL_ARRAY_BUFFER_ARB;
- GLenum access = GL_READ_WRITE_ARB;
- GLenum usage = GL_STREAM_DRAW_ARB;
+ const GLenum target = GL_ARRAY_BUFFER_ARB;
+ const GLenum access = GL_READ_WRITE_ARB; /* for MapBuffer */
+ const GLenum accessRange = GL_MAP_WRITE_BIT | /* for MapBufferRange */
+ GL_MAP_INVALIDATE_RANGE_BIT |
+ GL_MAP_UNSYNCHRONIZED_BIT |
+ GL_MAP_FLUSH_EXPLICIT_BIT |
+ MESA_MAP_NOWAIT_BIT;
+ const GLenum usage = GL_STREAM_DRAW_ARB;
if (exec->vtx.bufferobj->Name == 0)
return;
@@ -303,10 +308,7 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec )
exec->vtx.buffer_used,
(VBO_VERT_BUFFER_SIZE -
exec->vtx.buffer_used),
- (GL_MAP_WRITE_BIT |
- GL_MAP_INVALIDATE_RANGE_BIT |
- GL_MAP_UNSYNCHRONIZED_BIT |
- MESA_MAP_NOWAIT_BIT),
+ accessRange,
exec->vtx.bufferobj);
exec->vtx.buffer_ptr = exec->vtx.buffer_map;
}
@@ -318,8 +320,16 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec )
VBO_VERT_BUFFER_SIZE,
NULL, usage, exec->vtx.bufferobj);
- exec->vtx.buffer_map = (GLfloat *)
- ctx->Driver.MapBuffer(ctx, target, access, exec->vtx.bufferobj);
+
+ if (ctx->Driver.MapBufferRange)
+ exec->vtx.buffer_map =
+ (GLfloat *)ctx->Driver.MapBufferRange(ctx, target,
+ 0, VBO_VERT_BUFFER_SIZE,
+ accessRange,
+ exec->vtx.bufferobj);
+ else
+ exec->vtx.buffer_map =
+ (GLfloat *)ctx->Driver.MapBuffer(ctx, target, access, exec->vtx.bufferobj);
exec->vtx.buffer_ptr = exec->vtx.buffer_map;
}
diff --git a/src/mesa/x86/sse_xform2.S b/src/mesa/x86/sse_xform2.S
index 91b82e7297..b490d4c169 100644
--- a/src/mesa/x86/sse_xform2.S
+++ b/src/mesa/x86/sse_xform2.S
@@ -186,6 +186,7 @@ GLNAME(_mesa_sse_transform_points2_3d_no_rot):
MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */
ADD_L( EDI, ECX ) /* count += dest ptr */
+ PXOR( XMM0, XMM0 )
ALIGNTEXT32
MOVSS ( M(0), XMM1 ) /* - | - | - | m0 */
diff --git a/src/mesa/x86/sse_xform3.S b/src/mesa/x86/sse_xform3.S
index 1fc79ef21b..8a79eeda18 100644
--- a/src/mesa/x86/sse_xform3.S
+++ b/src/mesa/x86/sse_xform3.S
@@ -198,6 +198,7 @@ GLNAME(_mesa_sse_transform_points3_3d_no_rot):
MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */
ADD_L( EDI, ECX ) /* count += dest ptr */
+ PXOR( XMM0, XMM0 )
ALIGNTEXT32
MOVSS ( M(0), XMM1 ) /* - | - | - | m0 */