diff options
Diffstat (limited to 'src/mesa/pipe/tgsi')
-rw-r--r-- | src/mesa/pipe/tgsi/core/tgsi_build.h | 146 | ||||
-rw-r--r-- | src/mesa/pipe/tgsi/core/tgsi_dump.h | 2 | ||||
-rw-r--r-- | src/mesa/pipe/tgsi/core/tgsi_exec.h | 42 | ||||
-rw-r--r-- | src/mesa/pipe/tgsi/core/tgsi_parse.h | 6 | ||||
-rw-r--r-- | src/mesa/pipe/tgsi/core/tgsi_token.h | 272 | ||||
-rw-r--r-- | src/mesa/pipe/tgsi/core/tgsi_util.h | 34 |
6 files changed, 252 insertions, 250 deletions
diff --git a/src/mesa/pipe/tgsi/core/tgsi_build.h b/src/mesa/pipe/tgsi/core/tgsi_build.h index 35c1a2506d..8b5db5662c 100644 --- a/src/mesa/pipe/tgsi/core/tgsi_build.h +++ b/src/mesa/pipe/tgsi/core/tgsi_build.h @@ -24,7 +24,7 @@ tgsi_default_processor( void ); struct tgsi_processor tgsi_build_processor( - GLuint processor, + unsigned processor, struct tgsi_header *header ); /* @@ -36,31 +36,31 @@ tgsi_default_declaration( void ); struct tgsi_declaration tgsi_build_declaration( - GLuint file, - GLuint declare, - GLuint interpolate, + unsigned file, + unsigned declare, + unsigned interpolate, struct tgsi_header *header ); struct tgsi_full_declaration tgsi_default_full_declaration( void ); -GLuint +unsigned tgsi_build_full_declaration( const struct tgsi_full_declaration *full_decl, struct tgsi_token *tokens, struct tgsi_header *header, - GLuint maxsize ); + unsigned maxsize ); struct tgsi_declaration_range tgsi_build_declaration_range( - GLuint first, - GLuint last, + unsigned first, + unsigned last, struct tgsi_declaration *declaration, struct tgsi_header *header ); struct tgsi_declaration_mask tgsi_build_declaration_mask( - GLuint mask, + unsigned mask, struct tgsi_declaration *declaration, struct tgsi_header *header ); @@ -69,7 +69,7 @@ tgsi_default_declaration_interpolation( void ); struct tgsi_declaration_interpolation tgsi_build_declaration_interpolation( - GLuint interpolate, + unsigned interpolate, struct tgsi_declaration *declaration, struct tgsi_header *header ); @@ -89,16 +89,16 @@ tgsi_default_full_immediate( void ); struct tgsi_immediate_float32 tgsi_build_immediate_float32( - GLfloat value, + float value, struct tgsi_immediate *immediate, struct tgsi_header *header ); -GLuint +unsigned tgsi_build_full_immediate( const struct tgsi_full_immediate *full_imm, struct tgsi_token *tokens, struct tgsi_header *header, - GLuint maxsize ); + unsigned maxsize ); /* * instruction @@ -109,42 +109,42 @@ tgsi_default_instruction( void ); struct tgsi_instruction tgsi_build_instruction( - GLuint opcode, - GLuint saturate, - GLuint num_dst_regs, - GLuint num_src_regs, + unsigned opcode, + unsigned saturate, + unsigned num_dst_regs, + unsigned num_src_regs, struct tgsi_header *header ); struct tgsi_full_instruction tgsi_default_full_instruction( void ); -GLuint +unsigned tgsi_build_full_instruction( const struct tgsi_full_instruction *full_inst, struct tgsi_token *tokens, struct tgsi_header *header, - GLuint maxsize ); + unsigned maxsize ); struct tgsi_instruction_ext_nv tgsi_default_instruction_ext_nv( void ); -GLuint +unsigned tgsi_compare_instruction_ext_nv( struct tgsi_instruction_ext_nv a, struct tgsi_instruction_ext_nv b ); struct tgsi_instruction_ext_nv tgsi_build_instruction_ext_nv( - GLuint precision, - GLuint cond_dst_index, - GLuint cond_flow_index, - GLuint cond_mask, - GLuint cond_swizzle_x, - GLuint cond_swizzle_y, - GLuint cond_swizzle_z, - GLuint cond_swizzle_w, - GLuint cond_dst_update, - GLuint cond_flow_update, + unsigned precision, + unsigned cond_dst_index, + unsigned cond_flow_index, + unsigned cond_mask, + unsigned cond_swizzle_x, + unsigned cond_swizzle_y, + unsigned cond_swizzle_z, + unsigned cond_swizzle_w, + unsigned cond_dst_update, + unsigned cond_flow_update, struct tgsi_token *prev_token, struct tgsi_instruction *instruction, struct tgsi_header *header ); @@ -152,14 +152,14 @@ tgsi_build_instruction_ext_nv( struct tgsi_instruction_ext_label tgsi_default_instruction_ext_label( void ); -GLuint +unsigned tgsi_compare_instruction_ext_label( struct tgsi_instruction_ext_label a, struct tgsi_instruction_ext_label b ); struct tgsi_instruction_ext_label tgsi_build_instruction_ext_label( - GLuint label, + unsigned label, struct tgsi_token *prev_token, struct tgsi_instruction *instruction, struct tgsi_header *header ); @@ -167,14 +167,14 @@ tgsi_build_instruction_ext_label( struct tgsi_instruction_ext_texture tgsi_default_instruction_ext_texture( void ); -GLuint +unsigned tgsi_compare_instruction_ext_texture( struct tgsi_instruction_ext_texture a, struct tgsi_instruction_ext_texture b ); struct tgsi_instruction_ext_texture tgsi_build_instruction_ext_texture( - GLuint texture, + unsigned texture, struct tgsi_token *prev_token, struct tgsi_instruction *instruction, struct tgsi_header *header ); @@ -184,15 +184,15 @@ tgsi_default_src_register( void ); struct tgsi_src_register tgsi_build_src_register( - GLuint file, - GLuint swizzle_x, - GLuint swizzle_y, - GLuint swizzle_z, - GLuint swizzle_w, - GLuint negate, - GLuint indirect, - GLuint dimension, - GLint index, + unsigned file, + unsigned swizzle_x, + unsigned swizzle_y, + unsigned swizzle_z, + unsigned swizzle_w, + unsigned negate, + unsigned indirect, + unsigned dimension, + int index, struct tgsi_instruction *instruction, struct tgsi_header *header ); @@ -202,22 +202,22 @@ tgsi_default_full_src_register( void ); struct tgsi_src_register_ext_swz tgsi_default_src_register_ext_swz( void ); -GLuint +unsigned tgsi_compare_src_register_ext_swz( struct tgsi_src_register_ext_swz a, struct tgsi_src_register_ext_swz b ); struct tgsi_src_register_ext_swz tgsi_build_src_register_ext_swz( - GLuint ext_swizzle_x, - GLuint ext_swizzle_y, - GLuint ext_swizzle_z, - GLuint ext_swizzle_w, - GLuint negate_x, - GLuint negate_y, - GLuint negate_z, - GLuint negate_w, - GLuint ext_divide, + unsigned ext_swizzle_x, + unsigned ext_swizzle_y, + unsigned ext_swizzle_z, + unsigned ext_swizzle_w, + unsigned negate_x, + unsigned negate_y, + unsigned negate_z, + unsigned negate_w, + unsigned ext_divide, struct tgsi_token *prev_token, struct tgsi_instruction *instruction, struct tgsi_header *header ); @@ -225,18 +225,18 @@ tgsi_build_src_register_ext_swz( struct tgsi_src_register_ext_mod tgsi_default_src_register_ext_mod( void ); -GLuint +unsigned tgsi_compare_src_register_ext_mod( struct tgsi_src_register_ext_mod a, struct tgsi_src_register_ext_mod b ); struct tgsi_src_register_ext_mod tgsi_build_src_register_ext_mod( - GLuint complement, - GLuint bias, - GLuint scale_2x, - GLuint absolute, - GLuint negate, + unsigned complement, + unsigned bias, + unsigned scale_2x, + unsigned absolute, + unsigned negate, struct tgsi_token *prev_token, struct tgsi_instruction *instruction, struct tgsi_header *header ); @@ -246,8 +246,8 @@ tgsi_default_dimension( void ); struct tgsi_dimension tgsi_build_dimension( - GLuint indirect, - GLuint index, + unsigned indirect, + unsigned index, struct tgsi_instruction *instruction, struct tgsi_header *header ); @@ -256,9 +256,9 @@ tgsi_default_dst_register( void ); struct tgsi_dst_register tgsi_build_dst_register( - GLuint file, - GLuint mask, - GLint index, + unsigned file, + unsigned mask, + int index, struct tgsi_instruction *instruction, struct tgsi_header *header ); @@ -268,19 +268,19 @@ tgsi_default_full_dst_register( void ); struct tgsi_dst_register_ext_concode tgsi_default_dst_register_ext_concode( void ); -GLuint +unsigned tgsi_compare_dst_register_ext_concode( struct tgsi_dst_register_ext_concode a, struct tgsi_dst_register_ext_concode b ); struct tgsi_dst_register_ext_concode tgsi_build_dst_register_ext_concode( - GLuint cc, - GLuint swizzle_x, - GLuint swizzle_y, - GLuint swizzle_z, - GLuint swizzle_w, - GLint index, + unsigned cc, + unsigned swizzle_x, + unsigned swizzle_y, + unsigned swizzle_z, + unsigned swizzle_w, + int index, struct tgsi_token *prev_token, struct tgsi_instruction *instruction, struct tgsi_header *header ); @@ -288,14 +288,14 @@ tgsi_build_dst_register_ext_concode( struct tgsi_dst_register_ext_modulate tgsi_default_dst_register_ext_modulate( void ); -GLuint +unsigned tgsi_compare_dst_register_ext_modulate( struct tgsi_dst_register_ext_modulate a, struct tgsi_dst_register_ext_modulate b ); struct tgsi_dst_register_ext_modulate tgsi_build_dst_register_ext_modulate( - GLuint modulate, + unsigned modulate, struct tgsi_token *prev_token, struct tgsi_instruction *instruction, struct tgsi_header *header ); diff --git a/src/mesa/pipe/tgsi/core/tgsi_dump.h b/src/mesa/pipe/tgsi/core/tgsi_dump.h index 8553bdff59..70860c0885 100644 --- a/src/mesa/pipe/tgsi/core/tgsi_dump.h +++ b/src/mesa/pipe/tgsi/core/tgsi_dump.h @@ -12,7 +12,7 @@ extern "C" { void tgsi_dump( const struct tgsi_token *tokens, - GLuint flags ); + unsigned flags ); #if defined __cplusplus } // extern "C" diff --git a/src/mesa/pipe/tgsi/core/tgsi_exec.h b/src/mesa/pipe/tgsi/core/tgsi_exec.h index 5e07e18a31..eed2207d7d 100644 --- a/src/mesa/pipe/tgsi/core/tgsi_exec.h +++ b/src/mesa/pipe/tgsi/core/tgsi_exec.h @@ -1,6 +1,8 @@ #if !defined TGSI_EXEC_H #define TGSI_EXEC_H +#include "pipe/p_compiler.h" + #if 0 #include "x86/rtasm/x86sse.h" #endif @@ -11,9 +13,9 @@ extern "C" { union tgsi_exec_channel { - GLfloat f[4]; - GLint i[4]; - GLuint u[4]; + float f[4]; + int i[4]; + unsigned u[4]; }; struct tgsi_exec_vector @@ -33,7 +35,7 @@ struct tgsi_exec_vector struct tgsi_texture_cache_entry { int x, y, face, level, zslice; - GLfloat data[TEX_CACHE_TILE_SIZE][TEX_CACHE_TILE_SIZE][4]; + float data[TEX_CACHE_TILE_SIZE][TEX_CACHE_TILE_SIZE][4]; }; struct tgsi_sampler @@ -42,19 +44,19 @@ struct tgsi_sampler struct pipe_mipmap_tree *texture; /** Get samples for four fragments in a quad */ void (*get_samples)(struct tgsi_sampler *sampler, - const GLfloat s[QUAD_SIZE], - const GLfloat t[QUAD_SIZE], - const GLfloat p[QUAD_SIZE], - GLfloat lodbias, - GLfloat rgba[NUM_CHANNELS][QUAD_SIZE]); + const float s[QUAD_SIZE], + const float t[QUAD_SIZE], + const float p[QUAD_SIZE], + float lodbias, + float rgba[NUM_CHANNELS][QUAD_SIZE]); void *pipe; /*XXX temporary*/ struct tgsi_texture_cache_entry cache[TEX_CACHE_NUM_ENTRIES]; }; struct tgsi_exec_labels { - GLuint labels[128][2]; - GLuint count; + unsigned labels[128][2]; + unsigned count; }; #define TGSI_EXEC_TEMP_00000000_I 32 @@ -107,15 +109,15 @@ struct tgsi_exec_cond_state { struct tgsi_exec_cond_regs IfPortion; struct tgsi_exec_cond_regs ElsePortion; - GLuint Condition; - GLboolean WasElse; + unsigned Condition; + boolean WasElse; }; /* XXX: This is temporary */ struct tgsi_exec_cond_stack { struct tgsi_exec_cond_state States[8]; - GLuint Index; /* into States[] */ + unsigned Index; /* into States[] */ }; struct tgsi_exec_machine @@ -136,15 +138,15 @@ struct tgsi_exec_machine struct tgsi_sampler *Samplers; - GLfloat Imms[256][4]; - GLuint ImmLimit; - GLfloat (*Consts)[4]; + float Imms[256][4]; + unsigned ImmLimit; + float (*Consts)[4]; const struct tgsi_exec_vector *Inputs; struct tgsi_exec_vector *Outputs; struct tgsi_token *Tokens; - GLuint Processor; + unsigned Processor; - GLuint *Primitives; + unsigned *Primitives; struct tgsi_exec_cond_stack CondStack; #if XXX_SSE @@ -156,7 +158,7 @@ void tgsi_exec_machine_init( struct tgsi_exec_machine *mach, struct tgsi_token *tokens, - GLuint numSamplers, + unsigned numSamplers, struct tgsi_sampler *samplers); void diff --git a/src/mesa/pipe/tgsi/core/tgsi_parse.h b/src/mesa/pipe/tgsi/core/tgsi_parse.h index 61ad0669b1..bba01431fa 100644 --- a/src/mesa/pipe/tgsi/core/tgsi_parse.h +++ b/src/mesa/pipe/tgsi/core/tgsi_parse.h @@ -86,7 +86,7 @@ tgsi_full_token_free( struct tgsi_parse_context { const struct tgsi_token *Tokens; - GLuint Position; + unsigned Position; struct tgsi_full_version FullVersion; struct tgsi_full_header FullHeader; union tgsi_full_token FullToken; @@ -95,7 +95,7 @@ struct tgsi_parse_context #define TGSI_PARSE_OK 0 #define TGSI_PARSE_ERROR 1 -GLuint +unsigned tgsi_parse_init( struct tgsi_parse_context *ctx, const struct tgsi_token *tokens ); @@ -104,7 +104,7 @@ void tgsi_parse_free( struct tgsi_parse_context *ctx ); -GLuint +unsigned tgsi_parse_end_of_tokens( struct tgsi_parse_context *ctx ); diff --git a/src/mesa/pipe/tgsi/core/tgsi_token.h b/src/mesa/pipe/tgsi/core/tgsi_token.h index ec62836ef3..dc9301ed37 100644 --- a/src/mesa/pipe/tgsi/core/tgsi_token.h +++ b/src/mesa/pipe/tgsi/core/tgsi_token.h @@ -7,15 +7,15 @@ extern "C" { struct tgsi_version { - GLuint MajorVersion : 8; - GLuint MinorVersion : 8; - GLuint Padding : 16; + unsigned MajorVersion : 8; + unsigned MinorVersion : 8; + unsigned Padding : 16; }; struct tgsi_header { - GLuint HeaderSize : 8; - GLuint BodySize : 24; + unsigned HeaderSize : 8; + unsigned BodySize : 24; }; #define TGSI_PROCESSOR_FRAGMENT 0 @@ -24,8 +24,8 @@ struct tgsi_header struct tgsi_processor { - GLuint Processor : 4; /* TGSI_PROCESSOR_ */ - GLuint Padding : 28; + unsigned Processor : 4; /* TGSI_PROCESSOR_ */ + unsigned Padding : 28; }; #define TGSI_TOKEN_TYPE_DECLARATION 0 @@ -34,10 +34,10 @@ struct tgsi_processor struct tgsi_token { - GLuint Type : 4; /* TGSI_TOKEN_TYPE_ */ - GLuint Size : 8; /* UINT */ - GLuint Padding : 19; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_TOKEN_TYPE_ */ + unsigned Size : 8; /* UINT */ + unsigned Padding : 19; + unsigned Extended : 1; /* BOOL */ }; #define TGSI_FILE_NULL 0 @@ -54,24 +54,24 @@ struct tgsi_token struct tgsi_declaration { - GLuint Type : 4; /* TGSI_TOKEN_TYPE_DECLARATION */ - GLuint Size : 8; /* UINT */ - GLuint File : 4; /* TGSI_FILE_ */ - GLuint Declare : 4; /* TGSI_DECLARE_ */ - GLuint Interpolate : 1; /* BOOL */ - GLuint Padding : 10; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_TOKEN_TYPE_DECLARATION */ + unsigned Size : 8; /* UINT */ + unsigned File : 4; /* TGSI_FILE_ */ + unsigned Declare : 4; /* TGSI_DECLARE_ */ + unsigned Interpolate : 1; /* BOOL */ + unsigned Padding : 10; + unsigned Extended : 1; /* BOOL */ }; struct tgsi_declaration_range { - GLuint First : 16; /* UINT */ - GLuint Last : 16; /* UINT */ + unsigned First : 16; /* UINT */ + unsigned Last : 16; /* UINT */ }; struct tgsi_declaration_mask { - GLuint Mask : 32; /* UINT */ + unsigned Mask : 32; /* UINT */ }; #define TGSI_INTERPOLATE_CONSTANT 0 @@ -80,24 +80,24 @@ struct tgsi_declaration_mask struct tgsi_declaration_interpolation { - GLuint Interpolate : 4; /* TGSI_INTERPOLATE_ */ - GLuint Padding : 28; + unsigned Interpolate : 4; /* TGSI_INTERPOLATE_ */ + unsigned Padding : 28; }; #define TGSI_IMM_FLOAT32 0 struct tgsi_immediate { - GLuint Type : 4; /* TGSI_TOKEN_TYPE_IMMEDIATE */ - GLuint Size : 8; /* UINT */ - GLuint DataType : 4; /* TGSI_IMM_ */ - GLuint Padding : 15; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_TOKEN_TYPE_IMMEDIATE */ + unsigned Size : 8; /* UINT */ + unsigned DataType : 4; /* TGSI_IMM_ */ + unsigned Padding : 15; + unsigned Extended : 1; /* BOOL */ }; struct tgsi_immediate_float32 { - GLfloat Float; + float Float; }; /* @@ -1088,14 +1088,14 @@ struct tgsi_immediate_float32 struct tgsi_instruction { - GLuint Type : 4; /* TGSI_TOKEN_TYPE_INSTRUCTION */ - GLuint Size : 8; /* UINT */ - GLuint Opcode : 8; /* TGSI_OPCODE_ */ - GLuint Saturate : 2; /* TGSI_SAT_ */ - GLuint NumDstRegs : 2; /* UINT */ - GLuint NumSrcRegs : 4; /* UINT */ - GLuint Padding : 3; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_TOKEN_TYPE_INSTRUCTION */ + unsigned Size : 8; /* UINT */ + unsigned Opcode : 8; /* TGSI_OPCODE_ */ + unsigned Saturate : 2; /* TGSI_SAT_ */ + unsigned NumDstRegs : 2; /* UINT */ + unsigned NumSrcRegs : 4; /* UINT */ + unsigned Padding : 3; + unsigned Extended : 1; /* BOOL */ }; /* @@ -1116,9 +1116,9 @@ struct tgsi_instruction struct tgsi_instruction_ext { - GLuint Type : 4; /* TGSI_INSTRUCTION_EXT_TYPE_ */ - GLuint Padding : 27; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_INSTRUCTION_EXT_TYPE_ */ + unsigned Padding : 27; + unsigned Extended : 1; /* BOOL */ }; /* @@ -1174,27 +1174,27 @@ struct tgsi_instruction_ext struct tgsi_instruction_ext_nv { - GLuint Type : 4; /* TGSI_INSTRUCTION_EXT_TYPE_NV */ - GLuint Precision : 4; /* TGSI_PRECISION_ */ - GLuint CondDstIndex : 4; /* UINT */ - GLuint CondFlowIndex : 4; /* UINT */ - GLuint CondMask : 4; /* TGSI_CC_ */ - GLuint CondSwizzleX : 2; /* TGSI_SWIZZLE_ */ - GLuint CondSwizzleY : 2; /* TGSI_SWIZZLE_ */ - GLuint CondSwizzleZ : 2; /* TGSI_SWIZZLE_ */ - GLuint CondSwizzleW : 2; /* TGSI_SWIZZLE_ */ - GLuint CondDstUpdate : 1; /* BOOL */ - GLuint CondFlowEnable : 1; /* BOOL */ - GLuint Padding : 1; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_INSTRUCTION_EXT_TYPE_NV */ + unsigned Precision : 4; /* TGSI_PRECISION_ */ + unsigned CondDstIndex : 4; /* UINT */ + unsigned CondFlowIndex : 4; /* UINT */ + unsigned CondMask : 4; /* TGSI_CC_ */ + unsigned CondSwizzleX : 2; /* TGSI_SWIZZLE_ */ + unsigned CondSwizzleY : 2; /* TGSI_SWIZZLE_ */ + unsigned CondSwizzleZ : 2; /* TGSI_SWIZZLE_ */ + unsigned CondSwizzleW : 2; /* TGSI_SWIZZLE_ */ + unsigned CondDstUpdate : 1; /* BOOL */ + unsigned CondFlowEnable : 1; /* BOOL */ + unsigned Padding : 1; + unsigned Extended : 1; /* BOOL */ }; struct tgsi_instruction_ext_label { - GLuint Type : 4; /* TGSI_INSTRUCTION_EXT_TYPE_LABEL */ - GLuint Label : 24; /* UINT */ - GLuint Padding : 3; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_INSTRUCTION_EXT_TYPE_LABEL */ + unsigned Label : 24; /* UINT */ + unsigned Padding : 3; + unsigned Extended : 1; /* BOOL */ }; #define TGSI_TEXTURE_UNKNOWN 0 @@ -1209,10 +1209,10 @@ struct tgsi_instruction_ext_label struct tgsi_instruction_ext_texture { - GLuint Type : 4; /* TGSI_INSTRUCTION_EXT_TYPE_TEXTURE */ - GLuint Texture : 8; /* TGSI_TEXTURE_ */ - GLuint Padding : 19; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_INSTRUCTION_EXT_TYPE_TEXTURE */ + unsigned Texture : 8; /* TGSI_TEXTURE_ */ + unsigned Padding : 19; + unsigned Extended : 1; /* BOOL */ }; #define TGSI_WRITEMASK_NONE 0x00 @@ -1234,11 +1234,11 @@ struct tgsi_instruction_ext_texture struct tgsi_instruction_ext_predicate { - GLuint Type : 4; /* TGSI_INSTRUCTION_EXT_TYPE_PREDICATE */ - GLuint PredDstIndex : 4; /* UINT */ - GLuint PredWriteMask : 4; /* TGSI_WRITEMASK_ */ - GLuint Padding : 19; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_INSTRUCTION_EXT_TYPE_PREDICATE */ + unsigned PredDstIndex : 4; /* UINT */ + unsigned PredWriteMask : 4; /* TGSI_WRITEMASK_ */ + unsigned Padding : 19; + unsigned Extended : 1; /* BOOL */ }; /* @@ -1261,16 +1261,16 @@ struct tgsi_instruction_ext_predicate struct tgsi_src_register { - GLuint File : 4; /* TGSI_FILE_ */ - GLuint SwizzleX : 2; /* TGSI_SWIZZLE_ */ - GLuint SwizzleY : 2; /* TGSI_SWIZZLE_ */ - GLuint SwizzleZ : 2; /* TGSI_SWIZZLE_ */ - GLuint SwizzleW : 2; /* TGSI_SWIZZLE_ */ - GLuint Negate : 1; /* BOOL */ - GLuint Indirect : 1; /* BOOL */ - GLuint Dimension : 1; /* BOOL */ - GLint Index : 16; /* SINT */ - GLuint Extended : 1; /* BOOL */ + unsigned File : 4; /* TGSI_FILE_ */ + unsigned SwizzleX : 2; /* TGSI_SWIZZLE_ */ + unsigned SwizzleY : 2; /* TGSI_SWIZZLE_ */ + unsigned SwizzleZ : 2; /* TGSI_SWIZZLE_ */ + unsigned SwizzleW : 2; /* TGSI_SWIZZLE_ */ + unsigned Negate : 1; /* BOOL */ + unsigned Indirect : 1; /* BOOL */ + unsigned Dimension : 1; /* BOOL */ + int Index : 16; /* SINT */ + unsigned Extended : 1; /* BOOL */ }; /* @@ -1287,9 +1287,9 @@ struct tgsi_src_register struct tgsi_src_register_ext { - GLuint Type : 4; /* TGSI_SRC_REGISTER_EXT_TYPE_ */ - GLuint Padding : 27; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_SRC_REGISTER_EXT_TYPE_ */ + unsigned Padding : 27; + unsigned Extended : 1; /* BOOL */ }; /* @@ -1323,18 +1323,18 @@ struct tgsi_src_register_ext struct tgsi_src_register_ext_swz { - GLuint Type : 4; /* TGSI_SRC_REGISTER_EXT_TYPE_SWZ */ - GLuint ExtSwizzleX : 4; /* TGSI_EXTSWIZZLE_ */ - GLuint ExtSwizzleY : 4; /* TGSI_EXTSWIZZLE_ */ - GLuint ExtSwizzleZ : 4; /* TGSI_EXTSWIZZLE_ */ - GLuint ExtSwizzleW : 4; /* TGSI_EXTSWIZZLE_ */ - GLuint NegateX : 1; /* BOOL */ - GLuint NegateY : 1; /* BOOL */ - GLuint NegateZ : 1; /* BOOL */ - GLuint NegateW : 1; /* BOOL */ - GLuint ExtDivide : 4; /* TGSI_EXTSWIZZLE_ */ - GLuint Padding : 3; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_SRC_REGISTER_EXT_TYPE_SWZ */ + unsigned ExtSwizzleX : 4; /* TGSI_EXTSWIZZLE_ */ + unsigned ExtSwizzleY : 4; /* TGSI_EXTSWIZZLE_ */ + unsigned ExtSwizzleZ : 4; /* TGSI_EXTSWIZZLE_ */ + unsigned ExtSwizzleW : 4; /* TGSI_EXTSWIZZLE_ */ + unsigned NegateX : 1; /* BOOL */ + unsigned NegateY : 1; /* BOOL */ + unsigned NegateZ : 1; /* BOOL */ + unsigned NegateW : 1; /* BOOL */ + unsigned ExtDivide : 4; /* TGSI_EXTSWIZZLE_ */ + unsigned Padding : 3; + unsigned Extended : 1; /* BOOL */ }; /* @@ -1352,34 +1352,34 @@ struct tgsi_src_register_ext_swz struct tgsi_src_register_ext_mod { - GLuint Type : 4; /* TGSI_SRC_REGISTER_EXT_TYPE_MOD */ - GLuint Complement : 1; /* BOOL */ - GLuint Bias : 1; /* BOOL */ - GLuint Scale2X : 1; /* BOOL */ - GLuint Absolute : 1; /* BOOL */ - GLuint Negate : 1; /* BOOL */ - GLuint Padding : 22; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_SRC_REGISTER_EXT_TYPE_MOD */ + unsigned Complement : 1; /* BOOL */ + unsigned Bias : 1; /* BOOL */ + unsigned Scale2X : 1; /* BOOL */ + unsigned Absolute : 1; /* BOOL */ + unsigned Negate : 1; /* BOOL */ + unsigned Padding : 22; + unsigned Extended : 1; /* BOOL */ }; struct tgsi_dimension { - GLuint Indirect : 1; /* BOOL */ - GLuint Dimension : 1; /* BOOL */ - GLuint Padding : 13; - GLint Index : 16; /* SINT */ - GLuint Extended : 1; /* BOOL */ + unsigned Indirect : 1; /* BOOL */ + unsigned Dimension : 1; /* BOOL */ + unsigned Padding : 13; + int Index : 16; /* SINT */ + unsigned Extended : 1; /* BOOL */ }; struct tgsi_dst_register { - GLuint File : 4; /* TGSI_FILE_ */ - GLuint WriteMask : 4; /* TGSI_WRITEMASK_ */ - GLuint Indirect : 1; /* BOOL */ - GLuint Dimension : 1; /* BOOL */ - GLint Index : 16; /* SINT */ - GLuint Padding : 5; - GLuint Extended : 1; /* BOOL */ + unsigned File : 4; /* TGSI_FILE_ */ + unsigned WriteMask : 4; /* TGSI_WRITEMASK_ */ + unsigned Indirect : 1; /* BOOL */ + unsigned Dimension : 1; /* BOOL */ + int Index : 16; /* SINT */ + unsigned Padding : 5; + unsigned Extended : 1; /* BOOL */ }; /* @@ -1394,9 +1394,9 @@ struct tgsi_dst_register struct tgsi_dst_register_ext { - GLuint Type : 4; /* TGSI_DST_REGISTER_EXT_TYPE_ */ - GLuint Padding : 27; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_DST_REGISTER_EXT_TYPE_ */ + unsigned Padding : 27; + unsigned Extended : 1; /* BOOL */ }; /* @@ -1415,15 +1415,15 @@ struct tgsi_dst_register_ext struct tgsi_dst_register_ext_concode { - GLuint Type : 4; /* TGSI_DST_REGISTER_EXT_TYPE_CONDCODE */ - GLuint CondMask : 4; /* TGSI_CC_ */ - GLuint CondSwizzleX : 2; /* TGSI_SWIZZLE_ */ - GLuint CondSwizzleY : 2; /* TGSI_SWIZZLE_ */ - GLuint CondSwizzleZ : 2; /* TGSI_SWIZZLE_ */ - GLuint CondSwizzleW : 2; /* TGSI_SWIZZLE_ */ - GLuint CondSrcIndex : 4; /* UINT */ - GLuint Padding : 11; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_DST_REGISTER_EXT_TYPE_CONDCODE */ + unsigned CondMask : 4; /* TGSI_CC_ */ + unsigned CondSwizzleX : 2; /* TGSI_SWIZZLE_ */ + unsigned CondSwizzleY : 2; /* TGSI_SWIZZLE_ */ + unsigned CondSwizzleZ : 2; /* TGSI_SWIZZLE_ */ + unsigned CondSwizzleW : 2; /* TGSI_SWIZZLE_ */ + unsigned CondSrcIndex : 4; /* UINT */ + unsigned Padding : 11; + unsigned Extended : 1; /* BOOL */ }; #define TGSI_MODULATE_1X 0 @@ -1436,10 +1436,10 @@ struct tgsi_dst_register_ext_concode struct tgsi_dst_register_ext_modulate { - GLuint Type : 4; /* TGSI_DST_REGISTER_EXT_TYPE_MODULATE */ - GLuint Modulate : 4; /* TGSI_MODULATE_ */ - GLuint Padding : 23; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_DST_REGISTER_EXT_TYPE_MODULATE */ + unsigned Modulate : 4; /* TGSI_MODULATE_ */ + unsigned Padding : 23; + unsigned Extended : 1; /* BOOL */ }; /* @@ -1451,15 +1451,15 @@ struct tgsi_dst_register_ext_modulate struct tgsi_dst_register_ext_predicate { - GLuint Type : 4; /* TGSI_DST_REGISTER_EXT_TYPE_PREDICATE */ - GLuint PredSwizzleX : 2; /* TGSI_SWIZZLE_ */ - GLuint PredSwizzleY : 2; /* TGSI_SWIZZLE_ */ - GLuint PredSwizzleZ : 2; /* TGSI_SWIZZLE_ */ - GLuint PredSwizzleW : 2; /* TGSI_SWIZZLE_ */ - GLuint PredSrcIndex : 4; /* UINT */ - GLuint Negate : 1; /* BOOL */ - GLuint Padding : 14; - GLuint Extended : 1; /* BOOL */ + unsigned Type : 4; /* TGSI_DST_REGISTER_EXT_TYPE_PREDICATE */ + unsigned PredSwizzleX : 2; /* TGSI_SWIZZLE_ */ + unsigned PredSwizzleY : 2; /* TGSI_SWIZZLE_ */ + unsigned PredSwizzleZ : 2; /* TGSI_SWIZZLE_ */ + unsigned PredSwizzleW : 2; /* TGSI_SWIZZLE_ */ + unsigned PredSrcIndex : 4; /* UINT */ + unsigned Negate : 1; /* BOOL */ + unsigned Padding : 14; + unsigned Extended : 1; /* BOOL */ }; #if defined __cplusplus diff --git a/src/mesa/pipe/tgsi/core/tgsi_util.h b/src/mesa/pipe/tgsi/core/tgsi_util.h index 70c48690c5..ef14446f0e 100644 --- a/src/mesa/pipe/tgsi/core/tgsi_util.h +++ b/src/mesa/pipe/tgsi/core/tgsi_util.h @@ -9,58 +9,58 @@ void * tgsi_align_128bit( void *unaligned ); -GLuint +unsigned tgsi_util_get_src_register_swizzle( const struct tgsi_src_register *reg, - GLuint component ); + unsigned component ); -GLuint +unsigned tgsi_util_get_src_register_extswizzle( const struct tgsi_src_register_ext_swz *reg, - GLuint component); + unsigned component); -GLuint +unsigned tgsi_util_get_full_src_register_extswizzle( const struct tgsi_full_src_register *reg, - GLuint component ); + unsigned component ); void tgsi_util_set_src_register_swizzle( struct tgsi_src_register *reg, - GLuint swizzle, - GLuint component ); + unsigned swizzle, + unsigned component ); void tgsi_util_set_src_register_extswizzle( struct tgsi_src_register_ext_swz *reg, - GLuint swizzle, - GLuint component ); + unsigned swizzle, + unsigned component ); -GLuint +unsigned tgsi_util_get_src_register_extnegate( const struct tgsi_src_register_ext_swz *reg, - GLuint component ); + unsigned component ); void tgsi_util_set_src_register_extnegate( struct tgsi_src_register_ext_swz *reg, - GLuint negate, - GLuint component ); + unsigned negate, + unsigned component ); #define TGSI_UTIL_SIGN_CLEAR 0 /* Force positive */ #define TGSI_UTIL_SIGN_SET 1 /* Force negative */ #define TGSI_UTIL_SIGN_TOGGLE 2 /* Negate */ #define TGSI_UTIL_SIGN_KEEP 3 /* No change */ -GLuint +unsigned tgsi_util_get_full_src_register_sign_mode( const struct tgsi_full_src_register *reg, - GLuint component ); + unsigned component ); void tgsi_util_set_full_src_register_sign_mode( struct tgsi_full_src_register *reg, - GLuint sign_mode ); + unsigned sign_mode ); #if defined __cplusplus } // extern "C" |