Mesa (glsl2): ir_to_mesa: Actually allocate the right size for constant matrix temps.

Eric Anholt anholt at kemper.freedesktop.org
Tue Jul 27 02:43:53 UTC 2010


Module: Mesa
Branch: glsl2
Commit: c91809e1e4a4fa8884e6588159368ea32431ee0e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c91809e1e4a4fa8884e6588159368ea32431ee0e

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jul 26 19:41:23 2010 -0700

ir_to_mesa: Actually allocate the right size for constant matrix temps.

---

 src/mesa/program/ir_to_mesa.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 20228e0..6eceddf 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -1412,7 +1412,7 @@ ir_to_mesa_visitor::visit(ir_constant *ir)
    }
 
    if (ir->type->is_matrix()) {
-      ir_to_mesa_src_reg mat = get_temp(glsl_type::vec4_type);
+      ir_to_mesa_src_reg mat = get_temp(ir->type);
       ir_to_mesa_dst_reg mat_column = ir_to_mesa_dst_reg_from_src(mat);
 
       for (i = 0; i < ir->type->matrix_columns; i++) {




More information about the mesa-commit mailing list