X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fshader%2Fslang%2Fslang_execute.h;h=f911574b1592156ef232d9fdbfa13fab8c1a061a;hb=b4f70646b472776bb4651720fa3f10393daa6703;hp=8ff1eb17c56de7d19a4b9521c54bccaa55e34904;hpb=8defce2cf1afa9933208ee001ddb8990c5d4eee0;p=mesa.git diff --git a/src/mesa/shader/slang/slang_execute.h b/src/mesa/shader/slang/slang_execute.h index 8ff1eb17c56..f911574b159 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 *);