diff options
author | Kevin Strasser <[email protected]> | 2019-01-24 17:32:36 -0800 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2019-08-21 18:36:57 +0000 |
commit | 4861d2a3956fd7394fa2da6337a0418cbb00dc82 (patch) | |
tree | e1996e4f697f7905722c276c95340dcc285c108a /src/gbm/main | |
parent | a427c200801d8f0b3b15f3238e0767504d5bc4c0 (diff) |
gbm: Add buffer handling and visuals for fp16 formats
Define and set a new loader cap DRI_LOADER_CAP_FP16, indicating that gbm can
handle fp16 formats.
Signed-off-by: Kevin Strasser <[email protected]>
Reviewed-by: Adam Jackson <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gbm/main')
-rw-r--r-- | src/gbm/main/gbm.c | 3 | ||||
-rw-r--r-- | src/gbm/main/gbm.h | 9 |
2 files changed, 12 insertions, 0 deletions
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 */ |