ir_to_mesa: Flag when we use the address reg.
authorEric Anholt <eric@anholt.net>
Tue, 27 Jul 2010 00:30:35 +0000 (17:30 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 27 Jul 2010 00:45:37 +0000 (17:45 -0700)
Hardware backends will get angry otherwise.

src/mesa/shader/ir_to_mesa.cpp

index c397838e25943bdc2f568159d7efd5847c49c1c1..89cad8a8b0f37a8d320118c294871034e24be62e 100644 (file)
@@ -2146,6 +2146,8 @@ get_mesa_program(GLcontext *ctx, struct gl_shader_program *shader_program,
         inst->function->inst = i;
       else if (mesa_inst->Opcode == OPCODE_CAL)
         mesa_inst->BranchTarget = inst->function->sig_id; /* rewritten later */
+      else if (mesa_inst->Opcode == OPCODE_ARL)
+        prog->NumAddressRegs = 1;
 
       mesa_inst++;
       i++;