mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
glsl: Change default value of ast_type_specifier::precision
Change default value to ast_precision_none, which denotes the absence of a precision of a qualifier. Previously, the default value was ast_precision_high. This made it impossible to detect if a precision qualifier was present or not.
This commit is contained in:
parent
1eb0f17fa4
commit
aaa31bf8f4
2 changed files with 5 additions and 4 deletions
|
|
@ -318,7 +318,8 @@ public:
|
|||
|
||||
|
||||
enum {
|
||||
ast_precision_high = 0, /**< Default precision. */
|
||||
ast_precision_none = 0, /**< Absence of precision qualifier. */
|
||||
ast_precision_high,
|
||||
ast_precision_medium,
|
||||
ast_precision_low
|
||||
};
|
||||
|
|
@ -461,7 +462,7 @@ public:
|
|||
/** Construct a type specifier from a type name */
|
||||
ast_type_specifier(const char *name)
|
||||
: type_specifier(ast_type_name), type_name(name), structure(NULL),
|
||||
is_array(false), array_size(NULL), precision(ast_precision_high)
|
||||
is_array(false), array_size(NULL), precision(ast_precision_none)
|
||||
{
|
||||
/* empty */
|
||||
}
|
||||
|
|
@ -469,7 +470,7 @@ public:
|
|||
/** Construct a type specifier from a structure definition */
|
||||
ast_type_specifier(ast_struct_specifier *s)
|
||||
: type_specifier(ast_struct), type_name(s->name), structure(s),
|
||||
is_array(false), array_size(NULL), precision(ast_precision_high)
|
||||
is_array(false), array_size(NULL), precision(ast_precision_none)
|
||||
{
|
||||
/* empty */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ ast_type_specifier::print(void) const
|
|||
|
||||
ast_type_specifier::ast_type_specifier(int specifier)
|
||||
: type_specifier(ast_types(specifier)), type_name(NULL), structure(NULL),
|
||||
is_array(false), array_size(NULL), precision(ast_precision_high)
|
||||
is_array(false), array_size(NULL), precision(ast_precision_none)
|
||||
{
|
||||
static const char *const names[] = {
|
||||
"void",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue