mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Get rid of hlsl_type_is_void().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
ded7b381e5
commit
12acfd9724
@@ -506,7 +506,7 @@ static struct hlsl_ir_jump *add_return(struct hlsl_ctx *ctx, struct list *instrs
|
||||
return NULL;
|
||||
list_add_after(&return_value->entry, &store->node.entry);
|
||||
}
|
||||
else if (!hlsl_type_is_void(return_type))
|
||||
else if (ctx->cur_function->return_var)
|
||||
{
|
||||
hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_RETURN, "Non-void function must return a value.");
|
||||
return NULL;
|
||||
@@ -2210,7 +2210,7 @@ func_prototype:
|
||||
"\"%s\" was previously declared here.", $3);
|
||||
YYABORT;
|
||||
}
|
||||
if (hlsl_type_is_void($2) && $7.semantic.name)
|
||||
if (hlsl_types_are_equal($2, ctx->builtin_types.Void) && $7.semantic.name)
|
||||
{
|
||||
hlsl_error(ctx, @7, VKD3D_SHADER_ERROR_HLSL_INVALID_SEMANTIC,
|
||||
"Semantics are not allowed on void functions.");
|
||||
|
||||
Reference in New Issue
Block a user