diff options
author | Ian Romanick <[email protected]> | 2011-08-21 18:45:06 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-08-23 14:52:10 -0700 |
commit | b2184da684fc20849b5e6e554f0a0f92d2872ce9 (patch) | |
tree | 274d202d06beff07e141346deb10f478fc75af10 /src/mesa/drivers | |
parent | 6183edc070e2d3dce36ab5ee7aee72b0c38775a7 (diff) |
mesa: Fix incorrect access parameter passed to MapBuffer
The code previously passed GL_DYNAMIC_DRAW for the access parameter.
By inspection, I believe that all drivers would treat this as
GL_READ_WRITE because it's not GL_READ_ONLY and it's not
GL_WRITE_ONLY.
It appears the i965 code wants GL_WRITE_ONLY (it's about to write a
bunch of data in, never read data), while the arrayelt code is
GL_READ_ONLY (just dereffed as arguments to CALL_Whatever*v).
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Acked-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Keith Whitwell <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw_upload.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 66c42aa0779..9acec45799a 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -689,9 +689,7 @@ static void brw_prepare_indices(struct brw_context *brw) * rebase it into a temporary. */ if ((get_size(index_buffer->type) - 1) & offset) { - GLubyte *map = ctx->Driver.MapBuffer(ctx, - GL_DYNAMIC_DRAW_ARB, - bufferobj); + GLubyte *map = ctx->Driver.MapBuffer(ctx, GL_WRITE_ONLY, bufferobj); map += offset; intel_upload_data(&brw->intel, map, ib_size, ib_type_size, |