[Mesa-dev] [PATCH 4/6] i965/fs: Use inst->regs_written for rlen for texture instructions
Kenneth Graunke
kenneth at whitecape.org
Sat Apr 23 23:39:27 UTC 2016
From: Jason Ekstrand <jason.ekstrand at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 1 +
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 5d6a107..81ec18d 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 fb9f65c..1f02e47 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,
--
2.8.0
More information about the mesa-dev
mailing list