[PATCH i-g-t 27/37] lib/vebox: Add support for fp16 RGB formats

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Tue Aug 27 17:20:23 UTC 2024


Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>

On 3.7.2024 2.28, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Support VEBOX copies with fp16 RGB formats.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>   lib/veboxcopy_gen12.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/veboxcopy_gen12.c b/lib/veboxcopy_gen12.c
> index 44c914e7f2bf..af52a96578d9 100644
> --- a/lib/veboxcopy_gen12.c
> +++ b/lib/veboxcopy_gen12.c
> @@ -32,6 +32,7 @@
>   #define R8G8B8A8_UNORM	8
>   #define PACKED_444_16	9
>   #define PLANAR_420_16	12
> +#define R16G16B16A16	13
>   
>   struct vebox_surface_state {
>   	struct {
> @@ -165,6 +166,8 @@ static uint32_t compression_format(int format, struct intel_buf *buf)
>   		return 0;
>   
>   	switch (format) {
> +	case R16G16B16A16:
> +		return 0x1;
>   	case R8G8B8A8_UNORM:
>   		return 0xa;
>   	case PLANAR_420_8:
> @@ -344,8 +347,9 @@ void gen12_vebox_copyfunc(struct intel_bb *ibb,
>   					      R8G8B8A8_UNORM;
>   		break;
>   	case 64:
> -		igt_assert(!src->format_is_yuv_semiplanar && src->format_is_yuv);
> -		format = PACKED_444_16;
> +		igt_assert(!src->format_is_yuv_semiplanar);
> +		format = src->format_is_yuv ? PACKED_444_16 :
> +					      R16G16B16A16;
>   		break;
>   	default:
>   		igt_assert_f(0, "Unsupported bpp: %u\n", src->bpp);



More information about the igt-dev mailing list