aboutsummaryrefslogtreecommitdiffstats
path: root/src/loader
diff options
context:
space:
mode:
authorKevin Strasser <[email protected]>2019-01-24 17:10:02 -0800
committerAdam Jackson <[email protected]>2019-08-21 18:36:57 +0000
commita427c200801d8f0b3b15f3238e0767504d5bc4c0 (patch)
tree3db39bfb20158bedd28e198efc7219bb714cf1f7 /src/loader
parent482ed4347d2c672423fcc4659cb20aee19dad7fd (diff)
dri: Add fp16 formats
Add dri formats for RGBA ordered 64 bpp IEEE 754 half precision floating point. Leverage existing offscreen render support for MESA_FORMAT_RGBA_FLOAT16 and MESA_FORMAT_RGBX_FLOAT16. 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/loader')
-rw-r--r--src/loader/loader_dri3_helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index 7ef59f0477b..6b611e18ae9 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -1120,6 +1120,9 @@ dri3_cpp_for_format(uint32_t format) {
case __DRI_IMAGE_FORMAT_SARGB8:
case __DRI_IMAGE_FORMAT_SABGR8:
return 4;
+ case __DRI_IMAGE_FORMAT_XBGR16161616F:
+ case __DRI_IMAGE_FORMAT_ABGR16161616F:
+ return 8;
case __DRI_IMAGE_FORMAT_NONE:
default:
return 0;
@@ -1178,6 +1181,8 @@ image_format_to_fourcc(int format)
case __DRI_IMAGE_FORMAT_ARGB2101010: return __DRI_IMAGE_FOURCC_ARGB2101010;
case __DRI_IMAGE_FORMAT_XBGR2101010: return __DRI_IMAGE_FOURCC_XBGR2101010;
case __DRI_IMAGE_FORMAT_ABGR2101010: return __DRI_IMAGE_FOURCC_ABGR2101010;
+ case __DRI_IMAGE_FORMAT_XBGR16161616F: return __DRI_IMAGE_FOURCC_XBGR16161616F;
+ case __DRI_IMAGE_FORMAT_ABGR16161616F: return __DRI_IMAGE_FOURCC_ABGR16161616F;
}
return 0;
}