mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 18:40:33 +01:00
Gallium: fix for conform test
The following construction in util_surface_copy() in
gallium/auxiliary/util/u_rect.c, introduced in commit
d177c9ddda, incorrectly inverts
the Y coordinate in the last parameter to pipe_copy_rect().
/* If do_flip, invert src_y position and pass negative src stride
*/
pipe_copy_rect(dst_map,
&dst->block,
dst->stride,
dst_x, dst_y,
w, h,
src_map,
do_flip ? -(int) src->stride : src->stride,
src_x,
do_flip ? w - src_y : src_y);
The intention is to start at the last Y coordinate line and move
backwards, in the case of a flip; in that case, the correct
calculation is "src_y + h - 1", not "w - src_y".
This fixes a Gallium assertion failure in the conformance tests:
u_rect.c:65:pipe_copy_rect: Assertion `src_y >= 0' failed.
debug_get_bool_option: GALLIUM_ABORT_ON_ASSERT = TRUE
Trace/breakpoint trap
This commit is contained in:
parent
97d08366aa
commit
36c7bb697d
1 changed files with 1 additions and 1 deletions
|
|
@ -223,7 +223,7 @@ util_surface_copy(struct pipe_context *pipe,
|
|||
src_map,
|
||||
do_flip ? -(int) src->stride : src->stride,
|
||||
src_x,
|
||||
do_flip ? w - src_y : src_y);
|
||||
do_flip ? src_y + h - 1 : src_y);
|
||||
}
|
||||
|
||||
pipe->screen->surface_unmap(pipe->screen, src);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue