summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_parse.y
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-07-29 21:07:41 -0700
committerIan Romanick <ian.d.romanick@intel.com>2009-07-29 21:07:41 -0700
commit600710907c5b72cf33e0b3ca6dc7e0d2a1a8ab25 (patch)
tree37f535a25681d9606bc1b20d512a1aab7c906024 /src/mesa/shader/program_parse.y
parent48183ca8b6adfbb9555428cb8414b821fdd15717 (diff)
ARP prog parser: Implement the spec, not what makes sense
Diffstat (limited to 'src/mesa/shader/program_parse.y')
-rw-r--r--src/mesa/shader/program_parse.y27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index 65f713303b0..9a5907a4e09 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -1572,47 +1572,56 @@ paramConstUse: paramConstScalarUse | paramConstVector;
paramConstScalarDecl: signedFloatConstant
{
- $$.count = 1;
+ $$.count = 4;
$$.data[0] = $1;
+ $$.data[1] = $1;
+ $$.data[2] = $1;
+ $$.data[3] = $1;
}
;
paramConstScalarUse: REAL
{
- $$.count = 1;
+ $$.count = 4;
$$.data[0] = $1;
+ $$.data[1] = 0.0f;
+ $$.data[2] = 0.0f;
+ $$.data[3] = 1.0f;
}
| INTEGER
{
- $$.count = 1;
+ $$.count = 4;
$$.data[0] = (float) $1;
+ $$.data[1] = 0.0f;
+ $$.data[2] = 0.0f;
+ $$.data[3] = 1.0f;
}
;
paramConstVector: '{' signedFloatConstant '}'
{
- $$.count = 1;
+ $$.count = 4;
$$.data[0] = $2;
$$.data[1] = 0.0f;
$$.data[2] = 0.0f;
- $$.data[3] = 0.0f;
+ $$.data[3] = 1.0f;
}
| '{' signedFloatConstant ',' signedFloatConstant '}'
{
- $$.count = 2;
+ $$.count = 4;
$$.data[0] = $2;
$$.data[1] = $4;
$$.data[2] = 0.0f;
- $$.data[3] = 0.0f;
+ $$.data[3] = 1.0f;
}
| '{' signedFloatConstant ',' signedFloatConstant ','
signedFloatConstant '}'
{
- $$.count = 3;
+ $$.count = 4;
$$.data[0] = $2;
$$.data[1] = $4;
$$.data[2] = $6;
- $$.data[3] = 0.0f;
+ $$.data[3] = 1.0f;
}
| '{' signedFloatConstant ',' signedFloatConstant ','
signedFloatConstant ',' signedFloatConstant '}'