[Mesa-dev] [PATCH 05/10] i965: Remove EOT parameter from brw_SAMPLE and brw_set_sampler_message.
Kenneth Graunke
kenneth at whitecape.org
Mon Oct 10 16:31:48 PDT 2011
The existing code asserted that eot == 0, as it doesn't make sense for
a thread to sample a texture as the last thing it does.
It doesn't make much sense to pass around a dead parameter either.
Especially for a function which already has a long parameter list.
So, remove the parameter and just set EOT to 0.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_eu.h | 1 -
src/mesa/drivers/dri/i965/brw_eu_emit.c | 14 +++++---------
src/mesa/drivers/dri/i965/brw_fs_emit.cpp | 1 -
src/mesa/drivers/dri/i965/brw_wm_emit.c | 2 --
4 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index 8b2222b..716a917 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -926,7 +926,6 @@ void brw_SAMPLE(struct brw_compile *p,
GLuint msg_type,
GLuint response_length,
GLuint msg_length,
- GLboolean eot,
GLuint header_present,
GLuint simd_mode);
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 78ddf94..28bd52f 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -676,13 +676,11 @@ static void brw_set_sampler_message(struct brw_compile *p,
GLuint msg_type,
GLuint response_length,
GLuint msg_length,
- GLboolean eot,
GLuint header_present,
GLuint simd_mode)
{
struct brw_context *brw = p->brw;
struct intel_context *intel = &brw->intel;
- assert(eot == 0);
brw_set_src1(p, insn, brw_imm_d(0));
if (intel->gen >= 7) {
@@ -693,7 +691,7 @@ static void brw_set_sampler_message(struct brw_compile *p,
insn->bits3.sampler_gen7.header_present = header_present;
insn->bits3.sampler_gen7.response_length = response_length;
insn->bits3.sampler_gen7.msg_length = msg_length;
- insn->bits3.sampler_gen7.end_of_thread = eot;
+ insn->bits3.sampler_gen7.end_of_thread = 0;
insn->header.destreg__conditionalmod = BRW_SFID_SAMPLER;
} else if (intel->gen >= 5) {
insn->bits3.sampler_gen5.binding_table_index = binding_table_index;
@@ -703,12 +701,12 @@ static void brw_set_sampler_message(struct brw_compile *p,
insn->bits3.sampler_gen5.header_present = header_present;
insn->bits3.sampler_gen5.response_length = response_length;
insn->bits3.sampler_gen5.msg_length = msg_length;
- insn->bits3.sampler_gen5.end_of_thread = eot;
+ insn->bits3.sampler_gen5.end_of_thread = 0;
if (intel->gen >= 6)
insn->header.destreg__conditionalmod = BRW_SFID_SAMPLER;
else {
insn->bits2.send_gen5.sfid = BRW_SFID_SAMPLER;
- insn->bits2.send_gen5.end_of_thread = eot;
+ insn->bits2.send_gen5.end_of_thread = 0;
}
} else if (intel->is_g4x) {
insn->bits3.sampler_g4x.binding_table_index = binding_table_index;
@@ -716,7 +714,7 @@ static void brw_set_sampler_message(struct brw_compile *p,
insn->bits3.sampler_g4x.msg_type = msg_type;
insn->bits3.sampler_g4x.response_length = response_length;
insn->bits3.sampler_g4x.msg_length = msg_length;
- insn->bits3.sampler_g4x.end_of_thread = eot;
+ insn->bits3.sampler_g4x.end_of_thread = 0;
insn->bits3.sampler_g4x.msg_target = BRW_SFID_SAMPLER;
} else {
insn->bits3.sampler.binding_table_index = binding_table_index;
@@ -725,7 +723,7 @@ static void brw_set_sampler_message(struct brw_compile *p,
insn->bits3.sampler.return_format = BRW_SAMPLER_RETURN_FORMAT_FLOAT32;
insn->bits3.sampler.response_length = response_length;
insn->bits3.sampler.msg_length = msg_length;
- insn->bits3.sampler.end_of_thread = eot;
+ insn->bits3.sampler.end_of_thread = 0;
insn->bits3.sampler.msg_target = BRW_SFID_SAMPLER;
}
}
@@ -2128,7 +2126,6 @@ void brw_SAMPLE(struct brw_compile *p,
GLuint msg_type,
GLuint response_length,
GLuint msg_length,
- GLboolean eot,
GLuint header_present,
GLuint simd_mode)
{
@@ -2223,7 +2220,6 @@ void brw_SAMPLE(struct brw_compile *p,
msg_type,
response_length,
msg_length,
- eot,
header_present,
simd_mode);
}
diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
index 4c158fe..a3c2a98 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
@@ -343,7 +343,6 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src)
msg_type,
rlen,
inst->mlen,
- 0,
inst->header_present,
simd_mode);
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c
index c20b079..e324780 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c
@@ -1161,7 +1161,6 @@ void emit_tex(struct brw_wm_compile *c,
msg_type,
response_length,
cur_mrf - 1,
- 0,
1,
simd_mode);
}
@@ -1240,7 +1239,6 @@ void emit_txb(struct brw_wm_compile *c,
msg_type,
response_length,
msgLength,
- 0,
1,
BRW_SAMPLER_SIMD_MODE_SIMD16);
}
--
1.7.7
More information about the mesa-dev
mailing list