Commit 950d1670 authored by Michel Dänzer's avatar Michel Dänzer Committed by Juan Suárez Romero

radeonsi: fix VAAPI segfault due to various bugs

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111236
(cherry picked from commit 67d930d6)
parent e3701972
......@@ -178,6 +178,7 @@ void si_vid_join_surfaces(struct si_context *sctx,
surfaces[i]->u.gfx9.offset[j] += off;
}
surfaces[i]->flags |= RADEON_SURF_IMPORTED;
off += surfaces[i]->surf_size;
}
......
......@@ -1809,6 +1809,7 @@ static bool si_can_invalidate_texture(struct si_screen *sscreen,
const struct pipe_box *box)
{
return !tex->buffer.b.is_shared &&
!(tex->surface.flags & RADEON_SURF_IMPORTED) &&
!(transfer_usage & PIPE_TRANSFER_READ) &&
tex->buffer.b.b.last_level == 0 &&
util_texrange_covers_whole_level(&tex->buffer.b.b, 0,
......
......@@ -96,6 +96,7 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe,
/* reset the address */
resources[i]->buffer.gpu_address = ctx->ws->buffer_get_virtual_address(
resources[i]->buffer.buf);
resources[i]->buffer.bo_size = resources[i]->buffer.buf->size;
}
vidtemplate.height *= array_size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment