<div dir="ltr">On 14 August 2013 21:07, 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">For some reason, we didn't use this information even though the VS<br>
backend has computed it (albeit poorly) for ages.<br>
<br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br></blockquote><div><br></div><div>For some reason I can't get this series to apply cleanly. Can you post a branch somewhere?<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_vs_surface_state.c | 7 ++++---<br>
1 file changed, 4 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c<br>
index 2c2d713..4577e76 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c<br>
+++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c<br>
@@ -145,7 +145,8 @@ brw_vs_upload_binding_table(struct brw_context *brw)<br>
/* CACHE_NEW_VS_PROG: Skip making a binding table if we don't use textures or<br>
* pull constants.<br>
*/<br>
- if (brw->vs.prog_data->base.binding_table_size == 0) {<br>
+ const unsigned entries = brw->vs.prog_data->base.binding_table_size;<br>
+ if (entries == 0) {<br>
if (brw->vs.bind_bo_offset != 0) {<br>
brw->state.dirty.brw |= BRW_NEW_VS_BINDING_TABLE;<br>
brw->vs.bind_bo_offset = 0;<br>
@@ -157,11 +158,11 @@ brw_vs_upload_binding_table(struct brw_context *brw)<br>
* space for the binding table.<br>
*/<br>
bind = brw_state_batch(brw, AUB_TRACE_BINDING_TABLE,<br>
- sizeof(uint32_t) * BRW_MAX_VS_SURFACES,<br>
+ sizeof(uint32_t) * entries,<br>
32, &brw->vs.bind_bo_offset);<br>
<br>
/* BRW_NEW_SURFACES and BRW_NEW_VS_CONSTBUF */<br>
- for (i = 0; i < BRW_MAX_VS_SURFACES; i++) {<br>
+ for (i = 0; i < entries; i++) {<br>
bind[i] = brw->vs.surf_offset[i];<br>
}<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
1.8.3.4<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>