i-rinat/freshplayerplugin

Consider using SwiftShader rather than/in addition to ANGLE for GLES fallback

Closed this issue · 2 comments

Hi. Thanks for the link.

That project looks like a drop-in replacement for libGL, libEGL, libGLESv2 and so on. So if somebody have a machine without GPU, but wants to emulate one, they can build those libraries and throw them into a program by using LD_LIBRARY_PATH trick.

SwiftShader doesn't looks like a replacement for ANGLE. As for now, ANGLE is used in freshplayerplugin to convert shaders. OpenGL|ES 2 uses ESSL (language) for shaders, which is slightly different from GLSL. I use ANGLE to convert from ESSL to GLSL. GL functions like glCopyTexImage2D() and glDrawElemets() are just reused. So they are still hardware-accelerated.

Introducing SwiftShader will require some dispatching logic, otherwise it will always use CPU for rendering. It also will grow source code size, compilation time, and resulting binary size significantly. And CPU rendering will be slow anyway.

Is there any real need for GPU emulation?