Mesa (master): i965: Use glsl_type::column_type instead of open-coding it

Ian Romanick idr at kemper.freedesktop.org
Fri Oct 28 13:29:31 PDT 2011


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Oct 21 18:22:42 2011 -0700

i965: Use glsl_type::column_type instead of open-coding it

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 02ecdaf..1312c0d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -502,9 +502,7 @@ vec4_visitor::setup_uniform_values(int loc, const glsl_type *type)
    float *values = &this->vp->Base.Parameters->ParameterValues[loc][0].f;
 
    if (type->is_matrix()) {
-      const glsl_type *column = glsl_type::get_instance(GLSL_TYPE_FLOAT,
-							type->vector_elements,
-							1);
+      const glsl_type *column = type->column_type();
 
       for (unsigned int i = 0; i < type->matrix_columns; i++) {
 	 offset += setup_uniform_values(loc + offset, column);



More information about the mesa-commit mailing list