On 03/20/2013 05:36 PM, Eric Anholt wrote:
I think this makes it much more obvious what's going on here.

NOTE: This is a candidate for the 9.1 branch.
---
  src/mesa/drivers/dri/i965/brw_fs_visitor.cpp |    9 ++++-----
  1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp 
b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 6b6af8d..48c6df3 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -916,11 +916,10 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, 
fs_reg coordinate,
         * this weirdness around to the expected layout.
         */
        orig_dst = dst;
-      const glsl_type *vec_type =
-        glsl_type::get_instance(ir->type->base_type, 4, 1);
-      dst = fs_reg(this, glsl_type::get_array_instance(vec_type, 2));
-      dst.type = intel->is_g4x ? brw_type_for_base_type(ir->type)
-                              : BRW_REGISTER_TYPE_F;
+      dst = fs_reg(GRF, virtual_grf_alloc(8),
+                   (intel->is_g4x ?
+                    brw_type_for_base_type(ir->type) :
+                    BRW_REGISTER_TYPE_F));
     }

     fs_inst *inst = NULL;

I don't know, I think it's fine the old way. But if you like this better, that's fine...it looks okay too.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to