OSDN Git Service

mesa: Set default access flags based on the run-time API
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 18 Jan 2012 00:24:05 +0000 (16:24 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 24 Jan 2012 23:39:47 +0000 (15:39 -0800)
commit30e9bfd84ad64655a5ed0d1f84f5877cb3ae1b5a
tree30aeecd64bde9e09d42ffa205fbbafeda9912d34
parentaa00ccdc0285a65c1162b0819cbabae1689827f1
mesa: Set default access flags based on the run-time API

The default access flags for OpenGL ES (via GL_OES_map_buffer) and
desktop OpenGL are different.  The code previously tried to handle
this, but the decision was made at compile time.  Since the same
driver binary can be used for both OpenGL ES and desktop OpenGL, the
decision must be made at run-time.

This should fix bug #44433.  It appears that the test case does
various map and unmap operations and inspects the state of the buffer
object around each.  When it sees that GL_BUFFER_ACCESS does not match
its expectations, it fails.

NOTE: This is a candidate for release branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44433
(cherry picked from commit f0ea46790f8f4df9a39b0cfab5c5f1bf02c136fc)
src/mesa/drivers/dri/intel/intel_buffer_objects.c
src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
src/mesa/main/bufferobj.c
src/mesa/main/bufferobj.h
src/mesa/state_tracker/st_cb_bufferobjects.c