<div dir="ltr">On 26 April 2013 18:20, Chris Forbes <span dir="ltr"><<a href="mailto:chrisf@ijw.co.nz" target="_blank">chrisf@ijw.co.nz</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">
This is roughly a backport of Paul's commit 0967c362.<br></blockquote><div><br></div><div>Actually commit 0967c362 is Eric's.<br><br></div><div>In any case, this patch is:<br><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>
We avoided assigning a slot in the VUE map for gl_ClipVertex, but left<br>
the bit set in outputs_written, producing horrible confusion further<br>
down the pipe.<br>
<br>
Mostly fixes rendering in source games, and probably in Freespace 2 SCP.<br>
<br>
Signed-off-by: Chris Forbes <<a href="mailto:chrisf@ijw.co.nz">chrisf@ijw.co.nz</a>><br>
---<br>
src/mesa/drivers/dri/i965/brw_vs.c | 8 +++++---<br>
1 file changed, 5 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c<br>
index 0810471..bd1ace2 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_vs.c<br>
+++ b/src/mesa/drivers/dri/i965/brw_vs.c<br>
@@ -62,9 +62,13 @@ brw_compute_vue_map(struct brw_context *brw, struct brw_vs_compile *c)<br>
{<br>
const struct intel_context *intel = &brw->intel;<br>
struct brw_vue_map *vue_map = &c->prog_data.vue_map;<br>
- GLbitfield64 outputs_written = c->prog_data.outputs_written;<br>
+ GLbitfield64 outputs_written;<br>
int i;<br>
<br>
+ if (intel->gen < 6)<br>
+ c->prog_data.outputs_written &= ~VERT_RESULT_CLIP_VERTEX;<br>
+ outputs_written = c->prog_data.outputs_written;<br>
+<br>
vue_map->num_slots = 0;<br>
for (i = 0; i < BRW_VERT_RESULT_MAX; ++i) {<br>
vue_map->vert_result_to_slot[i] = -1;<br>
@@ -150,8 +154,6 @@ brw_compute_vue_map(struct brw_context *brw, struct brw_vs_compile *c)<br>
* feedback is enabled or disabled, just go ahead and assign a slot for it.<br>
*/<br>
for (int i = 0; i < VERT_RESULT_MAX; ++i) {<br>
- if (intel->gen < 6 && i == VERT_RESULT_CLIP_VERTEX)<br>
- continue;<br>
if ((outputs_written & BITFIELD64_BIT(i)) &&<br>
vue_map->vert_result_to_slot[i] == -1) {<br>
assign_vue_slot(vue_map, i);<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.2.1<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>