summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2015-04-22 21:32:49 +0300
committerFrancisco Jerez <currojerez@riseup.net>2015-04-27 17:28:28 +0300
commite94c80c08b1744fb06dcdd083b92b97971e03892 (patch)
tree66979f5f6154ed31d4b8b80fe2f62ded43729297 /src/mesa/drivers/dri/i965/intel_mipmap_tree.h
parentf9965347dc0cac8822c44faf7bade09093076c74 (diff)
downloadexternal_mesa3d-e94c80c08b1744fb06dcdd083b92b97971e03892.zip
external_mesa3d-e94c80c08b1744fb06dcdd083b92b97971e03892.tar.gz
external_mesa3d-e94c80c08b1744fb06dcdd083b92b97971e03892.tar.bz2
i965: Add helper functions to calculate the slice pitch of an array or 3D miptree.
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_mipmap_tree.h')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index 77b0294..8b42e4a 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -735,6 +735,24 @@ intel_miptree_updownsample(struct brw_context *brw,
struct intel_mipmap_tree *src,
struct intel_mipmap_tree *dst);
+/**
+ * Horizontal distance from one slice to the next in the two-dimensional
+ * miptree layout.
+ */
+unsigned
+brw_miptree_get_horizontal_slice_pitch(const struct brw_context *brw,
+ const struct intel_mipmap_tree *mt,
+ unsigned level);
+
+/**
+ * Vertical distance from one slice to the next in the two-dimensional miptree
+ * layout.
+ */
+unsigned
+brw_miptree_get_vertical_slice_pitch(const struct brw_context *brw,
+ const struct intel_mipmap_tree *mt,
+ unsigned level);
+
void brw_miptree_layout(struct brw_context *brw, struct intel_mipmap_tree *mt);
void *intel_miptree_map_raw(struct brw_context *brw,