mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
mesa/st: fix crash in st_texture_image_copy
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
This commit is contained in:
parent
7d56caabe4
commit
c451011d99
1 changed files with 15 additions and 6 deletions
|
|
@ -342,12 +342,21 @@ st_texture_image_copy(struct pipe_context *pipe,
|
|||
src_surface = screen->get_tex_surface(screen, src, face, srcLevel, i,
|
||||
PIPE_BUFFER_USAGE_GPU_READ);
|
||||
|
||||
pipe->surface_copy(pipe,
|
||||
dst_surface,
|
||||
0, 0, /* destX, Y */
|
||||
src_surface,
|
||||
0, 0, /* srcX, Y */
|
||||
width, height);
|
||||
if (pipe->surface_copy) {
|
||||
pipe->surface_copy(pipe,
|
||||
dst_surface,
|
||||
0, 0, /* destX, Y */
|
||||
src_surface,
|
||||
0, 0, /* srcX, Y */
|
||||
width, height);
|
||||
} else {
|
||||
util_surface_copy(pipe, FALSE,
|
||||
dst_surface,
|
||||
0, 0, /* destX, Y */
|
||||
src_surface,
|
||||
0, 0, /* srcX, Y */
|
||||
width, height);
|
||||
}
|
||||
|
||||
pipe_surface_reference(&src_surface, NULL);
|
||||
pipe_surface_reference(&dst_surface, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue