From f519a770d074dac9e188e3b450c828510506c46d Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Fri, 2 Sep 2005 01:11:53 +0000 Subject: add error checking to the GL_ATI_FRAGMENT_SHADER entrypoints. Fix bug with scope of ati fragment shader constants. Fix issues with specifying color/alpha instructions not pair-wise. Change internal representation of the shader (to better fit how the extension works, should make driver implementations simpler, and saves some memory). (still doesn't work correctly with doom3 and swrast, but not worse than before) --- src/mesa/main/mtypes.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/mesa/main/mtypes.h') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 17ef921738..a37ba7ce98 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1746,6 +1746,7 @@ enum register_file struct vp_instruction; struct fp_instruction; struct atifs_instruction; +struct atifs_setupinst; struct program_parameter_list; @@ -1806,10 +1807,18 @@ struct fragment_program struct ati_fragment_shader { struct program Base; - struct atifs_instruction *Instructions; + struct atifs_instruction *Instructions[2]; + struct atifs_setupinst *SetupInst[2]; GLfloat Constants[8][4]; - GLint NumPasses; - GLint cur_pass; + GLuint localConstDef; + GLubyte numArithInstr[2]; + GLubyte regsAssigned[2]; + GLubyte NumPasses; + GLubyte cur_pass; + GLubyte last_optype; + GLboolean interpinp1; + GLboolean isValid; + GLuint swizzlerq; }; /** @@ -1883,6 +1892,7 @@ struct gl_ati_fragment_shader_state GLboolean Enabled; GLboolean _Enabled; GLboolean Compiling; + GLfloat globalConstants[8][4]; struct atifs_machine Machine; /* machine state */ struct ati_fragment_shader *Current; }; -- cgit v1.2.3