extern "C" {\r
#endif\r
\r
+typedef union slang_machine_slot_\r
+{\r
+ GLfloat _float;\r
+ GLuint _addr;\r
+} slang_machine_slot;\r
+\r
+#define SLANG_MACHINE_GLOBAL_SIZE 3072\r
#define SLANG_MACHINE_STACK_SIZE 1024\r
+#define SLANG_MACHINE_MEMORY_SIZE (SLANG_MACHINE_GLOBAL_SIZE + SLANG_MACHINE_STACK_SIZE)\r
\r
typedef struct slang_machine_\r
{\r
GLuint bp; /* base pointer, for local variable access */\r
GLuint kill; /* discard the fragment */\r
GLuint exit; /* terminate the shader */\r
- union stack_\r
- {\r
- GLfloat _float[SLANG_MACHINE_STACK_SIZE];\r
- GLfloat *_floatp[SLANG_MACHINE_STACK_SIZE];\r
- GLuint _addr[SLANG_MACHINE_STACK_SIZE];\r
- GLuint *_addrp[SLANG_MACHINE_STACK_SIZE];\r
- } stack;\r
+ slang_machine_slot mem[SLANG_MACHINE_MEMORY_SIZE];\r
+ slang_machine_slot *global;\r
+ slang_machine_slot *stack;\r
} slang_machine;\r
\r
int _slang_execute (const slang_assembly_file *);\r