X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Ftexcompress_fxt1.c;h=19df6baf371984d1fefef37f2d1d0704a75888c6;hb=a96e946d25d4518d1c73c5d9d0f3d147f42bc416;hp=ae339e11d3943735eb046ab6585a50921958bbd7;hpb=bd016a2601a741799bc76734deae0cb9ebcb2b8f;p=mesa.git diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c index ae339e11d39..19df6baf371 100644 --- a/src/mesa/main/texcompress_fxt1.c +++ b/src/mesa/main/texcompress_fxt1.c @@ -29,6 +29,7 @@ */ +#include "errors.h" #include "glheader.h" #include "imports.h" #include "image.h" @@ -37,6 +38,7 @@ #include "texcompress.h" #include "texcompress_fxt1.h" #include "texstore.h" +#include "mtypes.h" static void @@ -177,8 +179,8 @@ _mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS) #define LL_RMS_D 10 /* fault tolerance (maximum delta) */ #define LL_RMS_E 255 /* fault tolerance (maximum error) */ #define ALPHA_TS 2 /* alpha threshold: (255 - ALPHA_TS) deemed opaque */ -#define ISTBLACK(v) (*((GLuint *)(v)) == 0) - +static const GLuint zero = 0; +#define ISTBLACK(v) (memcmp(&(v), &zero, sizeof(zero)) == 0) /* * Define a 64-bit unsigned integer type and macros