mesa: Fix incorrect access parameter passed to MapBuffer
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 22 Aug 2011 01:45:06 +0000 (18:45 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 23 Aug 2011 21:52:10 +0000 (14:52 -0700)
commitb2184da684fc20849b5e6e554f0a0f92d2872ce9
tree274d202d06beff07e141346deb10f478fc75af10
parent6183edc070e2d3dce36ab5ee7aee72b0c38775a7
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 <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Whitwell <keithw@vmware.com>
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/main/api_arrayelt.c