summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@vmware.com>2009-01-14 23:33:41 +0000
committerAlan Hourihane <alanh@vmware.com>2009-01-14 23:33:41 +0000
commit658b1bdb1cc5f9910be910dc156a2e81ed999756 (patch)
tree98d15bcf83b662dd8c7186dd423e3d8ebbd87f1c /src/mesa/main
parente82784559e00cb534993c01309ad1832e9b3e56b (diff)
parent03188b09e071ace9d9e21ccc56c01e90c0fa8639 (diff)
Merge commit 'origin/master' into gallium-0.2
Conflicts: docs/install.html docs/relnotes-7.3.html src/mesa/shader/slang/slang_codegen.c src/mesa/shader/slang/slang_compile.c src/mesa/shader/slang/slang_emit.c src/mesa/shader/slang/slang_preprocess.c src/mesa/shader/slang/slang_preprocess.h
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;
};