vkd3d-shader/fx: Remove an unnecessary hlsl_is_numeric_type().

Constants can only be numeric.
This commit is contained in:
Elizabeth Figura 2024-10-23 16:19:33 -05:00 committed by Henri Verbeet
parent a595b96f62
commit 5883e01032
Notes: Henri Verbeet 2024-10-28 18:14:14 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1227

View File

@ -1568,20 +1568,17 @@ static uint32_t write_fx_4_state_numeric_value(struct hlsl_ir_constant *value, s
for (i = 0; i < count; ++i) for (i = 0; i < count; ++i)
{ {
if (hlsl_is_numeric_type(data_type)) switch (data_type->e.numeric.type)
{ {
switch (data_type->e.numeric.type) case HLSL_TYPE_FLOAT:
{ case HLSL_TYPE_INT:
case HLSL_TYPE_FLOAT: case HLSL_TYPE_UINT:
case HLSL_TYPE_INT: case HLSL_TYPE_BOOL:
case HLSL_TYPE_UINT: type = fx_4_numeric_base_types[data_type->e.numeric.type];
case HLSL_TYPE_BOOL: break;
type = fx_4_numeric_base_types[data_type->e.numeric.type]; default:
break; type = 0;
default: hlsl_fixme(ctx, &ctx->location, "Unsupported numeric state value type %u.", data_type->e.numeric.type);
type = 0;
hlsl_fixme(ctx, &ctx->location, "Unsupported numeric state value type %u.", data_type->e.numeric.type);
}
} }
put_u32_unaligned(buffer, type); put_u32_unaligned(buffer, type);