OSDN Git Service

i965: Add asserts to ensure that ir_tg4 offset arrays are lowered
authorChris Forbes <chrisf@ijw.co.nz>
Thu, 10 Oct 2013 08:40:46 +0000 (21:40 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Sat, 26 Oct 2013 09:28:05 +0000 (22:28 +1300)
We don't have a message that does 4 independent offsets; a lowering
pass needs to lower it to 4 normal gather4s before reaching this
point.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

index 1d2da8c..4d41f9d 100644 (file)
@@ -1569,6 +1569,9 @@ fs_visitor::visit(ir_texture *ir)
    /* Should be lowered by do_lower_texture_projection */
    assert(!ir->projector);
 
+   /* Should be lowered */
+   assert(!ir->offset || !ir->offset->type->is_array());
+
    /* Generate code to compute all the subexpression trees.  This has to be
     * done before loading any values into MRFs for the sampler message since
     * generating these values may involve SEND messages that need the MRFs.
index 5b792e0..1854325 100644 (file)
@@ -2186,6 +2186,9 @@ vec4_visitor::visit(ir_texture *ir)
    /* Should be lowered by do_lower_texture_projection */
    assert(!ir->projector);
 
+   /* Should be lowered */
+   assert(!ir->offset || !ir->offset->type->is_array());
+
    /* Generate code to compute all the subexpression trees.  This has to be
     * done before loading any values into MRFs for the sampler message since
     * generating these values may involve SEND messages that need the MRFs.