vkd3d-shader/hlsl: Add a helper to check for a numeric type.

This commit is contained in:
Nikolay Sivov
2023-11-13 02:05:50 +01:00
committed by Alexandre Julliard
parent 76eb0adf03
commit 88caf87789
Notes: Alexandre Julliard 2023-11-15 22:59:15 +01: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/472
5 changed files with 25 additions and 20 deletions

View File

@@ -1105,6 +1105,11 @@ static inline struct hlsl_type *hlsl_get_numeric_type(const struct hlsl_ctx *ctx
return hlsl_get_matrix_type(ctx, base_type, dimx, dimy);
}
static inline bool hlsl_is_numeric_type(const struct hlsl_type *type)
{
return type->class <= HLSL_CLASS_LAST_NUMERIC;
}
static inline unsigned int hlsl_sampler_dim_count(enum hlsl_sampler_dim dim)
{
switch (dim)