compiler: add float8 glsl types

e4m3fn: 8bit floating point format with 4bit exponent, 3bit mantissa
        and no infinities (finite only)
e5m2:   8bit floating point format with 5bit exponent, 2bit mantissa
        and with infinities.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
This commit is contained in:
Georg Lehmann
2025-04-09 13:36:15 +02:00
committed by Marge Bot
parent 28f7bb2418
commit 9da23499ff
12 changed files with 70 additions and 0 deletions
+2
View File
@@ -77,6 +77,8 @@ elk_type_for_base_type(const struct glsl_type *type)
case GLSL_TYPE_ERROR:
case GLSL_TYPE_COOPERATIVE_MATRIX:
case GLSL_TYPE_BFLOAT16:
case GLSL_TYPE_FLOAT_E4M3FN:
case GLSL_TYPE_FLOAT_E5M2:
unreachable("not reached");
}
@@ -575,6 +575,8 @@ elk_type_size_xvec4(const struct glsl_type *type, bool as_vec4, bool bindless)
case GLSL_TYPE_FLOAT:
case GLSL_TYPE_FLOAT16:
case GLSL_TYPE_BFLOAT16:
case GLSL_TYPE_FLOAT_E4M3FN:
case GLSL_TYPE_FLOAT_E5M2:
case GLSL_TYPE_BOOL:
case GLSL_TYPE_DOUBLE:
case GLSL_TYPE_UINT16: