glsl: Fix absurd whitespace conventions in the parser.
Historically, we indented grammar production rules with a single 8-space tab, but code inside of blocks used Mesa's 3-space indents. This meant when editing code, you had to use an 8-space tab for the first level of indentation, and 3-spaces after that. Unless you specifically configure your editor to understand this, it will get the indentation wrong on every single line you touch, which quickly devolves into a colossal waste of time. It's also inconsistent with every other file in the entire project. This patch removes all tabs and moves to a consistent 3-space indent. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
This commit is contained in:
@@ -1514,19 +1514,19 @@ basic_type_specifier_nonarray:
|
||||
;
|
||||
|
||||
precision_qualifier:
|
||||
HIGHP {
|
||||
HIGHP
|
||||
{
|
||||
state->check_precision_qualifiers_allowed(&@1);
|
||||
|
||||
$$ = ast_precision_high;
|
||||
}
|
||||
| MEDIUMP {
|
||||
| MEDIUMP
|
||||
{
|
||||
state->check_precision_qualifiers_allowed(&@1);
|
||||
|
||||
$$ = ast_precision_medium;
|
||||
}
|
||||
| LOWP {
|
||||
| LOWP
|
||||
{
|
||||
state->check_precision_qualifiers_allowed(&@1);
|
||||
|
||||
$$ = ast_precision_low;
|
||||
}
|
||||
;
|
||||
@@ -2092,20 +2092,17 @@ instance_name_opt:
|
||||
/* empty */
|
||||
{
|
||||
$$ = new(state) ast_interface_block(*state->default_uniform_qualifier,
|
||||
NULL,
|
||||
NULL);
|
||||
NULL, NULL);
|
||||
}
|
||||
| NEW_IDENTIFIER
|
||||
{
|
||||
$$ = new(state) ast_interface_block(*state->default_uniform_qualifier,
|
||||
$1,
|
||||
NULL);
|
||||
$1, NULL);
|
||||
}
|
||||
| NEW_IDENTIFIER '[' constant_expression ']'
|
||||
{
|
||||
$$ = new(state) ast_interface_block(*state->default_uniform_qualifier,
|
||||
$1,
|
||||
$3);
|
||||
$1, $3);
|
||||
}
|
||||
| NEW_IDENTIFIER '[' ']'
|
||||
{
|
||||
@@ -2113,8 +2110,7 @@ instance_name_opt:
|
||||
"instance block arrays must be explicitly sized\n");
|
||||
|
||||
$$ = new(state) ast_interface_block(*state->default_uniform_qualifier,
|
||||
$1,
|
||||
NULL);
|
||||
$1, NULL);
|
||||
}
|
||||
;
|
||||
|
||||
@@ -2159,8 +2155,7 @@ member_declaration:
|
||||
layout_defaults:
|
||||
layout_qualifier UNIFORM ';'
|
||||
{
|
||||
if (!state->default_uniform_qualifier->merge_qualifier(& @1, state,
|
||||
$1)) {
|
||||
if (!state->default_uniform_qualifier->merge_qualifier(& @1, state, $1)) {
|
||||
YYERROR;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user