summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-07-16 09:02:01 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-07-16 09:03:52 +0100
commit1323abcc2eb19df81a000d4a37af6949801a9076 (patch)
tree0cbabd7296bde5e948af48aa17de01d129799c25
parent4a447c514b3193897e0d3ec4b3cf75f346d7438e (diff)
sna: Make the assumption bpp>=8 explicit inside the bo size calculation
Use an assert to document that we have a few rounding issues if bpp < 8. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 237ecf25..02d74819 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1395,6 +1395,7 @@ static uint32_t kgem_surface_size(struct kgem *kgem,
assert(width <= MAXSHORT);
assert(height <= MAXSHORT);
+ assert(bpp >= 8);
if (kgem->gen <= 030) {
if (tiling) {