summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_parse.y
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-07-22 16:21:54 -0700
committerIan Romanick <ian.d.romanick@intel.com>2009-07-22 16:21:54 -0700
commit0db5ef074169589bc4d665094147aa284a5496d7 (patch)
tree50533fdd340ad7e62209a7c4669c3c9268a30b30 /src/mesa/shader/program_parse.y
parent28b13038d84db1c4e1e56e15d310b30ddffcb7bd (diff)
parser: Track a few more frag prog related values
Diffstat (limited to 'src/mesa/shader/program_parse.y')
-rw-r--r--src/mesa/shader/program_parse.y11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index a0bec96924..95d6c0ea31 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -302,7 +302,15 @@ statement: instruction ';'
;
instruction: ALU_instruction
+ {
+ $$ = $1;
+ state->prog->NumAluInstructions++;
+ }
| TexInstruction
+ {
+ $$ = $1;
+ state->prog->NumTexInstructions++;
+ }
;
ALU_instruction: ARL_instruction
@@ -368,6 +376,8 @@ SAMPLE_instruction: SAMPLE_OP maskedDstReg ',' swizzleSrcReg ',' texImageUnit ',
$$->Base.SaturateMode = $1.SaturateMode;
$$->Base.TexSrcUnit = $6;
$$->Base.TexSrcTarget = $8;
+
+ state->prog->TexturesUsed[$6] |= (1U << $8);
}
}
;
@@ -375,6 +385,7 @@ SAMPLE_instruction: SAMPLE_OP maskedDstReg ',' swizzleSrcReg ',' texImageUnit ',
KIL_instruction: KIL swizzleSrcReg
{
$$ = asm_instruction_ctor(OPCODE_KIL, NULL, & $2, NULL, NULL);
+ state->fragment.UsesKill = 1;
}
;