From: Jason Ekstrand Date: Fri, 9 Oct 2015 18:24:35 +0000 (-0700) Subject: i965/fs: Use inst->regs_written for rlen for texture instructions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=acc2f1fe361af87ce4d50b7e2b58e0da093477e1;p=mesa.git i965/fs: Use inst->regs_written for rlen for texture instructions Reviewed-by: Kenneth Graunke Reviewed-by: Topi Pohjolainen --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 5d6a10773b3..81ec18ddfa4 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2534,6 +2534,7 @@ fs_visitor::opt_sampler_eot() tex_inst->offset |= fb_write->target << 24; tex_inst->eot = true; tex_inst->dst = ibld.null_reg_ud(); + tex_inst->regs_written = 0; fb_write->remove(cfg->blocks[cfg->num_blocks - 1]); /* If a header is present, marking the eot is sufficient. Otherwise, we need diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 812a75eceed..8654ca4d0af 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -731,7 +731,6 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src struct brw_reg sampler_index) { int msg_type = -1; - int rlen = 4; uint32_t simd_mode; uint32_t return_format; bool is_combined_send = inst->eot; @@ -920,15 +919,9 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src assert(msg_type != -1); if (simd_mode == BRW_SAMPLER_SIMD_MODE_SIMD16) { - rlen = 8; dst = vec16(dst); } - if (is_combined_send) { - assert(devinfo->gen >= 9 || devinfo->is_cherryview); - rlen = 0; - } - assert(devinfo->gen < 7 || inst->header_size == 0 || src.file == BRW_GENERAL_REGISTER_FILE); @@ -995,7 +988,7 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src surface + base_binding_table_index, sampler % 16, msg_type, - rlen, + inst->regs_written, inst->mlen, inst->header_size != 0, simd_mode, @@ -1032,7 +1025,7 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src 0 /* surface */, 0 /* sampler */, msg_type, - rlen, + inst->regs_written, inst->mlen /* mlen */, inst->header_size != 0 /* header */, simd_mode,