ARB prog parser: more detailed error message for out of bounds ADDR offsets
This commit is contained in:
@@ -806,8 +806,10 @@ addrRegRelOffset: { $$ = 0; }
|
|||||||
addrRegPosOffset: INTEGER
|
addrRegPosOffset: INTEGER
|
||||||
{
|
{
|
||||||
if (($1 < 0) || ($1 > 63)) {
|
if (($1 < 0) || ($1 > 63)) {
|
||||||
yyerror(& @1, state,
|
char s[100];
|
||||||
"relative address offset too large (positive)");
|
_mesa_snprintf(s, sizeof(s),
|
||||||
|
"relative address offset too large (%d)", $1);
|
||||||
|
yyerror(& @1, state, s);
|
||||||
YYERROR;
|
YYERROR;
|
||||||
} else {
|
} else {
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
@@ -818,8 +820,10 @@ addrRegPosOffset: INTEGER
|
|||||||
addrRegNegOffset: INTEGER
|
addrRegNegOffset: INTEGER
|
||||||
{
|
{
|
||||||
if (($1 < 0) || ($1 > 64)) {
|
if (($1 < 0) || ($1 > 64)) {
|
||||||
yyerror(& @1, state,
|
char s[100];
|
||||||
"relative address offset too large (negative)");
|
_mesa_snprintf(s, sizeof(s),
|
||||||
|
"relative address offset too large (%d)", $1);
|
||||||
|
yyerror(& @1, state, s);
|
||||||
YYERROR;
|
YYERROR;
|
||||||
} else {
|
} else {
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
|
Reference in New Issue
Block a user