From b4b3041132e5b73b263217b7c25ebec3f3d879ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Thu, 2 May 2013 16:19:41 +0200 Subject: [PATCH] radeon/uvd: enable interlaced buffers by default MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Kills tilling on UVD buffers, but we currently don't really need that. Signed-off-by: Christian König --- src/gallium/drivers/r600/r600_uvd.c | 6 +++--- src/gallium/drivers/radeon/radeon_uvd.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/r600/r600_uvd.c b/src/gallium/drivers/r600/r600_uvd.c index 9d8ae9427ab..6a3974c6b27 100644 --- a/src/gallium/drivers/r600/r600_uvd.c +++ b/src/gallium/drivers/r600/r600_uvd.c @@ -76,7 +76,7 @@ struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe, template.height = align(tmpl->height / array_size, VL_MACROBLOCK_HEIGHT); vl_video_buffer_template(&templ, &template, resource_formats[0], 1, array_size, PIPE_USAGE_STATIC, 0); - if (ctx->chip_class < EVERGREEN) + if (ctx->chip_class < EVERGREEN || tmpl->interlaced) templ.flags = R600_RESOURCE_FLAG_TRANSFER; resources[0] = (struct r600_texture *) pipe->screen->resource_create(pipe->screen, &templ); @@ -85,7 +85,7 @@ struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe, if (resource_formats[1] != PIPE_FORMAT_NONE) { vl_video_buffer_template(&templ, &template, resource_formats[1], 1, array_size, PIPE_USAGE_STATIC, 1); - if (ctx->chip_class < EVERGREEN) + if (ctx->chip_class < EVERGREEN || tmpl->interlaced) templ.flags = R600_RESOURCE_FLAG_TRANSFER; resources[1] = (struct r600_texture *) pipe->screen->resource_create(pipe->screen, &templ); @@ -95,7 +95,7 @@ struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe, if (resource_formats[2] != PIPE_FORMAT_NONE) { vl_video_buffer_template(&templ, &template, resource_formats[2], 1, array_size, PIPE_USAGE_STATIC, 2); - if (ctx->chip_class < EVERGREEN) + if (ctx->chip_class < EVERGREEN || tmpl->interlaced) templ.flags = R600_RESOURCE_FLAG_TRANSFER; resources[2] = (struct r600_texture *) pipe->screen->resource_create(pipe->screen, &templ); diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c index 154ef8e4038..caf3e9041d6 100644 --- a/src/gallium/drivers/radeon/radeon_uvd.c +++ b/src/gallium/drivers/radeon/radeon_uvd.c @@ -1105,9 +1105,9 @@ int ruvd_get_video_param(struct pipe_screen *screen, case PIPE_VIDEO_CAP_PREFERED_FORMAT: return PIPE_FORMAT_NV12; case PIPE_VIDEO_CAP_PREFERS_INTERLACED: - return false; + return true; case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED: - return false; /* TODO: enable this */ + return true; case PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE: return true; default: -- 2.30.2