mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
radeonsi/video: Fix setting decode surface format for single plane formats
multi_plane_format is only valid when num_planes > 1.
Fixes: 26979becec ("radeonsi/video: Add video decoder using ac_video_dec")
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40811>
This commit is contained in:
parent
44a061a034
commit
cc78a5dd4b
1 changed files with 2 additions and 2 deletions
|
|
@ -124,9 +124,9 @@ static void si_dec_fill_surface(struct si_video_dec *vid, struct pipe_resource *
|
|||
struct si_screen *sscreen = (struct si_screen *)vid->screen;
|
||||
struct si_texture *tex = (struct si_texture *)res;
|
||||
|
||||
surf->format = tex->multi_plane_format;
|
||||
surf->format = tex->num_planes > 1 ? tex->multi_plane_format : res->format;
|
||||
surf->size += tex->buffer.buf->size;
|
||||
surf->num_planes = util_format_get_num_planes(tex->multi_plane_format);
|
||||
surf->num_planes = util_format_get_num_planes(surf->format);
|
||||
|
||||
for (uint32_t i = 0; i < surf->num_planes; i++) {
|
||||
assert(tex);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue