From 1738b38ce8ef5fec6146225306bd70690a269afa Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 20 Jun 2019 09:18:20 -0700 Subject: [PATCH] matypes: Drop some unused defines. Most of these haven't been used since the conversion from checked-in matypes to generation. By cutting down the generated contents, this should clarify why the file is generated: we need architecture-specific offsets to the V4F fields in the asm that uses it. v2: Keep matrix offsets to prevent x86 build breakage.. Reviewed-by: Matt Turner Reviewed-by: Eric Engestrom --- src/mesa/x86/gen_matypes.c | 113 ------------------------------------- 1 file changed, 113 deletions(-) diff --git a/src/mesa/x86/gen_matypes.c b/src/mesa/x86/gen_matypes.c index 5b74c2af839..441b5c6938d 100644 --- a/src/mesa/x86/gen_matypes.c +++ b/src/mesa/x86/gen_matypes.c @@ -109,64 +109,6 @@ int main( int argc, char **argv ) printf( "#define __ASM_TYPES_H__\n" ); printf( "\n" ); - - /* struct gl_context offsets: - */ - OFFSET_HEADER( "struct gl_context" ); - - printf( "\n" ); - OFFSET( "CTX_LIGHT_ENABLED ", struct gl_context, Light.Enabled ); - OFFSET( "CTX_LIGHT_SHADE_MODEL ", struct gl_context, Light.ShadeModel ); - OFFSET( "CTX_LIGHT_COLOR_MAT_FACE ", struct gl_context, Light.ColorMaterialFace ); - OFFSET( "CTX_LIGHT_COLOR_MAT_MODE ", struct gl_context, Light.ColorMaterialMode ); - OFFSET( "CTX_LIGHT_COLOR_MAT_MASK ", struct gl_context, Light._ColorMaterialBitmask ); - OFFSET( "CTX_LIGHT_COLOR_MAT_ENABLED ", struct gl_context, Light.ColorMaterialEnabled ); - OFFSET( "CTX_LIGHT_ENABLED_LIGHTS ", struct gl_context, Light._EnabledLights ); - OFFSET( "CTX_LIGHT_NEED_VERTS ", struct gl_context, Light._NeedVertices ); - OFFSET( "CTX_LIGHT_BASE_COLOR ", struct gl_context, Light._BaseColor ); - - - /* struct vertex_buffer offsets: - */ - OFFSET_HEADER( "struct vertex_buffer" ); - - OFFSET( "VB_SIZE ", struct vertex_buffer, Size ); - OFFSET( "VB_COUNT ", struct vertex_buffer, Count ); - printf( "\n" ); - OFFSET( "VB_ELTS ", struct vertex_buffer, Elts ); - OFFSET( "VB_OBJ_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_POS] ); - OFFSET( "VB_EYE_PTR ", struct vertex_buffer, EyePtr ); - OFFSET( "VB_CLIP_PTR ", struct vertex_buffer, ClipPtr ); - OFFSET( "VB_PROJ_CLIP_PTR ", struct vertex_buffer, NdcPtr ); - OFFSET( "VB_CLIP_OR_MASK ", struct vertex_buffer, ClipOrMask ); - OFFSET( "VB_CLIP_MASK ", struct vertex_buffer, ClipMask ); - OFFSET( "VB_NORMAL_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_NORMAL] ); - OFFSET( "VB_EDGE_FLAG ", struct vertex_buffer, EdgeFlag ); - OFFSET( "VB_TEX0_COORD_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_TEX0] ); - OFFSET( "VB_TEX1_COORD_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_TEX1] ); - OFFSET( "VB_TEX2_COORD_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_TEX2] ); - OFFSET( "VB_TEX3_COORD_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_TEX3] ); - OFFSET( "VB_INDEX_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_COLOR_INDEX] ); - OFFSET( "VB_COLOR_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_COLOR0] ); - OFFSET( "VB_SECONDARY_COLOR_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_COLOR1] ); - OFFSET( "VB_FOG_COORD_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_FOG] ); - OFFSET( "VB_PRIMITIVE ", struct vertex_buffer, Primitive ); - printf( "\n" ); - - DEFINE_HEADER( "struct vertex_buffer" ); - - /* XXX use new labels here someday after vertex proram is done */ - DEFINE( "VERT_BIT_OBJ ", VERT_BIT_POS ); - DEFINE( "VERT_BIT_NORM ", VERT_BIT_NORMAL ); - DEFINE( "VERT_BIT_RGBA ", VERT_BIT_COLOR0 ); - DEFINE( "VERT_BIT_SPEC_RGB ", VERT_BIT_COLOR1 ); - DEFINE( "VERT_BIT_FOG_COORD ", VERT_BIT_FOG ); - DEFINE( "VERT_BIT_TEX0 ", VERT_BIT_TEX0 ); - DEFINE( "VERT_BIT_TEX1 ", VERT_BIT_TEX1 ); - DEFINE( "VERT_BIT_TEX2 ", VERT_BIT_TEX2 ); - DEFINE( "VERT_BIT_TEX3 ", VERT_BIT_TEX3 ); - - /* GLvector4f offsets: */ OFFSET_HEADER( "GLvector4f" ); @@ -180,10 +122,6 @@ int main( int argc, char **argv ) DEFINE_HEADER( "GLvector4f" ); - DEFINE( "VEC_MALLOC ", VEC_MALLOC ); - DEFINE( "VEC_NOT_WRITEABLE ", VEC_NOT_WRITEABLE ); - DEFINE( "VEC_BAD_STRIDE ", VEC_BAD_STRIDE ); - printf( "\n" ); DEFINE( "VEC_SIZE_1 ", VEC_SIZE_1 ); DEFINE( "VEC_SIZE_2 ", VEC_SIZE_2 ); DEFINE( "VEC_SIZE_3 ", VEC_SIZE_3 ); @@ -200,57 +138,6 @@ int main( int argc, char **argv ) OFFSET( "MATRIX_TYPE ", GLmatrix, type ); - /* struct gl_light offsets: - */ - OFFSET_HEADER( "struct gl_light" ); - - printf( "\n" ); - OFFSET( "LIGHT_AMBIENT ", struct gl_light, Ambient ); - OFFSET( "LIGHT_DIFFUSE ", struct gl_light, Diffuse ); - OFFSET( "LIGHT_SPECULAR ", struct gl_light, Specular ); - OFFSET( "LIGHT_EYE_POSITION ", struct gl_light, EyePosition ); - OFFSET( "LIGHT_SPOT_DIRECTION ", struct gl_light, SpotDirection ); - OFFSET( "LIGHT_SPOT_EXPONENT ", struct gl_light, SpotExponent ); - OFFSET( "LIGHT_SPOT_CUTOFF ", struct gl_light, SpotCutoff ); - OFFSET( "LIGHT_COS_CUTOFF ", struct gl_light, _CosCutoff ); - OFFSET( "LIGHT_CONST_ATTEN ", struct gl_light, ConstantAttenuation ); - OFFSET( "LIGHT_LINEAR_ATTEN ", struct gl_light, LinearAttenuation ); - OFFSET( "LIGHT_QUADRATIC_ATTEN ", struct gl_light, QuadraticAttenuation ); - OFFSET( "LIGHT_ENABLED ", struct gl_light, Enabled ); - printf( "\n" ); - OFFSET( "LIGHT_FLAGS ", struct gl_light, _Flags ); - printf( "\n" ); - OFFSET( "LIGHT_POSITION ", struct gl_light, _Position ); - OFFSET( "LIGHT_VP_INF_NORM ", struct gl_light, _VP_inf_norm ); - OFFSET( "LIGHT_H_INF_NORM ", struct gl_light, _h_inf_norm ); - OFFSET( "LIGHT_NORM_DIRECTION ", struct gl_light, _NormSpotDirection ); - OFFSET( "LIGHT_VP_INF_SPOT_ATTEN ", struct gl_light, _VP_inf_spot_attenuation ); - printf( "\n" ); - OFFSET( "LIGHT_MAT_AMBIENT ", struct gl_light, _MatAmbient ); - OFFSET( "LIGHT_MAT_DIFFUSE ", struct gl_light, _MatDiffuse ); - OFFSET( "LIGHT_MAT_SPECULAR ", struct gl_light, _MatSpecular ); - printf( "\n" ); - SIZEOF( "SIZEOF_GL_LIGHT ", struct gl_light ); - - DEFINE_HEADER( "struct gl_light" ); - - DEFINE( "LIGHT_SPOT ", LIGHT_SPOT ); - DEFINE( "LIGHT_LOCAL_VIEWER ", LIGHT_LOCAL_VIEWER ); - DEFINE( "LIGHT_POSITIONAL ", LIGHT_POSITIONAL ); - printf( "\n" ); - DEFINE( "LIGHT_NEED_VERTICES ", LIGHT_NEED_VERTICES ); - - - /* struct gl_lightmodel offsets: - */ - OFFSET_HEADER( "struct gl_lightmodel" ); - - OFFSET( "LIGHT_MODEL_AMBIENT ", struct gl_lightmodel, Ambient ); - OFFSET( "LIGHT_MODEL_LOCAL_VIEWER ", struct gl_lightmodel, LocalViewer ); - OFFSET( "LIGHT_MODEL_TWO_SIDE ", struct gl_lightmodel, TwoSide ); - OFFSET( "LIGHT_MODEL_COLOR_CONTROL ", struct gl_lightmodel, ColorControl ); - - printf( "\n" ); printf( "\n" ); printf( "#endif /* __ASM_TYPES_H__ */\n" ); -- 2.30.2