summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe/p_format.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-06-11 16:34:56 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-06-11 16:34:56 +0100
commitbf89ecb6c92aaaeccd7b6f093cb8bae9fd56aaf6 (patch)
treeb7b38a1e1bd5e975f77ec23ea872a97dc6963b64 /src/gallium/include/pipe/p_format.h
parent0d2ac7a10b2904eda70794534a9a73b3f4b654cf (diff)
parentcc09724a50a4cabb68b7c5f5b8d3812d38f65391 (diff)
Merge branch 'mesa_7_5_branch'
Conflicts: src/mesa/state_tracker/st_cb_fbo.c src/mesa/state_tracker/st_framebuffer.c
Diffstat (limited to 'src/gallium/include/pipe/p_format.h')
-rw-r--r--src/gallium/include/pipe/p_format.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index a279eefef9..187377f92a 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -536,6 +536,18 @@ pf_get_nblocks(const struct pipe_format_block *block, unsigned width, unsigned h
return pf_get_nblocksx(block, width)*pf_get_nblocksy(block, height);
}
+static INLINE size_t
+pf_get_stride(const struct pipe_format_block *block, unsigned width)
+{
+ return pf_get_nblocksx(block, width)*block->size;
+}
+
+static INLINE size_t
+pf_get_2d_size(const struct pipe_format_block *block, size_t stride, unsigned height)
+{
+ return pf_get_nblocksy(block, height)*stride;
+}
+
static INLINE boolean
pf_is_depth_stencil( enum pipe_format format )
{