diff options
author | Jason Ekstrand <[email protected]> | 2015-10-09 11:24:35 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-04-26 19:55:04 -0700 |
commit | acc2f1fe361af87ce4d50b7e2b58e0da093477e1 (patch) | |
tree | 35223448e16cad9556822ffa56a7f36c5186df84 /src/mesa | |
parent | c7a09c057162ed0b7e9e039470c76bb79518876c (diff) |
i965/fs: Use inst->regs_written for rlen for texture instructions
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 11 |
2 files changed, 3 insertions, 9 deletions
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, |