diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/glheader.h | 3 | ||||
-rw-r--r-- | src/mesa/main/light.c | 3 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 13 |
3 files changed, 14 insertions, 5 deletions
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h index d69c7bbb21d..5657976711e 100644 --- a/src/mesa/main/glheader.h +++ b/src/mesa/main/glheader.h @@ -157,7 +157,8 @@ #include <byteswap.h> #define CPU_TO_LE32( x ) bswap_32( x ) #else /*__linux__*/ -#define CPU_TO_LE32( x ) ( x ) /* fix me for non-Linux big-endian! */ +#include <sys/endian.h> +#define CPU_TO_LE32( x ) bswap32( x ) #endif /*__linux__*/ #define MESA_BIG_ENDIAN 1 #else diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index d4db960f1b9..a15c1f0be05 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -208,7 +208,8 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params ) if (_math_matrix_is_dirty(ctx->ModelviewMatrixStack.Top)) { _math_matrix_analyse(ctx->ModelviewMatrixStack.Top); } - TRANSFORM_NORMAL(temp, params, ctx->ModelviewMatrixStack.Top->inv); + TRANSFORM_DIRECTION(temp, params, ctx->ModelviewMatrixStack.Top->m); + NORMALIZE_3FV(temp); params = temp; break; case GL_SPOT_EXPONENT: diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 25dee52ad07..a61f970685c 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2097,6 +2097,13 @@ struct gl_query_state }; +/** Set by #pragma directives */ +struct gl_sl_pragmas +{ + GLboolean Optimize; /**< defaults on */ + GLboolean Debug; /**< defaults off */ +}; + /** * A GLSL vertex or fragment shader object. @@ -2107,12 +2114,12 @@ struct gl_shader GLuint Name; /**< AKA the handle */ GLint RefCount; /**< Reference count */ GLboolean DeletePending; - - const GLchar *Source; /**< Source code string */ GLboolean CompileStatus; + GLboolean Main; /**< shader defines main() */ + const GLchar *Source; /**< Source code string */ struct gl_program *Program; /**< Post-compile assembly code */ GLchar *InfoLog; - GLboolean Main; /**< shader defines main() */ + struct gl_sl_pragmas Pragmas; }; |