Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131677
b: refs/heads/master
c: efbeed9
h: refs/heads/master
i:
  131675: 67b4f2f
v: v3
  • Loading branch information
Eric Anholt authored and Dave Airlie committed Feb 23, 2009
1 parent a260722 commit f1826c2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8b0e378a20e48c691d374f39d8b0596e63598cfc
refs/heads/master: efbeed96f7e20783b22d9529ef536b61f7ea8637
16 changes: 14 additions & 2 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2067,8 +2067,14 @@ i915_gem_object_set_to_gpu_domain(struct drm_gem_object *obj)
i915_gem_clflush_object(obj);
}

if ((obj->pending_write_domain | flush_domains) != 0)
obj->write_domain = obj->pending_write_domain;
/* The actual obj->write_domain will be updated with
* pending_write_domain after we emit the accumulated flush for all
* of our domain changes in execbuffers (which clears objects'
* write_domains). So if we have a current write domain that we
* aren't changing, set pending_write_domain to that.
*/
if (flush_domains == 0 && obj->pending_write_domain == 0)
obj->pending_write_domain = obj->write_domain;
obj->read_domains = obj->pending_read_domains;

dev->invalidate_domains |= invalidate_domains;
Expand Down Expand Up @@ -2598,6 +2604,12 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
(void)i915_add_request(dev, dev->flush_domains);
}

for (i = 0; i < args->buffer_count; i++) {
struct drm_gem_object *obj = object_list[i];

obj->write_domain = obj->pending_write_domain;
}

i915_verify_inactive(dev, __FILE__, __LINE__);

#if WATCH_COHERENCY
Expand Down

0 comments on commit f1826c2

Please sign in to comment.