[igt-dev] [PATCH i-g-t] lib/rendercopy_gen9: Ensure to cover all destination area

Chris Wilson chris at chris-wilson.co.uk
Mon Nov 23 23:47:15 UTC 2020


Quoting Mika Kahola (2020-11-23 14:20:35)
> To ensure to cover all destination area during fast clear,
> we need to round up the destination coordinates at the lower
> right corner.
> 
> Signed-off-by: Mika Kahola <mika.kahola at intel.com>
> ---
>  lib/rendercopy_gen9.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/rendercopy_gen9.c b/lib/rendercopy_gen9.c
> index dd8c8c7c..eecf73d3 100644
> --- a/lib/rendercopy_gen9.c
> +++ b/lib/rendercopy_gen9.c
> @@ -293,7 +293,7 @@ gen7_fill_vertex_buffer_data(struct intel_bb *ibb,
>                 emit_vertex_normalized(ibb, src_x, intel_buf_width(src));
>                 emit_vertex_normalized(ibb, src_y, intel_buf_height(src));
>         } else {
> -               emit_vertex_2s(ibb, (dst_x + width)/64, DIV_ROUND_UP(dst_y + height, 16));
> +               emit_vertex_2s(ibb, DIV_ROUND_UP(dst_x + width, 64), DIV_ROUND_UP(dst_y + height, 16));

Ok. Still worried about partial coverage, but it only appears to be used
for fastclears in kms_ccs over the whole fb. The API leaks.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the igt-dev mailing list