From 4861d2a3956fd7394fa2da6337a0418cbb00dc82 Mon Sep 17 00:00:00 2001 From: Kevin Strasser Date: Thu, 24 Jan 2019 17:32:36 -0800 Subject: gbm: Add buffer handling and visuals for fp16 formats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Define and set a new loader cap DRI_LOADER_CAP_FP16, indicating that gbm can handle fp16 formats. Signed-off-by: Kevin Strasser Reviewed-by: Adam Jackson Reviewed-by: Marek Olšák Reviewed-by: Emil Velikov --- src/gbm/main/gbm.c | 3 +++ src/gbm/main/gbm.h | 9 +++++++++ 2 files changed, 12 insertions(+) (limited to 'src/gbm/main') diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c index 38480ca966c..ceeed5082e9 100644 --- a/src/gbm/main/gbm.c +++ b/src/gbm/main/gbm.c @@ -271,6 +271,9 @@ gbm_bo_get_bpp(struct gbm_bo *bo) case GBM_FORMAT_RGBA1010102: case GBM_FORMAT_BGRA1010102: return 32; + case GBM_FORMAT_XBGR16161616F: + case GBM_FORMAT_ABGR16161616F: + return 64; } } diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h index 9b5288710a5..4c6ab377699 100644 --- a/src/gbm/main/gbm.h +++ b/src/gbm/main/gbm.h @@ -150,6 +150,15 @@ enum gbm_bo_format { #define GBM_FORMAT_RGBA1010102 __gbm_fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */ #define GBM_FORMAT_BGRA1010102 __gbm_fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */ +/* + * Floating point 64bpp RGB + * IEEE 754-2008 binary16 half-precision float + * [15:0] sign:exponent:mantissa 1:5:10 + */ +#define GBM_FORMAT_XBGR16161616F __gbm_fourcc_code('X', 'B', '4', 'H') /* [63:0] x:B:G:R 16:16:16:16 little endian */ + +#define GBM_FORMAT_ABGR16161616F __gbm_fourcc_code('A', 'B', '4', 'H') /* [63:0] A:B:G:R 16:16:16:16 little endian */ + /* packed YCbCr */ #define GBM_FORMAT_YUYV __gbm_fourcc_code('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */ #define GBM_FORMAT_YVYU __gbm_fourcc_code('Y', 'V', 'Y', 'U') /* [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian */ -- cgit v1.2.3