Mesa (master): glsl: Use properly typed arguments for bitfieldInsert.

Matt Turner mattst88 at kemper.freedesktop.org
Sat Apr 26 02:22:37 UTC 2014


Module: Mesa
Branch: master
Commit: 18993f78920b89234b8a7a96f04bb51892f299f3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=18993f78920b89234b8a7a96f04bb51892f299f3

Author: Matt Turner <mattst88 at gmail.com>
Date:   Fri Apr 25 12:22:22 2014 -0700

glsl: Use properly typed arguments for bitfieldInsert.

bitfieldInsert takes scalar integers for its last two arguments. Since
bitfieldInsert is lowered on i965 to two instructions that have more
flexible arguments, I didn't notice when I wrote this.

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

---

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

diff --git a/src/glsl/lower_instructions.cpp b/src/glsl/lower_instructions.cpp
index 01ea0f0..49316d0 100644
--- a/src/glsl/lower_instructions.cpp
+++ b/src/glsl/lower_instructions.cpp
@@ -359,8 +359,8 @@ lower_instructions_visitor::ldexp_to_arith(ir_expression *ir)
 
    ir_constant *sign_mask = new(ir) ir_constant(0x80000000u, vec_elem);
 
-   ir_constant *exp_shift = new(ir) ir_constant(23u, vec_elem);
-   ir_constant *exp_width = new(ir) ir_constant(8u, vec_elem);
+   ir_constant *exp_shift = new(ir) ir_constant(23);
+   ir_constant *exp_width = new(ir) ir_constant(8);
 
    /* Temporary variables */
    ir_variable *x = new(ir) ir_variable(ir->type, "x", ir_var_temporary);




More information about the mesa-commit mailing list