mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Move sampler_dim_count() to hlsl.h.
Signed-off-by: Francisco Casas <fcasas@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
f5f9cddda2
commit
ce2454db6d
@@ -668,6 +668,23 @@ 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 unsigned int hlsl_sampler_dim_count(enum hlsl_sampler_dim dim)
|
||||
{
|
||||
switch (dim)
|
||||
{
|
||||
case HLSL_SAMPLER_DIM_1D:
|
||||
return 1;
|
||||
case HLSL_SAMPLER_DIM_2D:
|
||||
return 2;
|
||||
case HLSL_SAMPLER_DIM_3D:
|
||||
case HLSL_SAMPLER_DIM_CUBE:
|
||||
return 3;
|
||||
default:
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
const char *debug_hlsl_expr_op(enum hlsl_ir_expr_op op);
|
||||
const char *debug_hlsl_type(struct hlsl_ctx *ctx, const struct hlsl_type *type);
|
||||
const char *debug_hlsl_writemask(unsigned int writemask);
|
||||
|
||||
Reference in New Issue
Block a user