Commit c5088b49 authored by Thong Thai's avatar Thong Thai Committed by Marge Bot
Browse files

gallium: Fix VAAPI postproc blit

Fixes the VAAPI postproc issue mentioned in this comment
(mesa/mesa!6736 (comment 626808))
without changing the height of the underlying resource when doing the
blit.

This commit removes the 0.5 pixel center offset from the compute blit - VAAPI postproc is the only function that uses this compute blit.

Fixes: 49465bab

 ("frontends/va/postproc: Use the actual image height when blitting")
Signed-off-by: Thong Thai's avatarThong Thai <thong.thai@amd.com>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Part-of: <mesa/mesa!7970>
parent c47fe54b
Pipeline #240277 waiting for manual action with stages
in 27 seconds
......@@ -92,8 +92,8 @@ void util_compute_blit(struct pipe_context *ctx, struct pipe_blit_info *blit_inf
float y_scale = blit_info->src.box.height / (float)blit_info->dst.box.height;
float z_scale = blit_info->src.box.depth / (float)blit_info->dst.box.depth;
unsigned data[] = {u_bitcast_f2u((blit_info->src.box.x + 0.5) / (float)src->width0),
u_bitcast_f2u((blit_info->src.box.y + 0.5) / (float)src->height0),
unsigned data[] = {u_bitcast_f2u(blit_info->src.box.x / (float)src->width0),
u_bitcast_f2u(blit_info->src.box.y / (float)src->height0),
u_bitcast_f2u(blit_info->src.box.z),
u_bitcast_f2u(0),
u_bitcast_f2u(x_scale / src->width0),
......
......@@ -204,7 +204,6 @@ static VAStatus vlVaPostProcBlit(vlVaDriver *drv, vlVaContext *context,
memset(&blit, 0, sizeof(blit));
blit.src.resource = from->texture;
blit.src.resource->height0 = src_region->height;
blit.src.format = from->format;
blit.src.level = 0;
blit.src.box.z = from->u.tex.first_layer;
......@@ -212,7 +211,6 @@ static VAStatus vlVaPostProcBlit(vlVaDriver *drv, vlVaContext *context,
vlVaGetBox(src, i, &blit.src.box, src_region);
blit.dst.resource = dst_surfaces[i]->texture;
blit.dst.resource->height0 = dst_region->height;
blit.dst.format = dst_surfaces[i]->format;
blit.dst.level = 0;
blit.dst.box.z = dst_surfaces[i]->u.tex.first_layer;
......@@ -311,7 +309,7 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
src = src_surface->buffer;
dst = dst_surface->buffer;
/* convert the destination buffer to progressive if we're deinterlacing
/* convert the destination buffer to progressive if we're deinterlacing
otherwise we might end up deinterlacing twice */
if (param->num_filters && dst->interlaced) {
vlVaSurface *surf;
......
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