[Mesa-dev] [PATCH 1/5] mesa: remove unused macros from colormac.h
Brian Paul
brianp at vmware.com
Wed Apr 1 11:05:23 PDT 2015
Thanks. BTW, there's more #includes of colormac.h in the DRI drivers
that could probably be removed, but I don't have time to do that and
test them right now.
-Brian
On 04/01/2015 11:51 AM, Mark Janes wrote:
> Series Reviewed-by: Mark Janes <mark.a.janes at intel.com>
>
> Brian Paul <brianp at vmware.com> writes:
>
>> ---
>> src/mesa/main/colormac.h | 45 ---------------------------------------------
>> 1 file changed, 45 deletions(-)
>>
>> diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h
>> index bc69f46..33ca5af 100644
>> --- a/src/mesa/main/colormac.h
>> +++ b/src/mesa/main/colormac.h
>> @@ -52,70 +52,25 @@ _mesa_unclamped_float_rgba_to_ubyte(GLubyte dst[4], const GLfloat src[4])
>>
>> /**
>> * \name Generic color packing macros. All inputs should be GLubytes.
>> - *
>> - * \todo We may move these into texstore.h at some point.
>> */
>> /*@{*/
>>
>> #define PACK_COLOR_8888( X, Y, Z, W ) \
>> (((X) << 24) | ((Y) << 16) | ((Z) << 8) | (W))
>>
>> -#define PACK_COLOR_8888_REV( X, Y, Z, W ) \
>> - (((W) << 24) | ((Z) << 16) | ((Y) << 8) | (X))
>> -
>> -#define PACK_COLOR_888( X, Y, Z ) \
>> - (((X) << 16) | ((Y) << 8) | (Z))
>> -
>> #define PACK_COLOR_565( X, Y, Z ) \
>> ((((X) & 0xf8) << 8) | (((Y) & 0xfc) << 3) | (((Z) & 0xf8) >> 3))
>>
>> -#define PACK_COLOR_5551( R, G, B, A ) \
>> - ((((R) & 0xf8) << 8) | (((G) & 0xf8) << 3) | (((B) & 0xf8) >> 2) | \
>> - ((A) >> 7))
>> -
>> #define PACK_COLOR_1555( A, B, G, R ) \
>> ((((B) & 0xf8) << 7) | (((G) & 0xf8) << 2) | (((R) & 0xf8) >> 3) | \
>> (((A) & 0x80) << 8))
>>
>> -#define PACK_COLOR_1555_REV( A, B, G, R ) \
>> - ((((B) & 0xf8) >> 1) | (((G) & 0xc0) >> 6) | (((G) & 0x38) << 10) | (((R) & 0xf8) << 5) | \
>> - ((A) ? 0x80 : 0))
>> -
>> -#define PACK_COLOR_2101010_UB( A, B, G, R ) \
>> - (((B) << 22) | ((G) << 12) | ((R) << 2) | \
>> - (((A) & 0xc0) << 24))
>> -
>> -#define PACK_COLOR_2101010_US( A, B, G, R ) \
>> - ((((B) >> 6) << 20) | (((G) >> 6) << 10) | ((R) >> 6) | \
>> - (((A) >> 14) << 30))
>> -
>> #define PACK_COLOR_4444( R, G, B, A ) \
>> ((((R) & 0xf0) << 8) | (((G) & 0xf0) << 4) | ((B) & 0xf0) | ((A) >> 4))
>>
>> -#define PACK_COLOR_4444_REV( R, G, B, A ) \
>> - ((((B) & 0xf0) << 8) | (((A) & 0xf0) << 4) | ((R) & 0xf0) | ((G) >> 4))
>> -
>> -#define PACK_COLOR_44( L, A ) \
>> - (((L) & 0xf0) | (((A) & 0xf0) >> 4))
>> -
>> #define PACK_COLOR_88( L, A ) \
>> (((L) << 8) | (A))
>>
>> -#define PACK_COLOR_88_REV( L, A ) \
>> - (((A) << 8) | (L))
>> -
>> -#define PACK_COLOR_1616( L, A ) \
>> - (((L) << 16) | (A))
>> -
>> -#define PACK_COLOR_1616_REV( L, A ) \
>> - (((A) << 16) | (L))
>> -
>> -#define PACK_COLOR_332( R, G, B ) \
>> - (((R) & 0xe0) | (((G) & 0xe0) >> 3) | (((B) & 0xc0) >> 6))
>> -
>> -#define PACK_COLOR_233( B, G, R ) \
>> - (((B) & 0xc0) | (((G) & 0xe0) >> 2) | (((R) & 0xe0) >> 5))
>> -
>> /*@}*/
>>
>>
>> --
>> 1.9.1
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.freedesktop.org_mailman_listinfo_mesa-2Ddev&d=AwIBAg&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=T0t4QG7chq2ZwJo6wilkFznRSFy-8uDKartPGbomVj8&m=UKnkh_mD7ugbyzrQIOD31CdCEsf_PtZ5LoLjp2Fxn9U&s=wpvlYBKP8-7q1QKK9HtKw6LwceOrUcX7AP9rszkWCxY&e=
More information about the mesa-dev
mailing list