[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Re: Swiftshader/webgl



Getting llvmpipe going on Linux is pretty easy on Ubuntu 10.10:

* Download and build LLVM 3.0
* Point your PATH to you new llvm binaries (the version of llvm that comes with Ubuntu 10.10 is a bit buggy with llvmpipe)

Download Mesa 8.0.1. Configure:
./configure --disable-dri  --disable-egl --enable-xlib-glx --with-gallium-drivers=swrast
Don't quite know why I select "swrast". It does actually build llvmpipe. Note it also statically links llvm, so no need to install llvm anywhere.

Your newly built llvmpipe driver will be in lib/gallium. Go to that directory and:
export LD_LIBRARY_PATH=${PWD}

Start Firefox, force enable webgl, and you should now have llvmpipe working (check in about:support).

Performance is ok for me (on an E8400). With layers acceleration off in many cases llvmpipe performs about on a par with my GPU (an intel 4500hd). I assume there are some big bottlenecks in terms of actually putting the renderered pixels on the screen.

glReadPixels is actually a big bottleneck even on LLVMpipe (glReadPixels in Mesa 8.0.1 does 107MPixels at most on my machine). See, https://bugs.freedesktop.org/show_bug.cgi?id=46631 and benchmark it with perf/readpixels in mesa-demos . That patch does seem to fix the problem for BGRA, but not RGBA (which is a bit odd, looking at the patch you'd expect it to be the other way round). If you apply the patch to mesa 8.0.1 and remove some checks in fast_read_rgba_pixels_memcpy you can get the same performance boost for RGBA (albeit with your colour channels mixed up).

Liam



From: John Davis <jdavis@pcprogramming.com>
To: Cedric Vivier <cvivier@mozilla.com>
Cc: "jdavis@pcprogramming.com" <jdavis@pcprogramming.com>; Benoit Jacob <bjacob@mozilla.com>; public webgl <public_webgl@khronos.org>
Sent: Tuesday, 6 March 2012, 11:53
Subject: [Public WebGL] Re: Swiftshader/webgl

No, I do not.  But if implementation hasn't even started yet, FF is way behind chrome in this respect.

On Monday, March 5, 2012, Cedric Vivier <cvivier@mozilla.com> wrote:
>
> On Tue, Mar 6, 2012 at 04:45, John Davis <jdavis@pcprogramming.com> wrote:
>> This sort of difference could put FF at a serious disadvantage.
>
> Do you have any data on how current LLVMpipe performs compared to SwiftShader?
>
> Regards,
>
> -----------------------------------------------------------
> You are currently subscribed to public_webgl@khronos.org.
> To unsubscribe, send an email to majordomo@khronos.org with
> the following command in the body of your email:
> unsubscribe public_webgl
> -----------------------------------------------------------
>
>
>