From 4a1bd916e79659abfa9dfdcf013eaff2daa66c29 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 11 May 2010 16:20:21 -0700 Subject: [PATCH] ir_to_mesa: Fix up array indexing. The grammar for array_reference_vec4_vec4 was set up wrong, so we weren't generating instructions if necessary for the array index. --- mesa_codegen.brg | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mesa_codegen.brg b/mesa_codegen.brg index 109e8b2d513..a0ab7c86305 100644 --- a/mesa_codegen.brg +++ b/mesa_codegen.brg @@ -96,7 +96,7 @@ vec4: reference_vec4 0 # A reference of a variable is just a vec4 register location, # so it can be used as an argument for pretty much anything. -vec4: array_reference_vec4_vec4 1 +vec4: array_reference_vec4_vec4(vec4, vec4) 1 { ir_to_mesa_dst_reg address_reg = {PROGRAM_ADDRESS, 0, WRITEMASK_X}; @@ -245,11 +245,6 @@ vec4: log2_vec4(vec4) 1 tree->left->src_reg); } -vec4: trunc_vec4(vec4) 1 -{ - ir_to_mesa_emit_scalar_op1(tree, OPCODE_TRUNC, - tree->dst_reg, - tree->left->src_reg); -} +vec4: trunc_vec4(vec4) 1 { ir_to_mesa_emit_op1(tree, OPCODE_TRUNC); } %% -- 2.30.2