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>
Thu, 19 Jan 2012 17:34:01 +0000 (09:34 -0800)
commitf0ea46790f8f4df9a39b0cfab5c5f1bf02c136fc
tree2b92815daaf1c857fb80c490055562faed6090ed
parent75f37ddba7e5a297390299be0dab8377ea40f5c8
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
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