From: Eric Anholt Date: Tue, 11 May 2010 23:20:21 +0000 (-0700) Subject: ir_to_mesa: Fix up array indexing. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a1bd916e79659abfa9dfdcf013eaff2daa66c29;p=mesa.git 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. --- 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); } %%