summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_execute.h
diff options
context:
space:
mode:
authorMichal Krol <mjkrol@gmail.org>2006-01-16 12:34:16 +0000
committerMichal Krol <mjkrol@gmail.org>2006-01-16 12:34:16 +0000
commitb4f70646b472776bb4651720fa3f10393daa6703 (patch)
treeb2dc51b8ab58c8788a282a949d4e421cd27a8fb7 /src/mesa/shader/slang/slang_execute.h
parent8defce2cf1afa9933208ee001ddb8990c5d4eee0 (diff)
remove some test code;
rewrite the intermediate code executor to address 64-bit platforms and global memory; store built-in library code in a precompiled form only;
Diffstat (limited to 'src/mesa/shader/slang/slang_execute.h')
-rw-r--r--src/mesa/shader/slang/slang_execute.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mesa/shader/slang/slang_execute.h b/src/mesa/shader/slang/slang_execute.h
index 8ff1eb17c5..f911574b15 100644
--- a/src/mesa/shader/slang/slang_execute.h
+++ b/src/mesa/shader/slang/slang_execute.h
@@ -29,7 +29,15 @@
extern "C" {
#endif
+typedef union slang_machine_slot_
+{
+ GLfloat _float;
+ GLuint _addr;
+} slang_machine_slot;
+
+#define SLANG_MACHINE_GLOBAL_SIZE 3072
#define SLANG_MACHINE_STACK_SIZE 1024
+#define SLANG_MACHINE_MEMORY_SIZE (SLANG_MACHINE_GLOBAL_SIZE + SLANG_MACHINE_STACK_SIZE)
typedef struct slang_machine_
{
@@ -38,13 +46,9 @@ typedef struct slang_machine_
GLuint bp; /* base pointer, for local variable access */
GLuint kill; /* discard the fragment */
GLuint exit; /* terminate the shader */
- union stack_
- {
- GLfloat _float[SLANG_MACHINE_STACK_SIZE];
- GLfloat *_floatp[SLANG_MACHINE_STACK_SIZE];
- GLuint _addr[SLANG_MACHINE_STACK_SIZE];
- GLuint *_addrp[SLANG_MACHINE_STACK_SIZE];
- } stack;
+ slang_machine_slot mem[SLANG_MACHINE_MEMORY_SIZE];
+ slang_machine_slot *global;
+ slang_machine_slot *stack;
} slang_machine;
int _slang_execute (const slang_assembly_file *);