[Mesa-dev] [PATCH 13/23] glformats: support _mesa_bytes_per_pixel for 2101010+GL_RGB
Matt Turner
mattst88 at gmail.com
Wed Jan 9 11:19:43 PST 2013
On Wed, Jan 9, 2013 at 10:57 AM, Eric Anholt <eric at anholt.net> wrote:
> Jordan Justen <jordan.l.justen at intel.com> writes:
>
>> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
>> ---
>> src/mesa/main/glformats.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
>> index 6505c27..28bbddf 100644
>> --- a/src/mesa/main/glformats.c
>> +++ b/src/mesa/main/glformats.c
>> @@ -271,7 +271,8 @@ _mesa_bytes_per_pixel(GLenum format, GLenum type)
>> case GL_UNSIGNED_INT_10_10_10_2:
>> case GL_UNSIGNED_INT_2_10_10_10_REV:
>> if (format == GL_RGBA || format == GL_BGRA || format == GL_ABGR_EXT ||
>> - format == GL_RGBA_INTEGER_EXT || format == GL_BGRA_INTEGER_EXT)
>> + format == GL_RGBA_INTEGER_EXT || format == GL_BGRA_INTEGER_EXT ||
>> + format == GL_RGB)
>> return sizeof(GLuint);
>
> Huh? I don't think the 2_10_10_10s are valid types for GL_RGB
> format. (looking at my gles3 spec, they're only listed for RGBA and
> RGBA_INTEGER).
Note that it's are allowed by EXT_texture_type_2_10_10_10_REV, and the
packed pixels tests only try
GL_RGB(A)+GL_UNSIGNED_INT_2_10_10_10_REV_EXT when it's available.
More information about the mesa-dev
mailing list