<div dir="ltr">Last time I was digging around in the blitter code, I came across this and meant to fix it. Didn't happen though.<br><div><br>Reviewed-but-not-tested-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>><br><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 10, 2014 at 8:03 PM, Ben Widawsky <span dir="ltr"><<a href="mailto:benjamin.widawsky@intel.com" target="_blank">benjamin.widawsky@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The odds of having this patch make a difference on Gen8+ are probably very low.<br>
<br>
Only compile tested.<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Signed-off-by: Ben Widawsky <<a href="mailto:ben@bwidawsk.net">ben@bwidawsk.net</a>><br>
---<br>
src/mesa/drivers/dri/i965/intel_blit.c | 12 ++++++------<br>
1 file changed, 6 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c<br>
index 73ab488..8d81671 100644<br>
--- a/src/mesa/drivers/dri/i965/intel_blit.c<br>
+++ b/src/mesa/drivers/dri/i965/intel_blit.c<br>
@@ -335,7 +335,9 @@ intelEmitCopyBlit(struct brw_context *brw,<br>
if (pass >= 2)<br>
return false;<br>
<br>
- intel_batchbuffer_require_space(brw, 8 * 4, BLT_RING);<br>
+ unsigned length = brw->gen >= 8 ? 10 : 8;<br>
+<br>
+ intel_batchbuffer_require_space(brw, length * 4, BLT_RING);<br>
DBG("%s src:buf(%p)/%d+%d %d,%d dst:buf(%p)/%d+%d %d,%d sz:%dx%d\n",<br>
__FUNCTION__,<br>
src_buffer, src_pitch, src_offset, src_x, src_y,<br>
@@ -399,8 +401,6 @@ intelEmitCopyBlit(struct brw_context *brw,<br>
assert(dst_offset + (dst_y + h - 1) * abs(dst_pitch) +<br>
(w * cpp) <= dst_buffer->size);<br>
<br>
- unsigned length = brw->gen >= 8 ? 10 : 8;<br>
-<br>
BEGIN_BATCH_BLT_TILED(length, dst_y_tiled, src_y_tiled);<br>
OUT_BATCH(CMD | (length - 2));<br>
OUT_BATCH(BR13 | (uint16_t)dst_pitch);<br>
@@ -467,7 +467,9 @@ intelEmitImmediateColorExpandBlit(struct brw_context *brw,<br>
__FUNCTION__,<br>
dst_buffer, dst_pitch, dst_offset, x, y, w, h, src_size, dwords);<br>
<br>
- intel_batchbuffer_require_space(brw, (8 * 4) + (3 * 4) + dwords * 4, BLT_RING);<br>
+ unsigned xy_setup_blt_length = brw->gen >= 8 ? 10 : 8;<br>
+ intel_batchbuffer_require_space(brw, (xy_setup_blt_length * 4) +<br>
+ (3 * 4) + dwords * 4, BLT_RING);<br>
<br>
opcode = XY_SETUP_BLT_CMD;<br>
if (cpp == 4)<br>
@@ -484,8 +486,6 @@ intelEmitImmediateColorExpandBlit(struct brw_context *brw,<br>
if (dst_tiling != I915_TILING_NONE)<br>
blit_cmd |= XY_DST_TILED;<br>
<br>
- unsigned xy_setup_blt_length = brw->gen >= 8 ? 10 : 8;<br>
-<br>
BEGIN_BATCH_BLT(xy_setup_blt_length + 3);<br>
OUT_BATCH(opcode | (xy_setup_blt_length - 2));<br>
OUT_BATCH(br13);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.3<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div></div></div>