Displaying 1 result from an estimated 1 matches for "nouveau_format_get_nblocksy".
2012 Apr 06
1
[WIP PATCH] dri/nouveau: Add S3TC support for nv20.
...@@ nouveau_surface_alloc(struct gl_context *ctx, struct nouveau_surface *s,
s->pitch = align(s->pitch, 64);
}
- ret = nouveau_bo_new(context_dev(ctx), flags, 0, s->pitch * height,
- &config, &s->bo);
+ if (_mesa_is_format_compressed(format))
+ size = s->pitch * nouveau_format_get_nblocksy(format, height);
+ else
+ size = s->pitch * height;
+
+ ret = nouveau_bo_new(context_dev(ctx), flags, 0, size, &config, &s->bo);
assert(!ret);
}
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index 643b890..52f0259 10...