mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
Add glsl_type::is_array and glsl_type::is_float queries
This commit is contained in:
parent
8a24cd5cea
commit
70348543ac
1 changed files with 16 additions and 0 deletions
16
glsl_types.h
16
glsl_types.h
|
|
@ -223,6 +223,14 @@ struct glsl_type {
|
|||
return (base_type == GLSL_TYPE_UINT) || (base_type == GLSL_TYPE_INT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether or not a type is a float type
|
||||
*/
|
||||
bool is_float() const
|
||||
{
|
||||
return base_type == GLSL_TYPE_FLOAT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether or not a type is a non-array boolean type
|
||||
*/
|
||||
|
|
@ -239,6 +247,14 @@ struct glsl_type {
|
|||
return base_type == GLSL_TYPE_SAMPLER;
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether or not a type is an array
|
||||
*/
|
||||
bool is_array() const
|
||||
{
|
||||
return base_type == GLSL_TYPE_ARRAY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether or not a type is the void type singleton.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue