From e599837fedf23ffb48a2ccee0a55e1c11140be4f Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Fri, 1 Aug 2014 14:46:31 -0700 Subject: [PATCH] i965/fs: Make emit_mcs_fetch() not use ir_texture. Our new IR won't have ir_texture objects. Signed-off-by: Connor Abbott Reviewed-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index f127b3ad0b7..137f036a312 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -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); diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 7ced1239c97..c1ad969a5ac 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -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<coordinate->type->vector_elements, + sampler_reg); else mcs = fs_reg(0u); break; -- 2.30.2