Hi Dave,<br><br>I think Keith is right. It's very likely that some application will use the same slow path u_blitter uses, so it makes sense to fix it in the driver instead. I believe r300g has exactly the same problem, we just manage to hide it for u_blitter by overriding the u_blitter::draw_rectangle callback with very lightweight r300_blitter_draw_rectangle. That function 1) does not care about vertex buffers at all, 2) uses immediate mode directly with the position and coordinates (or color) passed as function parameters, and 3) draws a rectangular point sprite, which is the most efficient way to draw a quad on r300.<br>
<br>So for r600g, I see 3 options:<br>1) Overriding u_blitter::draw_rectangle and possibly implement the fastest, hw-specific path.<br>2) Instead of creating a new vertex buffer for every draw operation in u_blitter, I prefer using PIPE_TRANSFER_DISCARD, which should be equivalent and is nicer. Please see the attached patch.<br>
3) Fix it once and for all by implementing pipelined buffer transfers in r600g (and possibly in r300g too).<br><br>(3) is inevitable if we ever want to compete with fglrx.<br>I'll probably commit (2) (the attached patch). Dave, does it fix the problem for you?<br>
<br>Best regards<br>Marek<br><br><div class="gmail_quote">On Tue, Nov 23, 2010 at 5:06 AM, Dave Airlie <span dir="ltr"><<a href="mailto:airlied@gmail.com">airlied@gmail.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;">
Hi Marek,<br>
<br>
So I was looking at some perf traces from r600g, and I see a stall on<br>
the blitter quad vbuf, every clear will cause the CPU to block on the<br>
mapping of the vbuf to upload the new coords. On r300g I can see this<br>
not mattering as the immediate upload path takes care of things,<br>
however I think we should probably do something like the attached and<br>
fire and forget the vertex buffer.<br>
<font color="#888888"><br>
Dave.<br>
</font><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>
<br></blockquote></div><br>