spirv: create float8 types

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:44:18 +02:00 committed by Marge Bot
parent e19ccb00f2
commit 55b2f4958f

View file

@ -1933,6 +1933,18 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
val->type->type = glsl_bfloatN_t_type(bit_size);
break;
case SpvFPEncodingFloat8E4M3EXT:
vtn_fail_if(bit_size != 8,
"Invalid E4M3 bit size: %u", bit_size);
val->type->type = glsl_e4m3fn_t_type();
break;
case SpvFPEncodingFloat8E5M2EXT:
vtn_fail_if(bit_size != 8,
"Invalid E5M2 bit size: %u", bit_size);
val->type->type = glsl_e5m2_t_type();
break;
default:
vtn_fail("Unsupported OpTypeFloat encoding: %d", encoding);
}