[Mesa-dev] r300 poke magical go faster register

Marek Olšák maraeo at gmail.com
Sun Jun 20 05:48:35 PDT 2010


On Sun, Jun 20, 2010 at 2:37 PM, Tom Morton <tomm at riseup.net> wrote:

> Hi people,
>
> On the perf/vertexrate test, and on my terrain engine I see big big
> performance boosts from this patch (I have no idea what I'm doing but on
> my RV515 i see tris/sec go from 8 million to 15 million - kms only):
>
> diff --git a/src/mesa/drivers/dri/r300/r300_reg.h
> b/src/mesa/drivers/dri/r300/r300_reg.h
> index ac93563..0093eb5 100644
> --- a/src/mesa/drivers/dri/r300/r300_reg.h
> +++ b/src/mesa/drivers/dri/r300/r300_reg.h
> @@ -170,6 +170,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
>  #      define R300_VC_32BIT_SWAP               (2 << 0)
>  /* Half-dword swap: 0xAABBCCDD becomes 0xCCDDAABB */
>  #      define R300_VC_HALF_DWORD_SWAP          (3 << 0)
> +#      define R300_VC_FORCE_PREFETCH           (1 << 5)
>  /* The TCL engine will not be used (as it is logically or even
> physically removed) */
>  #      define R300_VAP_TCL_BYPASS              (1 << 8)
>  /* Read only flag if TCL engine is busy. */
> diff --git a/src/mesa/drivers/dri/r300/r300_render.c
> b/src/mesa/drivers/dri/r300/r300_render.c
> index bb8f914..5b9983f 100644
> --- a/src/mesa/drivers/dri/r300/r300_render.c
> +++ b/src/mesa/drivers/dri/r300/r300_render.c
> @@ -260,7 +260,7 @@ static void r300EmitAOS(r300ContextPtr rmesa, GLuint
> nr, GLuint offset)
>
>                BEGIN_BATCH(sz+2+(nr * 2));
>                OUT_BATCH_PACKET3(R300_PACKET3_3D_LOAD_VBPNTR, sz - 1);
> -               OUT_BATCH(nr);
> +               OUT_BATCH(nr | R300_VC_FORCE_PREFETCH);
>
>                for (i = 0; i + 1 < nr; i += 2) {
>                        OUT_BATCH((rmesa->radeon.tcl.aos[i].components
> << 0) |
>
>
>
> is this a good idea?
>

Yes, but only for non-indexed vertices.

-Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100620/9f4cd7d8/attachment.html>


More information about the mesa-dev mailing list