Thank you very much for looking into this. It looks good to me, but it still doesn't fix bug 34378 (tested with sauerbraten), so the second hunk shouldn't be committed yet.<br><br>Marek<br><br><div class="gmail_quote">
On Mon, Mar 7, 2011 at 11:24 AM, Thomas Hellstrom <span dir="ltr"><<a href="mailto:thellstrom@vmware.com">thellstrom@vmware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
st->user_vb[attr] was always pointing to the same user vb, regardless<br>
of the value of attr. Together with reverting the temporary workaround<br>
for bug 34378, and a fix in the svga driver, this fixes googleearth on svga.<br>
<br>
Signed-off-by: Thomas Hellstrom <<a href="mailto:thellstrom@vmware.com">thellstrom@vmware.com</a>><br>
---<br>
src/mesa/state_tracker/st_draw.c | 6 ++----<br>
1 files changed, 2 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c<br>
index d6e67b7..40afa43 100644<br>
--- a/src/mesa/state_tracker/st_draw.c<br>
+++ b/src/mesa/state_tracker/st_draw.c<br>
@@ -429,7 +429,7 @@ setup_non_interleaved_attribs(struct gl_context *ctx,<br>
vbuffer[attr].buffer_offset = 0;<br>
<br>
/* Track user vertex buffers. */<br>
- pipe_resource_reference(&st->user_vb[attr], vbuffer->buffer);<br>
+ pipe_resource_reference(&st->user_vb[attr], vbuffer[attr].buffer);<br>
st->user_vb_stride[attr] = stride;<br>
st->num_user_vbs = MAX2(st->num_user_vbs, attr+1);<br>
}<br>
@@ -632,10 +632,8 @@ st_draw_vbo(struct gl_context *ctx,<br>
struct pipe_index_buffer ibuffer;<br>
struct pipe_draw_info info;<br>
unsigned i, num_instances = 1;<br>
- GLboolean new_array = GL_TRUE;<br>
- /* Fix this (Bug 34378):<br>
GLboolean new_array =<br>
- st-><a href="http://dirty.st" target="_blank">dirty.st</a> && (st->dirty.mesa & (_NEW_ARRAY | _NEW_PROGRAM)) != 0;*/<br>
+ st-><a href="http://dirty.st" target="_blank">dirty.st</a> && (st->dirty.mesa & (_NEW_ARRAY | _NEW_PROGRAM)) != 0;<br>
<br>
/* Mesa core state should have been validated already */<br>
assert(ctx->NewState == 0x0);<br>
<font color="#888888">--<br>
1.6.2.5<br>
<br>
</font></blockquote></div><br>