summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_uvd.c
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@chown.ath.cx>2013-10-09 02:23:47 +0200
committerChristian König <christian.koenig@amd.com>2013-10-09 13:02:40 +0200
commit0bb05484bff3ff4ec791c463ed1340572da4333c (patch)
treefe030f7afda28757e720bbb96f6fbddedf99dd51 /src/gallium/drivers/radeon/radeon_uvd.c
parentc207fa6c180bdd121a80e155465160086b87e734 (diff)
downloadexternal_mesa3d-0bb05484bff3ff4ec791c463ed1340572da4333c.zip
external_mesa3d-0bb05484bff3ff4ec791c463ed1340572da4333c.tar.gz
external_mesa3d-0bb05484bff3ff4ec791c463ed1340572da4333c.tar.bz2
radeon/uvd: fix video format reporting
UVD can only support NV12 in the case of hardware decoding, but we can still use all other formats for software decoding. Use the UNKNOWN profile to signal that we're not interesting in hardware decoding. v2: use profile instead of entrypoint Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_uvd.c')
-rw-r--r--src/gallium/drivers/radeon/radeon_uvd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c
index cfc7d03..34650d4 100644
--- a/src/gallium/drivers/radeon/radeon_uvd.c
+++ b/src/gallium/drivers/radeon/radeon_uvd.c
@@ -1163,6 +1163,9 @@ boolean ruvd_is_format_supported(struct pipe_screen *screen,
enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint)
{
- /* we can only handle this one anyway */
- return format == PIPE_FORMAT_NV12;
+ /* we can only handle this one with UVD */
+ if (profile != PIPE_VIDEO_PROFILE_UNKNOWN)
+ return format == PIPE_FORMAT_NV12;
+
+ return vl_video_buffer_is_format_supported(screen, format, profile, entrypoint);
}