intel: Flush when mapping buffer objects so writes don't get reordered.

While GEM covers this for execution it knows about, it doesn't know about
the batchbuffer we're preparing.  Fixes piglit vbo-map-remap.c testcase.
This commit is contained in:
Eric Anholt
2009-07-02 18:02:44 -07:00
parent 9a0b570ab6
commit ae1bfb6427
2 changed files with 5 additions and 0 deletions
@@ -243,6 +243,9 @@ intel_bufferobj_map(GLcontext * ctx,
return obj->Pointer;
}
if (!read_only)
intelFlush(ctx);
if (intel_obj->region)
intel_bufferobj_cow(intel, intel_obj);
@@ -111,6 +111,8 @@ debug_backtrace(void)
GLubyte *
intel_region_map(struct intel_context *intel, struct intel_region *region)
{
intelFlush(&intel->ctx);
_DBG("%s %p\n", __FUNCTION__, region);
if (!region->map_refcount++) {
if (region->pbo)