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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user