summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/compiler/r300_fragprog_emit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/compiler/r300_fragprog_emit.c')
-rw-r--r--src/gallium/drivers/r300/compiler/r300_fragprog_emit.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/compiler/r300_fragprog_emit.c b/src/gallium/drivers/r300/compiler/r300_fragprog_emit.c
index e6fd1fd..841d46f 100644
--- a/src/gallium/drivers/r300/compiler/r300_fragprog_emit.c
+++ b/src/gallium/drivers/r300/compiler/r300_fragprog_emit.c
@@ -279,6 +279,22 @@ static int emit_alu(struct r300_emit_state * emit, struct rc_pair_instruction* i
if (inst->Nop)
code->alu.inst[ip].rgb_inst |= R300_ALU_INSERT_NOP;
+ /* Handle Output Modifier
+ * According to the r300 docs, there is no RC_OMOD_DISABLE for r300 */
+ if (inst->RGB.Omod) {
+ if (inst->RGB.Omod == RC_OMOD_DISABLE) {
+ rc_error(&c->Base, "RC_OMOD_DISABLE not supported");
+ }
+ code->alu.inst[ip].rgb_inst |=
+ (inst->RGB.Omod << R300_ALU_OUTC_MOD_SHIFT);
+ }
+ if (inst->Alpha.Omod) {
+ if (inst->Alpha.Omod == RC_OMOD_DISABLE) {
+ rc_error(&c->Base, "RC_OMOD_DISABLE not supported");
+ }
+ code->alu.inst[ip].alpha_inst |=
+ (inst->Alpha.Omod << R300_ALU_OUTC_MOD_SHIFT);
+ }
return 1;
}