[intel-gem] Only update obj->write_domain if we're actually changing it.
authorEric Anholt <eric@anholt.net>
Fri, 30 May 2008 20:47:34 +0000 (13:47 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 30 May 2008 20:47:34 +0000 (13:47 -0700)
commit50bce2bc625deb439dd61f504496dddd0cd4f572
tree23a0a3e6f34adf802412c9749426a25de36c4e21
parent4f92ed34270ae4afaa0ddba38d227c6e359bcc98
[intel-gem] Only update obj->write_domain if we're actually changing it.

The problem was revealed where on 965, the display list vertex buffer would see:

create       -> (CPU, CPU)
set_domain (CPU, CPU) -> (CPU, CPU)
set_comain (CPU, 0)   -> (CPU, 0) (no clflush occurred)
execbuf    (GPU, 0)   -> (CPU+GPU, 0) (still no clflush)

instead of:

create       -> (CPU, CPU)
set_domain (CPU, CPU) -> (CPU, CPU)
set_comain (CPU, 0)   -> (CPU, CPU)
execbuf    (GPU, 0)   -> (CPU+GPU, 0) (clflushed)
linux-core/i915_gem.c