diff options
author | Marek Olšák <[email protected]> | 2011-03-18 13:44:51 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-03-29 12:04:55 +0200 |
commit | 0be369975fdfa79bcb702d0c13aa0a221055f61b (patch) | |
tree | 4ed36637e10ea45d61ba7458a5aa593bde7a57ff /src/mesa/main/macros.h | |
parent | 47e3896dfd89a26abbe4ca2469c2480f3982b204 (diff) |
mesa: initial EXT_texture_snorm support
The component ordering of some formats has been been reversed to match
Gallium types.
Diffstat (limited to 'src/mesa/main/macros.h')
-rw-r--r-- | src/mesa/main/macros.h | 3 |
1 files changed, 1 insertions, 2 deletions
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)) |