mesa: fill in YCBCR cases in _mesa_format_matches_format_and_type

based on the texstore code

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
Marek Olšák 2013-01-28 21:06:11 +01:00
parent 87f94e6f80
commit 43395da55a
1 changed files with 6 additions and 1 deletions

View File

@ -3021,8 +3021,13 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
littleEndian && !swapBytes;
case MESA_FORMAT_YCBCR:
return format == GL_YCBCR_MESA &&
((type == GL_UNSIGNED_SHORT_8_8_MESA && littleEndian != swapBytes) ||
(type == GL_UNSIGNED_SHORT_8_8_REV_MESA && littleEndian == swapBytes));
case MESA_FORMAT_YCBCR_REV:
return GL_FALSE;
return format == GL_YCBCR_MESA &&
((type == GL_UNSIGNED_SHORT_8_8_MESA && littleEndian == swapBytes) ||
(type == GL_UNSIGNED_SHORT_8_8_REV_MESA && littleEndian != swapBytes));
case MESA_FORMAT_R8:
return format == GL_RED && type == GL_UNSIGNED_BYTE;