<div dir="ltr">On 1 January 2013 15:12, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Only Gen4 color write setup uses the force_sechalf flag, and it only<br>
sets it on a single instruction. It also already has to get a pointer<br>
to the instruction and manually set the saturate flag, so we may as well<br>
just set force_sechalf the same way and avoid the complexity of a stack.<br></blockquote><div><br></div><div>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br></div><div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
src/mesa/drivers/dri/i965/brw_fs.cpp | 14 --------------<br>
src/mesa/drivers/dri/i965/brw_fs.h | 3 ---<br>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 +-----<br>
3 files changed, 1 insertion(+), 22 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp<br>
index ae26d07..30f7286 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp<br>
@@ -649,19 +649,6 @@ fs_visitor::pop_force_uncompressed()<br>
assert(force_uncompressed_stack >= 0);<br>
}<br>
<br>
-void<br>
-fs_visitor::push_force_sechalf()<br>
-{<br>
- force_sechalf_stack++;<br>
-}<br>
-<br>
-void<br>
-fs_visitor::pop_force_sechalf()<br>
-{<br>
- force_sechalf_stack--;<br>
- assert(force_sechalf_stack >= 0);<br>
-}<br>
-<br>
/**<br>
* Returns how many MRFs an FS opcode will write over.<br>
*<br>
@@ -2511,7 +2498,6 @@ fs_visitor::run()<br>
}<br>
}<br>
assert(force_uncompressed_stack == 0);<br>
- assert(force_sechalf_stack == 0);<br>
<br>
if (failed)<br>
return false;<br>
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h<br>
index bcf38f3..7af8d1f 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_fs.h<br>
+++ b/src/mesa/drivers/dri/i965/brw_fs.h<br>
@@ -332,8 +332,6 @@ public:<br>
<br>
void push_force_uncompressed();<br>
void pop_force_uncompressed();<br>
- void push_force_sechalf();<br>
- void pop_force_sechalf();<br>
<br>
void emit_dummy_fs();<br>
fs_reg *emit_fragcoord_interpolation(ir_variable *ir);<br>
@@ -471,7 +469,6 @@ public:<br>
const unsigned dispatch_width; /**< 8 or 16 */<br>
<br>
int force_uncompressed_stack;<br>
- int force_sechalf_stack;<br>
};<br>
<br>
/**<br>
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp<br>
index e70d6bf..815e421 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp<br>
@@ -1872,8 +1872,6 @@ fs_visitor::emit(fs_inst *inst)<br>
{<br>
if (force_uncompressed_stack > 0)<br>
inst->force_uncompressed = true;<br>
- else if (force_sechalf_stack > 0)<br>
- inst->force_sechalf = true;<br>
<br>
inst->annotation = this->current_annotation;<br>
inst->ir = this->base_ir;<br>
@@ -2078,12 +2076,11 @@ fs_visitor::emit_color_write(int target, int index, int first_color_mrf)<br>
inst->saturate = c->key.clamp_fragment_color;<br>
pop_force_uncompressed();<br>
<br>
- push_force_sechalf();<br>
color.sechalf = true;<br>
inst = emit(MOV(fs_reg(MRF, first_color_mrf + index + 4, color.type),<br>
color));<br>
+ inst->force_sechalf = true;<br>
inst->saturate = c->key.clamp_fragment_color;<br>
- pop_force_sechalf();<br>
color.sechalf = false;<br>
}<br>
}<br>
@@ -2320,7 +2317,6 @@ fs_visitor::fs_visitor(struct brw_context *brw,<br>
this->live_intervals_valid = false;<br>
<br>
this->force_uncompressed_stack = 0;<br>
- this->force_sechalf_stack = 0;<br>
<br>
memset(&this->param_size, 0, sizeof(this->param_size));<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.0.3<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>