mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 17:50:11 +01:00
mesa: Use a 565 format for GL_RGB and GL_UNSIGNED_SHORT_5_6_5 textures.
Found while trying to optimize an application. Not observed to help performance on i965, but should at least reduce the memory usage of such textures a bit. Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Eero Tamminen <eero.t.tamminen@intel.com>
This commit is contained in:
parent
7463d50580
commit
18bdf73556
1 changed files with 3 additions and 0 deletions
|
|
@ -117,6 +117,9 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
|
|||
if (type == GL_UNSIGNED_INT_2_10_10_10_REV) {
|
||||
RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UNORM);
|
||||
}
|
||||
if (type == GL_UNSIGNED_SHORT_5_6_5) {
|
||||
RETURN_IF_SUPPORTED(MESA_FORMAT_B5G6R5_UNORM);
|
||||
}
|
||||
/* fallthrough */
|
||||
case GL_RGB8:
|
||||
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UNORM8);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue