mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 01:10:16 +01:00
Add is_error and is_void type queries
This commit is contained in:
parent
9e7c34b865
commit
8400bc4d35
1 changed files with 16 additions and 0 deletions
16
glsl_types.h
16
glsl_types.h
|
|
@ -166,6 +166,22 @@ struct glsl_type {
|
|||
/* GLSL only has float matrices. */
|
||||
return (matrix_rows > 0) && (base_type == GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether or not a type is the void type singleton.
|
||||
*/
|
||||
bool is_void() const
|
||||
{
|
||||
return base_type == GLSL_TYPE_VOID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether or not a type is the error type singleton.
|
||||
*/
|
||||
bool is_error() const
|
||||
{
|
||||
return base_type == GLSL_TYPE_ERROR;
|
||||
}
|
||||
};
|
||||
|
||||
struct glsl_struct_field {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue