Track separate precision defaults for each kind of sampler, give initial defaults as per spec. Also make fragment floats have no default. Modify/add tests to adapt to these changes.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22066 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
c59d0cd9e6
commit
41a36bbb2f
13 changed files with 91 additions and 34 deletions
|
|
@ -1484,6 +1484,7 @@ fully_specified_type
|
|||
$2.arraySizes = 0;
|
||||
|
||||
parseContext.mergeQualifiers($2.line, $2, $1, true);
|
||||
parseContext.precisionQualifierCheck($2.line, $2);
|
||||
|
||||
$$ = $2;
|
||||
|
||||
|
|
@ -1724,11 +1725,11 @@ type_name_list
|
|||
type_specifier
|
||||
: type_specifier_nonarray {
|
||||
$$ = $1;
|
||||
$$.qualifier.precision = parseContext.defaultPrecision[$$.basicType];
|
||||
$$.qualifier.precision = parseContext.getDefaultPrecision($$);
|
||||
}
|
||||
| type_specifier_nonarray array_specifier {
|
||||
$$ = $1;
|
||||
$$.qualifier.precision = parseContext.defaultPrecision[$$.basicType];
|
||||
$$.qualifier.precision = parseContext.getDefaultPrecision($$);
|
||||
$$.arraySizes = $2.arraySizes;
|
||||
}
|
||||
;
|
||||
|
|
@ -2466,6 +2467,7 @@ struct_declaration
|
|||
$$ = $2;
|
||||
|
||||
parseContext.voidErrorCheck($1.line, (*$2)[0].type->getFieldName(), $1);
|
||||
parseContext.precisionQualifierCheck($1.line, $1);
|
||||
|
||||
for (unsigned int i = 0; i < $$->size(); ++i)
|
||||
(*$$)[i].type->mergeType($1);
|
||||
|
|
@ -2482,6 +2484,7 @@ struct_declaration
|
|||
|
||||
parseContext.voidErrorCheck($2.line, (*$3)[0].type->getFieldName(), $2);
|
||||
parseContext.mergeQualifiers($2.line, $2, $1, true);
|
||||
parseContext.precisionQualifierCheck($2.line, $2);
|
||||
|
||||
for (unsigned int i = 0; i < $$->size(); ++i)
|
||||
(*$$)[i].type->mergeType($2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue