summaryrefslogtreecommitdiffstats
path: root/mesa_codegen.brg
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-05-05 17:21:18 -0700
committerEric Anholt <[email protected]>2010-06-24 15:05:19 -0700
commit12f654c63bc42d353e258cde989d9114cdde26c6 (patch)
treeda31dee2fa16ecc8a579e977cb105d7dc2fd4ed3 /mesa_codegen.brg
parentb2ed4dd7b0270e469302965269007292117d02e2 (diff)
ir_to_mesa: Produce multiple scalar ops when required to produce vec4s.
Fixes the code emitted in a test shader for vec2 texcoord / vec2 tex_size.
Diffstat (limited to 'mesa_codegen.brg')
-rw-r--r--mesa_codegen.brg14
1 files changed, 6 insertions, 8 deletions
diff --git a/mesa_codegen.brg b/mesa_codegen.brg
index f1f24dab84f..3191a44c210 100644
--- a/mesa_codegen.brg
+++ b/mesa_codegen.brg
@@ -184,10 +184,9 @@ vec4: dp2_vec4_vec4(vec4, vec4) 1
vec4: div_vec4_vec4(vec4, vec4) 1
{
- /* FINISHME: Mesa RCP only uses the X channel, this node is for vec4. */
- ir_to_mesa_emit_op1(tree, OPCODE_RCP,
- ir_to_mesa_dst_reg_from_src(tree->src_reg),
- tree->right->src_reg);
+ ir_to_mesa_emit_scalar_op1(tree, OPCODE_RCP,
+ ir_to_mesa_dst_reg_from_src(tree->src_reg),
+ tree->left->src_reg);
ir_to_mesa_emit_op2(tree, OPCODE_MUL,
ir_to_mesa_dst_reg_from_src(tree->src_reg),
@@ -197,10 +196,9 @@ vec4: div_vec4_vec4(vec4, vec4) 1
vec4: sqrt_vec4(vec4) 1
{
- /* FINISHME: Mesa RSQ only uses the X channel, this node is for vec4. */
- ir_to_mesa_emit_op1(tree, OPCODE_RSQ,
- ir_to_mesa_dst_reg_from_src(tree->src_reg),
- tree->left->src_reg);
+ ir_to_mesa_emit_scalar_op1(tree, OPCODE_RSQ,
+ ir_to_mesa_dst_reg_from_src(tree->src_reg),
+ tree->left->src_reg);
ir_to_mesa_emit_op1(tree, OPCODE_RCP,
ir_to_mesa_dst_reg_from_src(tree->src_reg),