vkd3d-shader/hlsl: Move the "base_type" member to the class-specific union.

This commit is contained in:
Zebediah Figura
2024-02-27 17:30:51 -06:00
committed by Alexandre Julliard
parent 4fd3f46109
commit 2480eec98b
Notes: Alexandre Julliard 2024-05-06 22:37:26 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/831
8 changed files with 218 additions and 212 deletions

View File

@@ -326,16 +326,16 @@ static uint32_t get_fx_4_numeric_type_description(const struct hlsl_type *type,
return 0;
}
switch (type->base_type)
switch (type->e.numeric.type)
{
case HLSL_TYPE_FLOAT:
case HLSL_TYPE_INT:
case HLSL_TYPE_UINT:
case HLSL_TYPE_BOOL:
value |= (numeric_base_type[type->base_type] << NUMERIC_BASE_TYPE_SHIFT);
value |= (numeric_base_type[type->e.numeric.type] << NUMERIC_BASE_TYPE_SHIFT);
break;
default:
hlsl_fixme(ctx, &ctx->location, "Not implemented for base type %u.", type->base_type);
hlsl_fixme(ctx, &ctx->location, "Not implemented for base type %u.", type->e.numeric.type);
return 0;
}
@@ -1028,7 +1028,7 @@ static void write_fx_4_object_variable(struct hlsl_ir_var *var, struct fx_write_
default:
hlsl_fixme(ctx, &ctx->location, "Writing initializer for object type %u is not implemented.",
type->base_type);
type->e.numeric.type);
}
put_u32(buffer, 0); /* Annotations count */