BlamKiwi / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Adding 16-bit support for GLConfigs reduces offscreen surface size #1042

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Some D3D devices can support 16-bit texture formats.  These devices will 
benefit from lower memory usage if 16-bit window surface formats can be 
supported.
ANGLE internally uses the DXGI_FORMAT_B8G8R8A8_UNORM or 
DXGI_FORMAT_R8G8B8A8_UNORM for swapchain backbuffer texture format as well as 
the offscreen intermediate buffer texture.

By adding GL_RGBA4, GL_RGB5_A1, and GL_RGB565 as supported texture formats, we 
can add 5650,4444,5551 as supported sizes for EGL_RED_SIZE, EGL_BLUE_SIZE, 
EGL_GREEN_SIZE and EGL_ALPHA_SIZE in the attributes used to create a window 
surface.

ANGLE will still create a swapchain that is DXGI_FORMAT_B8G8R8A8_UNORM or 
DXGI_FORMAT_R8G8B8A8_UNORM, but the offscreen texture can now be 16-bit, and 
thus reduces the memory usage.

Original issue reported on code.google.com by co...@microsoft.com on 11 Jun 2015 at 3:37