mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 15:30:14 +01:00
i965: Add a safety check for emitting blits.
With all of the flipping and pitch twiddling and miptree layout involved in our blits, there are lots of ways for us to scribble outside of a buffer. Put in a check that we're not about to do so. This catches a bug that glamor was running into. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
parent
bdc5241af4
commit
98cdb2ceed
1 changed files with 4 additions and 0 deletions
|
|
@ -391,6 +391,10 @@ intelEmitCopyBlit(struct brw_context *brw,
|
||||||
|
|
||||||
assert(dst_x < dst_x2);
|
assert(dst_x < dst_x2);
|
||||||
assert(dst_y < dst_y2);
|
assert(dst_y < dst_y2);
|
||||||
|
assert(src_offset + (src_y + h - 1) * abs(src_pitch) +
|
||||||
|
(w * cpp) <= src_buffer->size);
|
||||||
|
assert(dst_offset + (dst_y + h - 1) * abs(dst_pitch) +
|
||||||
|
(w * cpp) <= dst_buffer->size);
|
||||||
|
|
||||||
BEGIN_BATCH_BLT_TILED(8, dst_y_tiled, src_y_tiled);
|
BEGIN_BATCH_BLT_TILED(8, dst_y_tiled, src_y_tiled);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue