From 5883e01032e9866d73113922f6959a8cf52ac689 Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Wed, 23 Oct 2024 16:19:33 -0500 Subject: [PATCH] vkd3d-shader/fx: Remove an unnecessary hlsl_is_numeric_type(). Constants can only be numeric. --- libs/vkd3d-shader/fx.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/libs/vkd3d-shader/fx.c b/libs/vkd3d-shader/fx.c index d901f08d..b4a7b347 100644 --- a/libs/vkd3d-shader/fx.c +++ b/libs/vkd3d-shader/fx.c @@ -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) { - 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_UINT: - case HLSL_TYPE_BOOL: - type = fx_4_numeric_base_types[data_type->e.numeric.type]; - break; - default: - type = 0; - hlsl_fixme(ctx, &ctx->location, "Unsupported numeric state value type %u.", data_type->e.numeric.type); - } + case HLSL_TYPE_FLOAT: + case HLSL_TYPE_INT: + case HLSL_TYPE_UINT: + case HLSL_TYPE_BOOL: + type = fx_4_numeric_base_types[data_type->e.numeric.type]; + break; + default: + type = 0; + hlsl_fixme(ctx, &ctx->location, "Unsupported numeric state value type %u.", data_type->e.numeric.type); } put_u32_unaligned(buffer, type);