diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-06-27 20:56:29 +0900 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-06-27 20:56:29 +0900 |
commit | 4f45dbc6aa9b55d96cf6aeb32117e117e333b4a8 (patch) | |
tree | fdbf508d3cbd813ff6d6b93b22156b3ef9238a5c | |
parent | 891469a3a5525a741094fd3f1e4a1270ec8b3c3b (diff) |
gdi: Update for cpp removal.
-rw-r--r-- | src/gallium/winsys/gdi/wmesa.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/winsys/gdi/wmesa.c b/src/gallium/winsys/gdi/wmesa.c index 0b93f8c4c32..86b085ab841 100644 --- a/src/gallium/winsys/gdi/wmesa.c +++ b/src/gallium/winsys/gdi/wmesa.c @@ -477,13 +477,15 @@ wm_surface_alloc_storage(struct pipe_winsys *winsys, surf->width = width; surf->height = height; surf->format = format; - surf->cpp = pf_get_size(format); - surf->pitch = round_up(width, alignment / surf->cpp); + pf_get_block(format, &surf->block); + surf->nblocksx = pf_get_nblocksx(&surf->block, width); + surf->nblocksy = pf_get_nblocksy(&surf->block, height); + surf->stride = round_up(surf->nblocksx * surf->block.size, alignment); assert(!surf->buffer); surf->buffer = winsys->buffer_create(winsys, alignment, PIPE_BUFFER_USAGE_PIXEL, - surf->pitch * surf->cpp * height); + surf->nblocksy * surf->stride); if(!surf->buffer) return -1; |