mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-18 10:48:21 +02:00
iris: Check data alignment for copy_mem_mem
Check both source and destination offsets are aligned to 4. This
patch fixes dEQP-GLES{2|3}.functional.buffer.write.random.* tests
failures on guest side while trying to copy small (<16b) buffers
via glBufferSubData() with offset which isn't aligned to 4.
Fixes: 9b1b9714 ("iris: Use MI_COPY_MEM_MEM for tiny resource_copy_region calls.")
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Lionel Landwerlin lionel.g.landwerlin@intel.com
Reviewed-by: Marcin Ślusarz marcin.slusarz@intel.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10910>
(cherry picked from commit a04d0a304a)
This commit is contained in:
parent
08aca803aa
commit
3bb1a79598
2 changed files with 3 additions and 2 deletions
|
|
@ -526,7 +526,7 @@
|
|||
"description": "iris: Check data alignment for copy_mem_mem",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "9b1b9714915c3e3d08582fd1d77f182cdf3e5090"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -752,7 +752,8 @@ iris_resource_copy_region(struct pipe_context *ctx,
|
|||
|
||||
/* Use MI_COPY_MEM_MEM for tiny (<= 16 byte, % 4) buffer copies. */
|
||||
if (p_src->target == PIPE_BUFFER && p_dst->target == PIPE_BUFFER &&
|
||||
(src_box->width % 4 == 0) && src_box->width <= 16) {
|
||||
dstx % 4 == 0 && src_box->x % 4 == 0 &&
|
||||
src_box->width % 4 == 0 && src_box->width <= 16) {
|
||||
struct iris_bo *dst_bo = iris_resource_bo(p_dst);
|
||||
batch = get_preferred_batch(ice, dst_bo);
|
||||
iris_batch_maybe_flush(batch, 24 + 5 * (src_box->width / 4));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue