aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nouveau_vp3_video.c
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2020-02-05 10:21:20 +0100
committerPierre-Eric Pelloux-Prayer <[email protected]>2020-02-27 10:01:31 +0100
commit24f2b0a8560f34745854bf8263fa7c2d0f95f2bc (patch)
tree775bf398b06d9e3c10cc4d5f9a0f9ca80d09ccea /src/gallium/drivers/nouveau/nouveau_vp3_video.c
parent87807298a307d4e38195dc04f66c26404e7cb791 (diff)
gallium/video: remove pipe_video_buffer.chroma_format
chroma_format depends on buffer_format so use the format_to_chroma_format helper instead of storing it next to buffer_format. This avoids bugs where one value is changed without updating the other. Reviewed-by: Marek Olšák <[email protected]> Acked-by: Leo Liu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3738>
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_vp3_video.c')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_vp3_video.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video.c b/src/gallium/drivers/nouveau/nouveau_vp3_video.c
index 7c5ae25736d..b28d31e0079 100644
--- a/src/gallium/drivers/nouveau/nouveau_vp3_video.c
+++ b/src/gallium/drivers/nouveau/nouveau_vp3_video.c
@@ -89,7 +89,7 @@ nouveau_vp3_video_buffer_create(struct pipe_context *pipe,
return vl_video_buffer_create(pipe, templat);
assert(templat->interlaced);
- assert(templat->chroma_format == PIPE_VIDEO_CHROMA_FORMAT_420);
+ assert(pipe_format_to_chroma_format(templat->buffer_format) == PIPE_VIDEO_CHROMA_FORMAT_420);
buffer = CALLOC_STRUCT(nouveau_vp3_video_buffer);
if (!buffer)
@@ -98,7 +98,6 @@ nouveau_vp3_video_buffer_create(struct pipe_context *pipe,
buffer->base.buffer_format = templat->buffer_format;
buffer->base.context = pipe;
buffer->base.destroy = nouveau_vp3_video_buffer_destroy;
- buffer->base.chroma_format = templat->chroma_format;
buffer->base.width = templat->width;
buffer->base.height = templat->height;
buffer->base.get_sampler_view_planes = nouveau_vp3_video_buffer_sampler_view_planes;