[Bug 90734] glBufferSubData is corrupting data when buffer is > 32k
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Jun 6 01:17:11 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=90734
--- Comment #3 from Chris Wilson <chris at chris-wilson.co.uk> ---
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c
b/src/mesa/drivers/dri/i965/intel_blit.c
index 4bfa0ef..a73da35 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -539,23 +539,26 @@ intel_emit_linear_blit(struct brw_context *brw,
*/
pitch = ROUND_DOWN_TO(MIN2(size, (1 << 15) - 1), 4);
height = (pitch == 0) ? 1 : size / pitch;
+ if (height) {
+ src_x = src_offset % 64;
+ dst_x = dst_offset % 64;
+ ok = intelEmitCopyBlit(brw, 4,
+ pitch, src_bo, src_offset - src_x,
I915_TILING_NONE,
+ pitch, dst_bo, dst_offset - dst_x,
I915_TILING_NONE,
+ src_x/4, 0, /* src x/y */
+ dst_x/4, 0, /* dst x/y */
+ pitch/4, height, /* w, h */
+ GL_COPY);
+ if (!ok)
+ _mesa_problem(ctx, "Failed to linear blit %dx%d\n", pitch, height);
+
+ src_offset += pitch * height;
+ dst_offset += pitch * height;
+ size -= pitch * height;
+ }
+
src_x = src_offset % 64;
dst_x = dst_offset % 64;
- ok = intelEmitCopyBlit(brw, 1,
- pitch, src_bo, src_offset - src_x, I915_TILING_NONE,
- pitch, dst_bo, dst_offset - dst_x, I915_TILING_NONE,
- src_x, 0, /* src x/y */
- dst_x, 0, /* dst x/y */
- pitch, height, /* w, h */
- GL_COPY);
- if (!ok)
- _mesa_problem(ctx, "Failed to linear blit %dx%d\n", pitch, height);
-
- src_offset += pitch * height;
- dst_offset += pitch * height;
- src_x = src_offset % 64;
- dst_x = dst_offset % 64;
- size -= pitch * height;
assert (size < (1 << 15));
pitch = ALIGN(size, 4);
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20150606/853f1af3/attachment.html>
More information about the intel-3d-bugs
mailing list