mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
nir: Add a get_nir_type_for_glsl_base_type helper
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
a136884139
commit
9084b1db30
1 changed files with 8 additions and 2 deletions
|
|
@ -680,9 +680,9 @@ nir_alu_type_get_base_type(nir_alu_type type)
|
|||
}
|
||||
|
||||
static inline nir_alu_type
|
||||
nir_get_nir_type_for_glsl_type(const struct glsl_type *type)
|
||||
nir_get_nir_type_for_glsl_base_type(enum glsl_base_type base_type)
|
||||
{
|
||||
switch (glsl_get_base_type(type)) {
|
||||
switch (base_type) {
|
||||
case GLSL_TYPE_BOOL:
|
||||
return nir_type_bool32;
|
||||
break;
|
||||
|
|
@ -709,6 +709,12 @@ nir_get_nir_type_for_glsl_type(const struct glsl_type *type)
|
|||
}
|
||||
}
|
||||
|
||||
static inline nir_alu_type
|
||||
nir_get_nir_type_for_glsl_type(const struct glsl_type *type)
|
||||
{
|
||||
return nir_get_nir_type_for_glsl_base_type(glsl_get_base_type(type));
|
||||
}
|
||||
|
||||
nir_op nir_type_conversion_op(nir_alu_type src, nir_alu_type dst);
|
||||
|
||||
typedef enum {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue