[Mesa-dev] [PATCH] glsl: Correctly handle vector extract on function parameter

Jordan Justen jordan.l.justen at intel.com
Thu Nov 12 00:44:58 PST 2015


This commit accidentally used a '==' when '=' was intended.

commit 96b22fb080894ba1840af2372f28a46cc0f40c76
Author: Kristian Høgsberg Kristensen <krh at bitplanet.net>
Date:   Wed Nov 4 14:58:54 2015 -0800

    glsl: Use array deref for access to vector components

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Cc: Kristian Høgsberg Kristensen <krh at bitplanet.net>
Cc: Matt Turner <mattst88 at gmail.com>
---
 Ilia's suggestion seems like what we want.

 Passed jenkins. Then again, so did the original patch.

 src/glsl/ast_function.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index 5584470..466ece6 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -368,8 +368,8 @@ fix_parameter(void *mem_ctx, ir_rvalue *actual, const glsl_type *formal_type,
 
    ir_rvalue *lhs = actual;
    if (expr != NULL && expr->operation == ir_binop_vector_extract) {
-      lhs == new(mem_ctx) ir_dereference_array(expr->operands[0]->clone(mem_ctx, NULL),
-                                               expr->operands[1]->clone(mem_ctx, NULL));
+      lhs = new(mem_ctx) ir_dereference_array(expr->operands[0]->clone(mem_ctx, NULL),
+                                              expr->operands[1]->clone(mem_ctx, NULL));
    }
 
    ir_assignment *const assignment_2 = new(mem_ctx) ir_assignment(lhs, rhs);
-- 
2.6.2



More information about the mesa-dev mailing list