summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2008-01-11 16:32:39 +0100
committerMichel Dänzer <[email protected]>2008-01-11 16:32:39 +0100
commit45cdb6eb456561a948e43b15f5f74618f3173841 (patch)
tree300713e09d1e01256fc9db31a4ad4b01f2d2501e /src
parentb9f3f732aaec97aac2a725a4f0b1244ebac61c7f (diff)
i965: Fix unresolved symbol intel_miptree_pitch_align.
For some reason, I thought that function was shared with i915tex... The good news is that i965 gets to keep the lower pitch alignment requirements. Thanks to Todd Merrill for pointing out the problem on IRC.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c23
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.h4
2 files changed, 27 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index af8d56e015f..78191d10d30 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -110,6 +110,29 @@ struct intel_mipmap_tree *intel_miptree_create( struct intel_context *intel,
}
+/**
+ * intel_miptree_pitch_align:
+ *
+ * @intel: intel context pointer
+ *
+ * @mt: the miptree to compute pitch alignment for
+ *
+ * @pitch: the natural pitch value
+ *
+ * Given @pitch, compute a larger value which accounts for
+ * any necessary alignment required by the device
+ */
+
+int intel_miptree_pitch_align (struct intel_context *intel,
+ struct intel_mipmap_tree *mt,
+ int pitch)
+{
+ if (!mt->compressed)
+ pitch = (pitch * mt->cpp + 3) & ~3;
+
+ return pitch;
+}
+
void intel_miptree_destroy( struct intel_context *intel,
struct intel_mipmap_tree *mt )
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index 2f99f6fc74d..c67c726cfcd 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -115,6 +115,10 @@ struct intel_mipmap_tree *intel_miptree_create( struct intel_context *intel,
GLuint cpp,
GLboolean compressed);
+int intel_miptree_pitch_align (struct intel_context *intel,
+ struct intel_mipmap_tree *mt,
+ int pitch);
+
void intel_miptree_destroy( struct intel_context *intel,
struct intel_mipmap_tree *mt );