summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_texture.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h
index e73d44946d2..2960574fb2c 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.h
+++ b/src/gallium/drivers/llvmpipe/lp_texture.h
@@ -181,6 +181,16 @@ llvmpipe_resource_is_1d(const struct pipe_resource *resource)
static INLINE unsigned
+llvmpipe_layer_stride(struct pipe_resource *resource,
+ unsigned level)
+{
+ struct llvmpipe_resource *lpr = llvmpipe_resource(resource);
+ assert(level < LP_MAX_TEXTURE_2D_LEVELS);
+ return lpr->img_stride[level];
+}
+
+
+static INLINE unsigned
llvmpipe_resource_stride(struct pipe_resource *resource,
unsigned level)
{