diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-05-18 20:09:41 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-05-18 21:08:24 +0100 |
commit | f91dcc44dcc15850f82666b1bcdd27182400e7dc (patch) | |
tree | 5a4d0d74bc61e01090a84c47469eedb9d082eafd /src/sna/sna_gradient.c | |
parent | ee073d613bba38f90951405d5ecddfcf3ac5e043 (diff) |
sna: Give the proxy a unique name
So that if we cache the current destination bo (for example, gen3) then
a new proxy (or even just a new batchbuffer) will indeed cause the
destination buffer to be updated.
Reported-and-tested-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48636
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_gradient.c')
-rw-r--r-- | src/sna/sna_gradient.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/sna/sna_gradient.c b/src/sna/sna_gradient.c index 32d26c8d..a52cfb51 100644 --- a/src/sna/sna_gradient.c +++ b/src/sna/sna_gradient.c @@ -258,7 +258,8 @@ sna_render_finish_solid(struct sna *sna, bool force) DBG(("sna_render_finish_solid reset\n")); cache->cache_bo = kgem_create_linear(&sna->kgem, sizeof(cache->color), 0); - cache->bo[0] = kgem_create_proxy(cache->cache_bo, 0, sizeof(uint32_t)); + cache->bo[0] = kgem_create_proxy(&sna->kgem, cache->cache_bo, + 0, sizeof(uint32_t)); cache->bo[0]->pitch = 4; if (force) cache->size = 1; @@ -308,7 +309,7 @@ sna_render_get_solid(struct sna *sna, uint32_t color) DBG(("sna_render_get_solid(%d) = %x (new)\n", i, color)); create: - cache->bo[i] = kgem_create_proxy(cache->cache_bo, + cache->bo[i] = kgem_create_proxy(&sna->kgem, cache->cache_bo, i*sizeof(uint32_t), sizeof(uint32_t)); cache->bo[i]->pitch = 4; @@ -331,7 +332,8 @@ static Bool sna_alpha_cache_init(struct sna *sna) for (i = 0; i < 256; i++) { color[i] = i << 24; - cache->bo[i] = kgem_create_proxy(cache->cache_bo, + cache->bo[i] = kgem_create_proxy(&sna->kgem, + cache->cache_bo, sizeof(uint32_t)*i, sizeof(uint32_t)); cache->bo[i]->pitch = 4; @@ -356,7 +358,8 @@ static Bool sna_solid_cache_init(struct sna *sna) * zeroth slot simplifies some of the checks. */ cache->color[0] = 0xffffffff; - cache->bo[0] = kgem_create_proxy(cache->cache_bo, 0, sizeof(uint32_t)); + cache->bo[0] = kgem_create_proxy(&sna->kgem, cache->cache_bo, + 0, sizeof(uint32_t)); cache->bo[0]->pitch = 4; cache->dirty = 1; cache->size = 1; |