mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-03 17:20:26 +01:00
gallium: Fix VAAPI postproc blit
Fixes the VAAPI postproc issue mentioned in this comment
(https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6736#note_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: 49465babdb ("frontends/va/postproc: Use the actual image height when blitting")
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7970>
This commit is contained in:
parent
c47fe54bc7
commit
c5088b4972
2 changed files with 3 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue