From 9ac9605de156408580b81ba7e2780bd3f5372c6d Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Mon, 27 Feb 2006 14:41:41 +0000 Subject: 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; --- src/mesa/shader/slang/slang_execute.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/mesa/shader/slang/slang_execute.h') 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 *); -- cgit v1.2.3