i965/fs: Make emit_mcs_fetch() not use ir_texture.
authorConnor Abbott <connor.abbott@intel.com>
Fri, 1 Aug 2014 21:46:31 +0000 (14:46 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 16 Oct 2014 00:04:54 +0000 (17:04 -0700)
Our new IR won't have ir_texture objects.

Signed-off-by: Connor Abbott <connor.abbott@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp

index f127b3ad0b7aff0ece51b08e32c010bccdf27727..137f036a312768d646738a1de6a4fd3107075c94 100644 (file)
@@ -481,7 +481,7 @@ public:
                               fs_reg shadow_comp, fs_reg lod, fs_reg lod2,
                               fs_reg sample_index, fs_reg mcs, fs_reg sampler,
                               fs_reg offset_value);
-   fs_reg emit_mcs_fetch(ir_texture *ir, fs_reg coordinate, fs_reg sampler);
+   fs_reg emit_mcs_fetch(fs_reg coordinate, int components, fs_reg sampler);
    void emit_gen6_gather_wa(uint8_t wa, fs_reg dst);
    fs_reg fix_math_operand(fs_reg src);
    fs_inst *emit_math(enum opcode op, fs_reg dst, fs_reg src0);
index 7ced1239c970b2b8f1ff6f1b9021ddf369c21ff9..c1ad969a5ac3b95b36e7e49db1711a026f1e82a2 100644 (file)
@@ -1808,10 +1808,9 @@ fs_visitor::rescale_texcoord(ir_texture *ir, fs_reg coordinate,
 
 /* Sample from the MCS surface attached to this multisample texture. */
 fs_reg
-fs_visitor::emit_mcs_fetch(ir_texture *ir, fs_reg coordinate, fs_reg sampler)
+fs_visitor::emit_mcs_fetch(fs_reg coordinate, int components, fs_reg sampler)
 {
    int reg_width = dispatch_width / 8;
-   int components = ir->coordinate->type->vector_elements;
    fs_reg payload = fs_reg(GRF, virtual_grf_alloc(components * reg_width),
                            BRW_REGISTER_TYPE_F);
    fs_reg dest = fs_reg(this, glsl_type::uvec4_type);
@@ -1982,7 +1981,8 @@ fs_visitor::visit(ir_texture *ir)
       sample_index = this->result;
 
       if (brw->gen >= 7 && tex->compressed_multisample_layout_mask & (1<<sampler))
-         mcs = emit_mcs_fetch(ir, coordinate, sampler_reg);
+         mcs = emit_mcs_fetch(coordinate, ir->coordinate->type->vector_elements,
+                              sampler_reg);
       else
          mcs = fs_reg(0u);
       break;