summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/glheader.h3
-rw-r--r--src/mesa/main/light.c3
-rw-r--r--src/mesa/main/mtypes.h13
3 files changed, 14 insertions, 5 deletions
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index d69c7bbb21..5657976711 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 d4db960f1b..a15c1f0be0 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 25dee52ad0..a61f970685 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;
};