From 0be369975fdfa79bcb702d0c13aa0a221055f61b Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 18 Mar 2011 13:44:51 +0100 Subject: mesa: initial EXT_texture_snorm support The component ordering of some formats has been been reversed to match Gallium types. --- src/mesa/main/macros.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mesa/main/macros.h') diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h index b2ec0ba9b73..86a58cc6b43 100644 --- a/src/mesa/main/macros.h +++ b/src/mesa/main/macros.h @@ -58,8 +58,7 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256]; #define BYTE_TO_FLOAT_TEX(B) ((B) == -128 ? -1.0F : (B) * (1.0F/127.0F)) /** Convert GLfloat in [-1.0,1.0] to GLbyte in [-128,127], texture/fb data */ -#define FLOAT_TO_BYTE_TEX(X) ( (GLint) (127.0F * (X)) ) - +#define FLOAT_TO_BYTE_TEX(X) CLAMP( (GLint) (127.0F * (X)), -128, 127 ) /** Convert GLushort in [0,65535] to GLfloat in [0.0,1.0] */ #define USHORT_TO_FLOAT(S) ((GLfloat) (S) * (1.0F / 65535.0F)) -- cgit v1.2.3