[Mesa-stable] [PATCH v2 1/2] i965/miptree: Fix can_blit_slice()
Nanley Chery
nanleychery at gmail.com
Fri Aug 10 17:23:34 UTC 2018
Satisfy the BLT engine's row pitch limitation on the destination
miptree. The destination miptree is untiled, so its row_pitch will be
slightly less than or equal to the source miptree's row_pitch. Use the
source miptree's row_pitch in can_blit_slice instead of its blt_pitch.
Fixes 0288fe8d0417730bdd5b3477130dd1dc32bdbcd3
("i965/miptree: Use the correct BLT pitch")
Cc: <mesa-stable at lists.freedesktop.org>
Reported-by: Dylan Baker <dylan at pnwbakers.com>
---
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index a18d5ac3624..d8e823e4826 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -3544,8 +3544,13 @@ static bool
can_blit_slice(struct intel_mipmap_tree *mt,
unsigned int level, unsigned int slice)
{
- /* See intel_miptree_blit() for details on the 32k pitch limit. */
- if (intel_miptree_blt_pitch(mt) >= 32768)
+ /* The blit destination is untiled, so its row_pitch will be slightly less
+ * than or equal to the source's row_pitch. The BLT engine only supports
+ * linear row pitches up to but not including 32k.
+ *
+ * See intel_miptree_blit() for details on the 32k pitch limit.
+ */
+ if (mt->surf.row_pitch >= 32768)
return false;
return true;
--
2.18.0
More information about the mesa-stable
mailing list