<div dir="auto">I think there are places where we can drop some stride checks.  We should do that too.  Thanks!<div dir="auto"><br></div><div dir="auto">I thought we didn't see any blits last night.  How does this fix it?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Jan 22, 2017 1:50 AM, "Kenneth Graunke" <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When trying to blit larger tiled surfaces, the pitch can be larger than<br>
32768 bytes, which means it won't fit in a GLshort.  Passing it in will<br>
truncate the stride to 0, which has...surprising results.<br>
<br>
For Y-tiled surfaces, pitches can be up to 128KB, as we divide by 4 and<br>
program the pitch as a number of tiles.  So, this is actually legal and<br>
works out if we don't botch things here.<br>
<br>
Fixes GL45-CTS.gtf30.GL3Tests.depth_<wbr>texture.depth_texture_<wbr>copyteximage<br>
at widths greater than 8192.<br>
<br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
 src/mesa/drivers/dri/i965/<wbr>intel_blit.c | 4 ++--<br>
 src/mesa/drivers/dri/i965/<wbr>intel_blit.h | 4 ++--<br>
 2 files changed, 4 insertions(+), 4 deletions(-)<br>
<br>
XXX: This patch needs proper testing.  The test lab is having issues<br>
     this weekend, so I'll plan to test it more thoroughly on Monday.<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_blit.c b/src/mesa/drivers/dri/i965/<wbr>intel_blit.c<br>
index 21a16e18c38..6ab06b10fd9 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_blit.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_blit.c<br>
@@ -577,12 +577,12 @@ xy_blit_cmd(uint32_t src_tiling, uint32_t src_tr_mode,<br>
 bool<br>
 intelEmitCopyBlit(struct brw_context *brw,<br>
                  GLuint cpp,<br>
-                 GLshort src_pitch,<br>
+                 uint32_t src_pitch,<br>
                  drm_intel_bo *src_buffer,<br>
                  GLuint src_offset,<br>
                  uint32_t src_tiling,<br>
                  uint32_t src_tr_mode,<br>
-                 GLshort dst_pitch,<br>
+                 uint32_t dst_pitch,<br>
                  drm_intel_bo *dst_buffer,<br>
                  GLuint dst_offset,<br>
                  uint32_t dst_tiling,<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_blit.h b/src/mesa/drivers/dri/i965/<wbr>intel_blit.h<br>
index 6925795656a..ae78dfe56dc 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_blit.h<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_blit.h<br>
@@ -31,12 +31,12 @@<br>
 bool<br>
 intelEmitCopyBlit(struct brw_context *brw,<br>
                   GLuint cpp,<br>
-                  GLshort src_pitch,<br>
+                  uint32_t src_pitch,<br>
                   drm_intel_bo *src_buffer,<br>
                   GLuint src_offset,<br>
                   uint32_t src_tiling,<br>
                   uint32_t src_tr_mode,<br>
-                  GLshort dst_pitch,<br>
+                  uint32_t dst_pitch,<br>
                   drm_intel_bo *dst_buffer,<br>
                   GLuint dst_offset,<br>
                   uint32_t dst_tiling,<br>
--<br>
2.11.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>