summaryrefslogtreecommitdiff
path: root/src/sna/sna_gradient.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-09-12 19:07:25 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-09-12 19:25:08 +0100
commit6b1ed58d63e9ac80d7d028fa3036633436154816 (patch)
tree56ab8a7a4038609e281268950f77f3ca1915e823 /src/sna/sna_gradient.c
parent03a7fc16f9ef00ca5591655337621ec67bc37cba (diff)
sna/gen5: Avoid bitfields for simple assignments
Diffstat (limited to 'src/sna/sna_gradient.c')
-rw-r--r--src/sna/sna_gradient.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sna/sna_gradient.c b/src/sna/sna_gradient.c
index 20850c8f..a76f16e9 100644
--- a/src/sna/sna_gradient.c
+++ b/src/sna/sna_gradient.c
@@ -335,11 +335,17 @@ static Bool sna_solid_cache_init(struct sna *sna)
if (!cache->cache_bo)
return FALSE;
+ /*
+ * Initialise [0] with white since it is very common and filling the
+ * 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]->pitch = 4;
+ cache->dirty = 1;
cache->size = 1;
cache->last = 0;
+
return TRUE;
}