summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_execute.h
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2006-02-27 14:41:41 +0000
committerMichal Krol <[email protected]>2006-02-27 14:41:41 +0000
commit9ac9605de156408580b81ba7e2780bd3f5372c6d (patch)
treee0dfe1127ed3b7f9674c450dea59b921e84c4dfc /src/mesa/shader/slang/slang_execute.h
parentc56f2c49a51e7ad1106c46e3e86dfe2756ef87c4 (diff)
More GLSL code:
- add x86 code generator; - add full support for uniforms in ARB_shader_objects; - add assembly instruction: global_addr; - reorganize #includes; - built-in uniforms accessed by index, rather than by name; - add some entries to x86sse rtasm; - add configurations to VC6 projects: 'Release x86' and 'Debug x86'; - #define SLANG_X86 active only on VC6 x86 builds; - introduce code export table for a shader; - remove GNU license from the noise library;
Diffstat (limited to 'src/mesa/shader/slang/slang_execute.h')
-rw-r--r--src/mesa/shader/slang/slang_execute.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_execute.h b/src/mesa/shader/slang/slang_execute.h
index a3b326f3155..588b0cac3fe 100644
--- a/src/mesa/shader/slang/slang_execute.h
+++ b/src/mesa/shader/slang/slang_execute.h
@@ -25,6 +25,8 @@
#if !defined SLANG_EXECUTE_H
#define SLANG_EXECUTE_H
+#include "slang_assemble.h"
+
#if defined __cplusplus
extern "C" {
#endif
@@ -39,6 +41,16 @@ typedef union slang_machine_slot_
#define SLANG_MACHINE_STACK_SIZE 1024
#define SLANG_MACHINE_MEMORY_SIZE (SLANG_MACHINE_GLOBAL_SIZE + SLANG_MACHINE_STACK_SIZE)
+#if defined(USE_X86_ASM) || defined(SLANG_X86)
+typedef struct
+{
+ GLvoid (* compiled_func) (struct slang_machine_ *);
+ GLuint esp_restore;
+ GLshort fpucntl_rnd_neg;
+ GLshort fpucntl_restore;
+} slang_machine_x86;
+#endif
+
typedef struct slang_machine_
{
GLuint ip; /* instruction pointer, for flow control */
@@ -47,8 +59,14 @@ typedef struct slang_machine_
GLuint kill; /* discard the fragment */
GLuint exit; /* terminate the shader */
slang_machine_slot mem[SLANG_MACHINE_MEMORY_SIZE];
+#if defined(USE_X86_ASM) || defined(SLANG_X86)
+ slang_machine_x86 x86;
+#endif
} slang_machine;
+GLvoid slang_machine_ctr (slang_machine *);
+GLvoid slang_machine_dtr (slang_machine *);
+
void slang_machine_init (slang_machine *);
int _slang_execute (const slang_assembly_file *);