sed -i -e 's/GLuint/unsigned/g' -e 's/GLint/int/g' \ -e 's/GLfloat/float/g' -e 's/GLubyte/uint8_t/g' \ -e 's/GLshort/int16_t/g' \ brw_eu* brw_disasm.c brw_structs.h Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>tags/mesa-10.1-rc1
@@ -442,7 +442,7 @@ static int pad (FILE *f, int c) | |||
} | |||
static int control (FILE *file, const char *name, const char * const ctrl[], | |||
GLuint id, int *space) | |||
unsigned id, int *space) | |||
{ | |||
if (!ctrl[id]) { | |||
fprintf (file, "*** invalid %s value %d ", | |||
@@ -483,7 +483,7 @@ static int three_source_type_to_reg_type(int three_source_type) | |||
return -1; | |||
} | |||
static int reg (FILE *file, GLuint _reg_file, GLuint _reg_nr) | |||
static int reg (FILE *file, unsigned _reg_file, unsigned _reg_nr) | |||
{ | |||
int err = 0; | |||
@@ -617,7 +617,7 @@ static int dest_3src (FILE *file, struct brw_instruction *inst) | |||
} | |||
static int src_align1_region (FILE *file, | |||
GLuint _vert_stride, GLuint _width, GLuint _horiz_stride) | |||
unsigned _vert_stride, unsigned _width, unsigned _horiz_stride) | |||
{ | |||
int err = 0; | |||
string (file, "<"); | |||
@@ -630,9 +630,9 @@ static int src_align1_region (FILE *file, | |||
return err; | |||
} | |||
static int src_da1 (FILE *file, GLuint type, GLuint _reg_file, | |||
GLuint _vert_stride, GLuint _width, GLuint _horiz_stride, | |||
GLuint reg_num, GLuint sub_reg_num, GLuint __abs, GLuint _negate) | |||
static int src_da1 (FILE *file, unsigned type, unsigned _reg_file, | |||
unsigned _vert_stride, unsigned _width, unsigned _horiz_stride, | |||
unsigned reg_num, unsigned sub_reg_num, unsigned __abs, unsigned _negate) | |||
{ | |||
int err = 0; | |||
err |= control (file, "negate", negate, _negate, NULL); | |||
@@ -649,16 +649,16 @@ static int src_da1 (FILE *file, GLuint type, GLuint _reg_file, | |||
} | |||
static int src_ia1 (FILE *file, | |||
GLuint type, | |||
GLuint _reg_file, | |||
GLint _addr_imm, | |||
GLuint _addr_subreg_nr, | |||
GLuint _negate, | |||
GLuint __abs, | |||
GLuint _addr_mode, | |||
GLuint _horiz_stride, | |||
GLuint _width, | |||
GLuint _vert_stride) | |||
unsigned type, | |||
unsigned _reg_file, | |||
int _addr_imm, | |||
unsigned _addr_subreg_nr, | |||
unsigned _negate, | |||
unsigned __abs, | |||
unsigned _addr_mode, | |||
unsigned _horiz_stride, | |||
unsigned _width, | |||
unsigned _vert_stride) | |||
{ | |||
int err = 0; | |||
err |= control (file, "negate", negate, _negate, NULL); | |||
@@ -676,17 +676,17 @@ static int src_ia1 (FILE *file, | |||
} | |||
static int src_da16 (FILE *file, | |||
GLuint _reg_type, | |||
GLuint _reg_file, | |||
GLuint _vert_stride, | |||
GLuint _reg_nr, | |||
GLuint _subreg_nr, | |||
GLuint __abs, | |||
GLuint _negate, | |||
GLuint swz_x, | |||
GLuint swz_y, | |||
GLuint swz_z, | |||
GLuint swz_w) | |||
unsigned _reg_type, | |||
unsigned _reg_file, | |||
unsigned _vert_stride, | |||
unsigned _reg_nr, | |||
unsigned _subreg_nr, | |||
unsigned __abs, | |||
unsigned _negate, | |||
unsigned swz_x, | |||
unsigned swz_y, | |||
unsigned swz_z, | |||
unsigned swz_w) | |||
{ | |||
int err = 0; | |||
err |= control (file, "negate", negate, _negate, NULL); | |||
@@ -735,10 +735,10 @@ static int src_da16 (FILE *file, | |||
static int src0_3src (FILE *file, struct brw_instruction *inst) | |||
{ | |||
int err = 0; | |||
GLuint swz_x = (inst->bits2.da3src.src0_swizzle >> 0) & 0x3; | |||
GLuint swz_y = (inst->bits2.da3src.src0_swizzle >> 2) & 0x3; | |||
GLuint swz_z = (inst->bits2.da3src.src0_swizzle >> 4) & 0x3; | |||
GLuint swz_w = (inst->bits2.da3src.src0_swizzle >> 6) & 0x3; | |||
unsigned swz_x = (inst->bits2.da3src.src0_swizzle >> 0) & 0x3; | |||
unsigned swz_y = (inst->bits2.da3src.src0_swizzle >> 2) & 0x3; | |||
unsigned swz_z = (inst->bits2.da3src.src0_swizzle >> 4) & 0x3; | |||
unsigned swz_w = (inst->bits2.da3src.src0_swizzle >> 6) & 0x3; | |||
err |= control (file, "negate", negate, inst->bits1.da3src.src0_negate, NULL); | |||
err |= control (file, "abs", _abs, inst->bits1.da3src.src0_abs, NULL); | |||
@@ -784,11 +784,11 @@ static int src0_3src (FILE *file, struct brw_instruction *inst) | |||
static int src1_3src (FILE *file, struct brw_instruction *inst) | |||
{ | |||
int err = 0; | |||
GLuint swz_x = (inst->bits2.da3src.src1_swizzle >> 0) & 0x3; | |||
GLuint swz_y = (inst->bits2.da3src.src1_swizzle >> 2) & 0x3; | |||
GLuint swz_z = (inst->bits2.da3src.src1_swizzle >> 4) & 0x3; | |||
GLuint swz_w = (inst->bits2.da3src.src1_swizzle >> 6) & 0x3; | |||
GLuint src1_subreg_nr = (inst->bits2.da3src.src1_subreg_nr_low | | |||
unsigned swz_x = (inst->bits2.da3src.src1_swizzle >> 0) & 0x3; | |||
unsigned swz_y = (inst->bits2.da3src.src1_swizzle >> 2) & 0x3; | |||
unsigned swz_z = (inst->bits2.da3src.src1_swizzle >> 4) & 0x3; | |||
unsigned swz_w = (inst->bits2.da3src.src1_swizzle >> 6) & 0x3; | |||
unsigned src1_subreg_nr = (inst->bits2.da3src.src1_subreg_nr_low | | |||
(inst->bits3.da3src.src1_subreg_nr_high << 2)); | |||
err |= control (file, "negate", negate, inst->bits1.da3src.src1_negate, | |||
@@ -838,10 +838,10 @@ static int src1_3src (FILE *file, struct brw_instruction *inst) | |||
static int src2_3src (FILE *file, struct brw_instruction *inst) | |||
{ | |||
int err = 0; | |||
GLuint swz_x = (inst->bits3.da3src.src2_swizzle >> 0) & 0x3; | |||
GLuint swz_y = (inst->bits3.da3src.src2_swizzle >> 2) & 0x3; | |||
GLuint swz_z = (inst->bits3.da3src.src2_swizzle >> 4) & 0x3; | |||
GLuint swz_w = (inst->bits3.da3src.src2_swizzle >> 6) & 0x3; | |||
unsigned swz_x = (inst->bits3.da3src.src2_swizzle >> 0) & 0x3; | |||
unsigned swz_y = (inst->bits3.da3src.src2_swizzle >> 2) & 0x3; | |||
unsigned swz_z = (inst->bits3.da3src.src2_swizzle >> 4) & 0x3; | |||
unsigned swz_w = (inst->bits3.da3src.src2_swizzle >> 6) & 0x3; | |||
err |= control (file, "negate", negate, inst->bits1.da3src.src2_negate, | |||
NULL); | |||
@@ -886,7 +886,7 @@ static int src2_3src (FILE *file, struct brw_instruction *inst) | |||
return err; | |||
} | |||
static int imm (FILE *file, GLuint type, struct brw_instruction *inst) { | |||
static int imm (FILE *file, unsigned type, struct brw_instruction *inst) { | |||
switch (type) { | |||
case BRW_REGISTER_TYPE_UD: | |||
format (file, "0x%08xUD", inst->bits3.ud); |
@@ -63,7 +63,7 @@ brw_swap_cmod(uint32_t cmod) | |||
/* How does predicate control work when execution_size != 8? Do I | |||
* need to test/set for 0xffff when execution_size is 16? | |||
*/ | |||
void brw_set_predicate_control_flag_value( struct brw_compile *p, GLuint value ) | |||
void brw_set_predicate_control_flag_value( struct brw_compile *p, unsigned value ) | |||
{ | |||
p->current->header.predicate_control = BRW_PREDICATE_NONE; | |||
@@ -79,7 +79,7 @@ void brw_set_predicate_control_flag_value( struct brw_compile *p, GLuint value ) | |||
} | |||
} | |||
void brw_set_predicate_control( struct brw_compile *p, GLuint pc ) | |||
void brw_set_predicate_control( struct brw_compile *p, unsigned pc ) | |||
{ | |||
p->current->header.predicate_control = pc; | |||
} | |||
@@ -89,7 +89,7 @@ void brw_set_predicate_inverse(struct brw_compile *p, bool predicate_inverse) | |||
p->current->header.predicate_inverse = predicate_inverse; | |||
} | |||
void brw_set_conditionalmod( struct brw_compile *p, GLuint conditional ) | |||
void brw_set_conditionalmod( struct brw_compile *p, unsigned conditional ) | |||
{ | |||
p->current->header.destreg__conditionalmod = conditional; | |||
} | |||
@@ -100,7 +100,7 @@ void brw_set_flag_reg(struct brw_compile *p, int reg, int subreg) | |||
p->current->bits2.da1.flag_subreg_nr = subreg; | |||
} | |||
void brw_set_access_mode( struct brw_compile *p, GLuint access_mode ) | |||
void brw_set_access_mode( struct brw_compile *p, unsigned access_mode ) | |||
{ | |||
p->current->header.access_mode = access_mode; | |||
} | |||
@@ -142,7 +142,7 @@ brw_set_compression_control(struct brw_compile *p, | |||
} | |||
} | |||
void brw_set_mask_control( struct brw_compile *p, GLuint value ) | |||
void brw_set_mask_control( struct brw_compile *p, unsigned value ) | |||
{ | |||
p->current->header.mask_control = value; | |||
} | |||
@@ -152,7 +152,7 @@ void brw_set_saturate( struct brw_compile *p, bool enable ) | |||
p->current->header.saturate = enable; | |||
} | |||
void brw_set_acc_write_control(struct brw_compile *p, GLuint value) | |||
void brw_set_acc_write_control(struct brw_compile *p, unsigned value) | |||
{ | |||
if (p->brw->gen >= 6) | |||
p->current->header.acc_wr_control = value; | |||
@@ -217,13 +217,13 @@ brw_init_compile(struct brw_context *brw, struct brw_compile *p, void *mem_ctx) | |||
} | |||
const GLuint *brw_get_program( struct brw_compile *p, | |||
GLuint *sz ) | |||
const unsigned *brw_get_program( struct brw_compile *p, | |||
unsigned *sz ) | |||
{ | |||
brw_compact_instructions(p); | |||
*sz = p->next_insn_offset; | |||
return (const GLuint *)p->store; | |||
return (const unsigned *)p->store; | |||
} | |||
void |
@@ -48,7 +48,7 @@ extern "C" { | |||
struct brw_compile { | |||
struct brw_instruction *store; | |||
int store_size; | |||
GLuint nr_insn; | |||
unsigned nr_insn; | |||
unsigned int next_insn_offset; | |||
void *mem_ctx; | |||
@@ -59,7 +59,7 @@ struct brw_compile { | |||
bool compressed_stack[BRW_EU_MAX_INSN_STACK]; | |||
struct brw_instruction *current; | |||
GLuint flag_value; | |||
unsigned flag_value; | |||
bool single_program_flow; | |||
bool compressed; | |||
struct brw_context *brw; | |||
@@ -97,23 +97,23 @@ static INLINE struct brw_instruction *current_insn( struct brw_compile *p) | |||
void brw_pop_insn_state( struct brw_compile *p ); | |||
void brw_push_insn_state( struct brw_compile *p ); | |||
void brw_set_mask_control( struct brw_compile *p, GLuint value ); | |||
void brw_set_mask_control( struct brw_compile *p, unsigned value ); | |||
void brw_set_saturate( struct brw_compile *p, bool enable ); | |||
void brw_set_access_mode( struct brw_compile *p, GLuint access_mode ); | |||
void brw_set_access_mode( struct brw_compile *p, unsigned access_mode ); | |||
void brw_set_compression_control(struct brw_compile *p, enum brw_compression c); | |||
void brw_set_predicate_control_flag_value( struct brw_compile *p, GLuint value ); | |||
void brw_set_predicate_control( struct brw_compile *p, GLuint pc ); | |||
void brw_set_predicate_control_flag_value( struct brw_compile *p, unsigned value ); | |||
void brw_set_predicate_control( struct brw_compile *p, unsigned pc ); | |||
void brw_set_predicate_inverse(struct brw_compile *p, bool predicate_inverse); | |||
void brw_set_conditionalmod( struct brw_compile *p, GLuint conditional ); | |||
void brw_set_conditionalmod( struct brw_compile *p, unsigned conditional ); | |||
void brw_set_flag_reg(struct brw_compile *p, int reg, int subreg); | |||
void brw_set_acc_write_control(struct brw_compile *p, GLuint value); | |||
void brw_set_acc_write_control(struct brw_compile *p, unsigned value); | |||
void brw_init_compile(struct brw_context *, struct brw_compile *p, | |||
void *mem_ctx); | |||
void brw_dump_compile(struct brw_compile *p, FILE *out, int start, int end); | |||
const GLuint *brw_get_program( struct brw_compile *p, GLuint *sz ); | |||
const unsigned *brw_get_program( struct brw_compile *p, unsigned *sz ); | |||
struct brw_instruction *brw_next_insn(struct brw_compile *p, GLuint opcode); | |||
struct brw_instruction *brw_next_insn(struct brw_compile *p, unsigned opcode); | |||
void brw_set_dest(struct brw_compile *p, struct brw_instruction *insn, | |||
struct brw_reg dest); | |||
void brw_set_src0(struct brw_compile *p, struct brw_instruction *insn, | |||
@@ -121,7 +121,7 @@ void brw_set_src0(struct brw_compile *p, struct brw_instruction *insn, | |||
void gen6_resolve_implied_move(struct brw_compile *p, | |||
struct brw_reg *src, | |||
GLuint msg_reg_nr); | |||
unsigned msg_reg_nr); | |||
/* Helpers for regular instructions: | |||
*/ | |||
@@ -197,97 +197,97 @@ ROUND(RNDE) | |||
*/ | |||
void brw_set_sampler_message(struct brw_compile *p, | |||
struct brw_instruction *insn, | |||
GLuint binding_table_index, | |||
GLuint sampler, | |||
GLuint msg_type, | |||
GLuint response_length, | |||
GLuint msg_length, | |||
GLuint header_present, | |||
GLuint simd_mode, | |||
GLuint return_format); | |||
unsigned binding_table_index, | |||
unsigned sampler, | |||
unsigned msg_type, | |||
unsigned response_length, | |||
unsigned msg_length, | |||
unsigned header_present, | |||
unsigned simd_mode, | |||
unsigned return_format); | |||
void brw_set_dp_read_message(struct brw_compile *p, | |||
struct brw_instruction *insn, | |||
GLuint binding_table_index, | |||
GLuint msg_control, | |||
GLuint msg_type, | |||
GLuint target_cache, | |||
GLuint msg_length, | |||
unsigned binding_table_index, | |||
unsigned msg_control, | |||
unsigned msg_type, | |||
unsigned target_cache, | |||
unsigned msg_length, | |||
bool header_present, | |||
GLuint response_length); | |||
unsigned response_length); | |||
void brw_set_dp_write_message(struct brw_compile *p, | |||
struct brw_instruction *insn, | |||
GLuint binding_table_index, | |||
GLuint msg_control, | |||
GLuint msg_type, | |||
GLuint msg_length, | |||
unsigned binding_table_index, | |||
unsigned msg_control, | |||
unsigned msg_type, | |||
unsigned msg_length, | |||
bool header_present, | |||
GLuint last_render_target, | |||
GLuint response_length, | |||
GLuint end_of_thread, | |||
GLuint send_commit_msg); | |||
unsigned last_render_target, | |||
unsigned response_length, | |||
unsigned end_of_thread, | |||
unsigned send_commit_msg); | |||
void brw_urb_WRITE(struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint msg_reg_nr, | |||
unsigned msg_reg_nr, | |||
struct brw_reg src0, | |||
enum brw_urb_write_flags flags, | |||
GLuint msg_length, | |||
GLuint response_length, | |||
GLuint offset, | |||
GLuint swizzle); | |||
unsigned msg_length, | |||
unsigned response_length, | |||
unsigned offset, | |||
unsigned swizzle); | |||
void brw_ff_sync(struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint msg_reg_nr, | |||
unsigned msg_reg_nr, | |||
struct brw_reg src0, | |||
bool allocate, | |||
GLuint response_length, | |||
unsigned response_length, | |||
bool eot); | |||
void brw_svb_write(struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint msg_reg_nr, | |||
unsigned msg_reg_nr, | |||
struct brw_reg src0, | |||
GLuint binding_table_index, | |||
unsigned binding_table_index, | |||
bool send_commit_msg); | |||
void brw_fb_WRITE(struct brw_compile *p, | |||
int dispatch_width, | |||
GLuint msg_reg_nr, | |||
unsigned msg_reg_nr, | |||
struct brw_reg src0, | |||
GLuint msg_control, | |||
GLuint binding_table_index, | |||
GLuint msg_length, | |||
GLuint response_length, | |||
unsigned msg_control, | |||
unsigned binding_table_index, | |||
unsigned msg_length, | |||
unsigned response_length, | |||
bool eot, | |||
bool header_present); | |||
void brw_SAMPLE(struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint msg_reg_nr, | |||
unsigned msg_reg_nr, | |||
struct brw_reg src0, | |||
GLuint binding_table_index, | |||
GLuint sampler, | |||
GLuint msg_type, | |||
GLuint response_length, | |||
GLuint msg_length, | |||
GLuint header_present, | |||
GLuint simd_mode, | |||
GLuint return_format); | |||
unsigned binding_table_index, | |||
unsigned sampler, | |||
unsigned msg_type, | |||
unsigned response_length, | |||
unsigned msg_length, | |||
unsigned header_present, | |||
unsigned simd_mode, | |||
unsigned return_format); | |||
void brw_math( struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint function, | |||
GLuint msg_reg_nr, | |||
unsigned function, | |||
unsigned msg_reg_nr, | |||
struct brw_reg src, | |||
GLuint data_type, | |||
GLuint precision ); | |||
unsigned data_type, | |||
unsigned precision ); | |||
void brw_math2(struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint function, | |||
unsigned function, | |||
struct brw_reg src0, | |||
struct brw_reg src1); | |||
@@ -301,17 +301,17 @@ void brw_oword_block_read_scratch(struct brw_compile *p, | |||
struct brw_reg dest, | |||
struct brw_reg mrf, | |||
int num_regs, | |||
GLuint offset); | |||
unsigned offset); | |||
void brw_oword_block_write_scratch(struct brw_compile *p, | |||
struct brw_reg mrf, | |||
int num_regs, | |||
GLuint offset); | |||
unsigned offset); | |||
void gen7_block_read_scratch(struct brw_compile *p, | |||
struct brw_reg dest, | |||
int num_regs, | |||
GLuint offset); | |||
unsigned offset); | |||
void brw_shader_time_add(struct brw_compile *p, | |||
struct brw_reg payload, | |||
@@ -321,7 +321,7 @@ void brw_shader_time_add(struct brw_compile *p, | |||
* channel. | |||
*/ | |||
struct brw_instruction *brw_IF(struct brw_compile *p, | |||
GLuint execute_size); | |||
unsigned execute_size); | |||
struct brw_instruction *gen6_IF(struct brw_compile *p, uint32_t conditional, | |||
struct brw_reg src0, struct brw_reg src1); | |||
@@ -331,7 +331,7 @@ void brw_ENDIF(struct brw_compile *p); | |||
/* DO/WHILE loops: | |||
*/ | |||
struct brw_instruction *brw_DO(struct brw_compile *p, | |||
GLuint execute_size); | |||
unsigned execute_size); | |||
struct brw_instruction *brw_WHILE(struct brw_compile *p); | |||
@@ -354,7 +354,7 @@ void brw_WAIT(struct brw_compile *p); | |||
*/ | |||
void brw_CMP(struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint conditional, | |||
unsigned conditional, | |||
struct brw_reg src0, | |||
struct brw_reg src1); | |||
@@ -362,18 +362,18 @@ void | |||
brw_untyped_atomic(struct brw_compile *p, | |||
struct brw_reg dest, | |||
struct brw_reg mrf, | |||
GLuint atomic_op, | |||
GLuint bind_table_index, | |||
GLuint msg_length, | |||
GLuint response_length); | |||
unsigned atomic_op, | |||
unsigned bind_table_index, | |||
unsigned msg_length, | |||
unsigned response_length); | |||
void | |||
brw_untyped_surface_read(struct brw_compile *p, | |||
struct brw_reg dest, | |||
struct brw_reg mrf, | |||
GLuint bind_table_index, | |||
GLuint msg_length, | |||
GLuint response_length); | |||
unsigned bind_table_index, | |||
unsigned msg_length, | |||
unsigned response_length); | |||
/*********************************************************************** | |||
* brw_eu_util.c: | |||
@@ -382,22 +382,22 @@ brw_untyped_surface_read(struct brw_compile *p, | |||
void brw_copy_indirect_to_indirect(struct brw_compile *p, | |||
struct brw_indirect dst_ptr, | |||
struct brw_indirect src_ptr, | |||
GLuint count); | |||
unsigned count); | |||
void brw_copy_from_indirect(struct brw_compile *p, | |||
struct brw_reg dst, | |||
struct brw_indirect ptr, | |||
GLuint count); | |||
unsigned count); | |||
void brw_copy4(struct brw_compile *p, | |||
struct brw_reg dst, | |||
struct brw_reg src, | |||
GLuint count); | |||
unsigned count); | |||
void brw_copy8(struct brw_compile *p, | |||
struct brw_reg dst, | |||
struct brw_reg src, | |||
GLuint count); | |||
unsigned count); | |||
void brw_math_invert( struct brw_compile *p, | |||
struct brw_reg dst, |
@@ -61,7 +61,7 @@ static void guess_execution_size(struct brw_compile *p, | |||
void | |||
gen6_resolve_implied_move(struct brw_compile *p, | |||
struct brw_reg *src, | |||
GLuint msg_reg_nr) | |||
unsigned msg_reg_nr) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
if (brw->gen < 6) | |||
@@ -447,10 +447,10 @@ brw_set_message_descriptor(struct brw_compile *p, | |||
static void brw_set_math_message( struct brw_compile *p, | |||
struct brw_instruction *insn, | |||
GLuint function, | |||
GLuint integer_type, | |||
unsigned function, | |||
unsigned integer_type, | |||
bool low_precision, | |||
GLuint dataType ) | |||
unsigned dataType ) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
unsigned msg_length; | |||
@@ -504,7 +504,7 @@ static void brw_set_math_message( struct brw_compile *p, | |||
static void brw_set_ff_sync_message(struct brw_compile *p, | |||
struct brw_instruction *insn, | |||
bool allocate, | |||
GLuint response_length, | |||
unsigned response_length, | |||
bool end_of_thread) | |||
{ | |||
brw_set_message_descriptor(p, insn, BRW_SFID_URB, | |||
@@ -520,10 +520,10 @@ static void brw_set_ff_sync_message(struct brw_compile *p, | |||
static void brw_set_urb_message( struct brw_compile *p, | |||
struct brw_instruction *insn, | |||
enum brw_urb_write_flags flags, | |||
GLuint msg_length, | |||
GLuint response_length, | |||
GLuint offset, | |||
GLuint swizzle_control ) | |||
unsigned msg_length, | |||
unsigned response_length, | |||
unsigned offset, | |||
unsigned swizzle_control ) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
@@ -563,15 +563,15 @@ static void brw_set_urb_message( struct brw_compile *p, | |||
void | |||
brw_set_dp_write_message(struct brw_compile *p, | |||
struct brw_instruction *insn, | |||
GLuint binding_table_index, | |||
GLuint msg_control, | |||
GLuint msg_type, | |||
GLuint msg_length, | |||
unsigned binding_table_index, | |||
unsigned msg_control, | |||
unsigned msg_type, | |||
unsigned msg_length, | |||
bool header_present, | |||
GLuint last_render_target, | |||
GLuint response_length, | |||
GLuint end_of_thread, | |||
GLuint send_commit_msg) | |||
unsigned last_render_target, | |||
unsigned response_length, | |||
unsigned end_of_thread, | |||
unsigned send_commit_msg) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
unsigned sfid; | |||
@@ -621,13 +621,13 @@ brw_set_dp_write_message(struct brw_compile *p, | |||
void | |||
brw_set_dp_read_message(struct brw_compile *p, | |||
struct brw_instruction *insn, | |||
GLuint binding_table_index, | |||
GLuint msg_control, | |||
GLuint msg_type, | |||
GLuint target_cache, | |||
GLuint msg_length, | |||
unsigned binding_table_index, | |||
unsigned msg_control, | |||
unsigned msg_type, | |||
unsigned target_cache, | |||
unsigned msg_length, | |||
bool header_present, | |||
GLuint response_length) | |||
unsigned response_length) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
unsigned sfid; | |||
@@ -678,14 +678,14 @@ brw_set_dp_read_message(struct brw_compile *p, | |||
void | |||
brw_set_sampler_message(struct brw_compile *p, | |||
struct brw_instruction *insn, | |||
GLuint binding_table_index, | |||
GLuint sampler, | |||
GLuint msg_type, | |||
GLuint response_length, | |||
GLuint msg_length, | |||
GLuint header_present, | |||
GLuint simd_mode, | |||
GLuint return_format) | |||
unsigned binding_table_index, | |||
unsigned sampler, | |||
unsigned msg_type, | |||
unsigned response_length, | |||
unsigned msg_length, | |||
unsigned header_present, | |||
unsigned simd_mode, | |||
unsigned return_format) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
@@ -717,7 +717,7 @@ brw_set_sampler_message(struct brw_compile *p, | |||
#define next_insn brw_next_insn | |||
struct brw_instruction * | |||
brw_next_insn(struct brw_compile *p, GLuint opcode) | |||
brw_next_insn(struct brw_compile *p, unsigned opcode) | |||
{ | |||
struct brw_instruction *insn; | |||
@@ -748,7 +748,7 @@ brw_next_insn(struct brw_compile *p, GLuint opcode) | |||
} | |||
static struct brw_instruction *brw_alu1( struct brw_compile *p, | |||
GLuint opcode, | |||
unsigned opcode, | |||
struct brw_reg dest, | |||
struct brw_reg src ) | |||
{ | |||
@@ -759,7 +759,7 @@ static struct brw_instruction *brw_alu1( struct brw_compile *p, | |||
} | |||
static struct brw_instruction *brw_alu2(struct brw_compile *p, | |||
GLuint opcode, | |||
unsigned opcode, | |||
struct brw_reg dest, | |||
struct brw_reg src0, | |||
struct brw_reg src1 ) | |||
@@ -783,7 +783,7 @@ get_3src_subreg_nr(struct brw_reg reg) | |||
} | |||
static struct brw_instruction *brw_alu3(struct brw_compile *p, | |||
GLuint opcode, | |||
unsigned opcode, | |||
struct brw_reg dest, | |||
struct brw_reg src0, | |||
struct brw_reg src1, | |||
@@ -1144,7 +1144,7 @@ get_inner_do_insn(struct brw_compile *p) | |||
* popped off. If the stack is now empty, normal execution resumes. | |||
*/ | |||
struct brw_instruction * | |||
brw_IF(struct brw_compile *p, GLuint execute_size) | |||
brw_IF(struct brw_compile *p, unsigned execute_size) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
struct brw_instruction *insn; | |||
@@ -1546,7 +1546,7 @@ struct brw_instruction *gen6_HALT(struct brw_compile *p) | |||
* For gen6, there's no more mask stack, so no need for DO. WHILE | |||
* just points back to the first instruction of the loop. | |||
*/ | |||
struct brw_instruction *brw_DO(struct brw_compile *p, GLuint execute_size) | |||
struct brw_instruction *brw_DO(struct brw_compile *p, unsigned execute_size) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
@@ -1608,7 +1608,7 @@ struct brw_instruction *brw_WHILE(struct brw_compile *p) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
struct brw_instruction *insn, *do_insn; | |||
GLuint br = 1; | |||
unsigned br = 1; | |||
if (brw->gen >= 5) | |||
br = 2; | |||
@@ -1675,7 +1675,7 @@ void brw_land_fwd_jump(struct brw_compile *p, int jmp_insn_idx) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
struct brw_instruction *jmp_insn = &p->store[jmp_insn_idx]; | |||
GLuint jmpi = 1; | |||
unsigned jmpi = 1; | |||
if (brw->gen >= 5) | |||
jmpi = 2; | |||
@@ -1694,7 +1694,7 @@ void brw_land_fwd_jump(struct brw_compile *p, int jmp_insn_idx) | |||
*/ | |||
void brw_CMP(struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint conditional, | |||
unsigned conditional, | |||
struct brw_reg src0, | |||
struct brw_reg src1) | |||
{ | |||
@@ -1758,11 +1758,11 @@ void brw_WAIT (struct brw_compile *p) | |||
*/ | |||
void brw_math( struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint function, | |||
GLuint msg_reg_nr, | |||
unsigned function, | |||
unsigned msg_reg_nr, | |||
struct brw_reg src, | |||
GLuint data_type, | |||
GLuint precision ) | |||
unsigned data_type, | |||
unsigned precision ) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
@@ -1823,7 +1823,7 @@ void brw_math( struct brw_compile *p, | |||
*/ | |||
void brw_math2(struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint function, | |||
unsigned function, | |||
struct brw_reg src0, | |||
struct brw_reg src1) | |||
{ | |||
@@ -1880,7 +1880,7 @@ void brw_math2(struct brw_compile *p, | |||
void brw_oword_block_write_scratch(struct brw_compile *p, | |||
struct brw_reg mrf, | |||
int num_regs, | |||
GLuint offset) | |||
unsigned offset) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
uint32_t msg_control, msg_type; | |||
@@ -1992,7 +1992,7 @@ brw_oword_block_read_scratch(struct brw_compile *p, | |||
struct brw_reg dest, | |||
struct brw_reg mrf, | |||
int num_regs, | |||
GLuint offset) | |||
unsigned offset) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
uint32_t msg_control; | |||
@@ -2059,7 +2059,7 @@ void | |||
gen7_block_read_scratch(struct brw_compile *p, | |||
struct brw_reg dest, | |||
int num_regs, | |||
GLuint offset) | |||
unsigned offset) | |||
{ | |||
dest = retype(dest, BRW_REGISTER_TYPE_UW); | |||
@@ -2159,18 +2159,18 @@ void brw_oword_block_read(struct brw_compile *p, | |||
void brw_fb_WRITE(struct brw_compile *p, | |||
int dispatch_width, | |||
GLuint msg_reg_nr, | |||
unsigned msg_reg_nr, | |||
struct brw_reg src0, | |||
GLuint msg_control, | |||
GLuint binding_table_index, | |||
GLuint msg_length, | |||
GLuint response_length, | |||
unsigned msg_control, | |||
unsigned binding_table_index, | |||
unsigned msg_length, | |||
unsigned response_length, | |||
bool eot, | |||
bool header_present) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
struct brw_instruction *insn; | |||
GLuint msg_type; | |||
unsigned msg_type; | |||
struct brw_reg dest; | |||
if (dispatch_width == 16) | |||
@@ -2221,16 +2221,16 @@ void brw_fb_WRITE(struct brw_compile *p, | |||
*/ | |||
void brw_SAMPLE(struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint msg_reg_nr, | |||
unsigned msg_reg_nr, | |||
struct brw_reg src0, | |||
GLuint binding_table_index, | |||
GLuint sampler, | |||
GLuint msg_type, | |||
GLuint response_length, | |||
GLuint msg_length, | |||
GLuint header_present, | |||
GLuint simd_mode, | |||
GLuint return_format) | |||
unsigned binding_table_index, | |||
unsigned sampler, | |||
unsigned msg_type, | |||
unsigned response_length, | |||
unsigned msg_length, | |||
unsigned header_present, | |||
unsigned simd_mode, | |||
unsigned return_format) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
struct brw_instruction *insn; | |||
@@ -2278,13 +2278,13 @@ void brw_SAMPLE(struct brw_compile *p, | |||
*/ | |||
void brw_urb_WRITE(struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint msg_reg_nr, | |||
unsigned msg_reg_nr, | |||
struct brw_reg src0, | |||
enum brw_urb_write_flags flags, | |||
GLuint msg_length, | |||
GLuint response_length, | |||
GLuint offset, | |||
GLuint swizzle) | |||
unsigned msg_length, | |||
unsigned response_length, | |||
unsigned offset, | |||
unsigned swizzle) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
struct brw_instruction *insn; | |||
@@ -2462,10 +2462,10 @@ brw_set_uip_jip(struct brw_compile *p) | |||
void brw_ff_sync(struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint msg_reg_nr, | |||
unsigned msg_reg_nr, | |||
struct brw_reg src0, | |||
bool allocate, | |||
GLuint response_length, | |||
unsigned response_length, | |||
bool eot) | |||
{ | |||
struct brw_context *brw = p->brw; | |||
@@ -2502,9 +2502,9 @@ void brw_ff_sync(struct brw_compile *p, | |||
void | |||
brw_svb_write(struct brw_compile *p, | |||
struct brw_reg dest, | |||
GLuint msg_reg_nr, | |||
unsigned msg_reg_nr, | |||
struct brw_reg src0, | |||
GLuint binding_table_index, | |||
unsigned binding_table_index, | |||
bool send_commit_msg) | |||
{ | |||
struct brw_instruction *insn; | |||
@@ -2530,10 +2530,10 @@ brw_svb_write(struct brw_compile *p, | |||
static void | |||
brw_set_dp_untyped_atomic_message(struct brw_compile *p, | |||
struct brw_instruction *insn, | |||
GLuint atomic_op, | |||
GLuint bind_table_index, | |||
GLuint msg_length, | |||
GLuint response_length, | |||
unsigned atomic_op, | |||
unsigned bind_table_index, | |||
unsigned msg_length, | |||
unsigned response_length, | |||
bool header_present) | |||
{ | |||
if (p->brw->is_haswell) { | |||
@@ -2575,10 +2575,10 @@ void | |||
brw_untyped_atomic(struct brw_compile *p, | |||
struct brw_reg dest, | |||
struct brw_reg mrf, | |||
GLuint atomic_op, | |||
GLuint bind_table_index, | |||
GLuint msg_length, | |||
GLuint response_length) { | |||
unsigned atomic_op, | |||
unsigned bind_table_index, | |||
unsigned msg_length, | |||
unsigned response_length) { | |||
struct brw_instruction *insn = brw_next_insn(p, BRW_OPCODE_SEND); | |||
brw_set_dest(p, insn, retype(dest, BRW_REGISTER_TYPE_UD)); | |||
@@ -2592,9 +2592,9 @@ brw_untyped_atomic(struct brw_compile *p, | |||
static void | |||
brw_set_dp_untyped_surface_read_message(struct brw_compile *p, | |||
struct brw_instruction *insn, | |||
GLuint bind_table_index, | |||
GLuint msg_length, | |||
GLuint response_length, | |||
unsigned bind_table_index, | |||
unsigned msg_length, | |||
unsigned response_length, | |||
bool header_present) | |||
{ | |||
const unsigned dispatch_width = | |||
@@ -2632,9 +2632,9 @@ void | |||
brw_untyped_surface_read(struct brw_compile *p, | |||
struct brw_reg dest, | |||
struct brw_reg mrf, | |||
GLuint bind_table_index, | |||
GLuint msg_length, | |||
GLuint response_length) | |||
unsigned bind_table_index, | |||
unsigned msg_length, | |||
unsigned response_length) | |||
{ | |||
struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND); | |||
@@ -53,16 +53,16 @@ void brw_math_invert( struct brw_compile *p, | |||
void brw_copy4(struct brw_compile *p, | |||
struct brw_reg dst, | |||
struct brw_reg src, | |||
GLuint count) | |||
unsigned count) | |||
{ | |||
GLuint i; | |||
unsigned i; | |||
dst = vec4(dst); | |||
src = vec4(src); | |||
for (i = 0; i < count; i++) | |||
{ | |||
GLuint delta = i*32; | |||
unsigned delta = i*32; | |||
brw_MOV(p, byte_offset(dst, delta), byte_offset(src, delta)); | |||
brw_MOV(p, byte_offset(dst, delta+16), byte_offset(src, delta+16)); | |||
} | |||
@@ -72,16 +72,16 @@ void brw_copy4(struct brw_compile *p, | |||
void brw_copy8(struct brw_compile *p, | |||
struct brw_reg dst, | |||
struct brw_reg src, | |||
GLuint count) | |||
unsigned count) | |||
{ | |||
GLuint i; | |||
unsigned i; | |||
dst = vec8(dst); | |||
src = vec8(src); | |||
for (i = 0; i < count; i++) | |||
{ | |||
GLuint delta = i*32; | |||
unsigned delta = i*32; | |||
brw_MOV(p, byte_offset(dst, delta), byte_offset(src, delta)); | |||
} | |||
} | |||
@@ -90,13 +90,13 @@ void brw_copy8(struct brw_compile *p, | |||
void brw_copy_indirect_to_indirect(struct brw_compile *p, | |||
struct brw_indirect dst_ptr, | |||
struct brw_indirect src_ptr, | |||
GLuint count) | |||
unsigned count) | |||
{ | |||
GLuint i; | |||
unsigned i; | |||
for (i = 0; i < count; i++) | |||
{ | |||
GLuint delta = i*32; | |||
unsigned delta = i*32; | |||
brw_MOV(p, deref_4f(dst_ptr, delta), deref_4f(src_ptr, delta)); | |||
brw_MOV(p, deref_4f(dst_ptr, delta+16), deref_4f(src_ptr, delta+16)); | |||
} | |||
@@ -106,15 +106,15 @@ void brw_copy_indirect_to_indirect(struct brw_compile *p, | |||
void brw_copy_from_indirect(struct brw_compile *p, | |||
struct brw_reg dst, | |||
struct brw_indirect ptr, | |||
GLuint count) | |||
unsigned count) | |||
{ | |||
GLuint i; | |||
unsigned i; | |||
dst = vec4(dst); | |||
for (i = 0; i < count; i++) | |||
{ | |||
GLuint delta = i*32; | |||
unsigned delta = i*32; | |||
brw_MOV(p, byte_offset(dst, delta), deref_4f(ptr, delta)); | |||
brw_MOV(p, byte_offset(dst, delta+16), deref_4f(ptr, delta+16)); | |||
} |