glsl: add missing error check for half float varying

We should never get here currently as the parser should not even
process float16_t without half float enabled. However it seems
like a good idea to add this for completeness.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27585>
This commit is contained in:
Timothy Arceri 2024-02-13 11:02:21 +11:00 committed by Marge Bot
parent 66f36a79ef
commit 219be55807

View file

@ -4302,6 +4302,8 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
break;
case GLSL_TYPE_FLOAT16:
if (state->AMD_gpu_shader_half_float_enable)
break;
_mesa_glsl_error(loc, state, "illegal type for a varying variable");
break;
case GLSL_TYPE_UINT:
case GLSL_TYPE_INT: