On 1/6/22 11:39, Francisco Casas wrote:
switch (src->node.data_type->base_type)
{
case HLSL_TYPE_FLOAT:
case HLSL_TYPE_HALF:
u = src->value[k].f;
i = src->value[k].f;
f = src->value[k].f;
d = src->value[k].f;
break;
case HLSL_TYPE_DOUBLE:
u = src->value[k].d;
i = src->value[k].d;
f = src->value[k].d;
d = src->value[k].d;
break;
case HLSL_TYPE_INT:
u = src->value[k].i;
i = src->value[k].i;
f = src->value[k].i;
d = src->value[k].i;
break;
case HLSL_TYPE_UINT:
u = src->value[k].u;
i = src->value[k].u;
f = src->value[k].u;
d = src->value[k].u;
break;
case HLSL_TYPE_BOOL:
u = !!src->value[k].u;
i = !!src->value[k].u;
f = !!src->value[k].u;
d = !!src->value[k].u;
break;
Booleans still use the "b" member upstream.
default:
FIXME("Cast from %s to %s.\n", debug_hlsl_type(ctx, src->node.data_type),
debug_hlsl_type(ctx, tgt->node.data_type));
return 0;
}