mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-07 16:06:25 +00:00
assembler: Don't use GL types
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' assembler/*.[ch] Drop the GL types here, they don't bring anything to the table. For instance, GLuint has no guarantee to be 32 bits, so it does not make too much sense to use it in structure describing hardware tables and opcodes. Of course, some bikeshedding can be applied to use uin32_t instead, I figured that some of the GLuint are used without size constraints, so a sed with uint32_t did not seem the right thing to do. On top of that initial sed, one bothered enough could change the structures with size constraints to actually use uint32_t. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
parent
2d8b92a24b
commit
f0365d40b4
@ -428,7 +428,7 @@ static int pad (FILE *f, int c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int control (FILE *file, const char *name, const char * const ctrl[],
|
static int control (FILE *file, const char *name, const char * const ctrl[],
|
||||||
GLuint id, int *space)
|
unsigned id, int *space)
|
||||||
{
|
{
|
||||||
if (!ctrl[id]) {
|
if (!ctrl[id]) {
|
||||||
fprintf (file, "*** invalid %s value %d ",
|
fprintf (file, "*** invalid %s value %d ",
|
||||||
@ -456,7 +456,7 @@ static int print_opcode (FILE *file, int id)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
int err = 0;
|
||||||
|
|
||||||
@ -585,7 +585,7 @@ static int dest_3src (FILE *file, struct brw_instruction *inst)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int src_align1_region (FILE *file,
|
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;
|
int err = 0;
|
||||||
string (file, "<");
|
string (file, "<");
|
||||||
@ -598,9 +598,9 @@ static int src_align1_region (FILE *file,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int src_da1 (FILE *file, GLuint type, GLuint _reg_file,
|
static int src_da1 (FILE *file, unsigned type, unsigned _reg_file,
|
||||||
GLuint _vert_stride, GLuint _width, GLuint _horiz_stride,
|
unsigned _vert_stride, unsigned _width, unsigned _horiz_stride,
|
||||||
GLuint reg_num, GLuint sub_reg_num, GLuint __abs, GLuint _negate)
|
unsigned reg_num, unsigned sub_reg_num, unsigned __abs, unsigned _negate)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
err |= control (file, "negate", negate, _negate, NULL);
|
err |= control (file, "negate", negate, _negate, NULL);
|
||||||
@ -617,16 +617,16 @@ static int src_da1 (FILE *file, GLuint type, GLuint _reg_file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int src_ia1 (FILE *file,
|
static int src_ia1 (FILE *file,
|
||||||
GLuint type,
|
unsigned type,
|
||||||
GLuint _reg_file,
|
unsigned _reg_file,
|
||||||
GLint _addr_imm,
|
int _addr_imm,
|
||||||
GLuint _addr_subreg_nr,
|
unsigned _addr_subreg_nr,
|
||||||
GLuint _negate,
|
unsigned _negate,
|
||||||
GLuint __abs,
|
unsigned __abs,
|
||||||
GLuint _addr_mode,
|
unsigned _addr_mode,
|
||||||
GLuint _horiz_stride,
|
unsigned _horiz_stride,
|
||||||
GLuint _width,
|
unsigned _width,
|
||||||
GLuint _vert_stride)
|
unsigned _vert_stride)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
err |= control (file, "negate", negate, _negate, NULL);
|
err |= control (file, "negate", negate, _negate, NULL);
|
||||||
@ -644,17 +644,17 @@ static int src_ia1 (FILE *file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int src_da16 (FILE *file,
|
static int src_da16 (FILE *file,
|
||||||
GLuint _reg_type,
|
unsigned _reg_type,
|
||||||
GLuint _reg_file,
|
unsigned _reg_file,
|
||||||
GLuint _vert_stride,
|
unsigned _vert_stride,
|
||||||
GLuint _reg_nr,
|
unsigned _reg_nr,
|
||||||
GLuint _subreg_nr,
|
unsigned _subreg_nr,
|
||||||
GLuint __abs,
|
unsigned __abs,
|
||||||
GLuint _negate,
|
unsigned _negate,
|
||||||
GLuint swz_x,
|
unsigned swz_x,
|
||||||
GLuint swz_y,
|
unsigned swz_y,
|
||||||
GLuint swz_z,
|
unsigned swz_z,
|
||||||
GLuint swz_w)
|
unsigned swz_w)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
err |= control (file, "negate", negate, _negate, NULL);
|
err |= control (file, "negate", negate, _negate, NULL);
|
||||||
@ -703,10 +703,10 @@ static int src_da16 (FILE *file,
|
|||||||
static int src0_3src (FILE *file, struct brw_instruction *inst)
|
static int src0_3src (FILE *file, struct brw_instruction *inst)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
GLuint swz_x = (inst->bits2.da3src.src0_swizzle >> 0) & 0x3;
|
unsigned swz_x = (inst->bits2.da3src.src0_swizzle >> 0) & 0x3;
|
||||||
GLuint swz_y = (inst->bits2.da3src.src0_swizzle >> 2) & 0x3;
|
unsigned swz_y = (inst->bits2.da3src.src0_swizzle >> 2) & 0x3;
|
||||||
GLuint swz_z = (inst->bits2.da3src.src0_swizzle >> 4) & 0x3;
|
unsigned swz_z = (inst->bits2.da3src.src0_swizzle >> 4) & 0x3;
|
||||||
GLuint swz_w = (inst->bits2.da3src.src0_swizzle >> 6) & 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, "negate", negate, inst->bits1.da3src.src0_negate, NULL);
|
||||||
err |= control (file, "abs", _abs, inst->bits1.da3src.src0_abs, NULL);
|
err |= control (file, "abs", _abs, inst->bits1.da3src.src0_abs, NULL);
|
||||||
@ -751,11 +751,11 @@ static int src0_3src (FILE *file, struct brw_instruction *inst)
|
|||||||
static int src1_3src (FILE *file, struct brw_instruction *inst)
|
static int src1_3src (FILE *file, struct brw_instruction *inst)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
GLuint swz_x = (inst->bits2.da3src.src1_swizzle >> 0) & 0x3;
|
unsigned swz_x = (inst->bits2.da3src.src1_swizzle >> 0) & 0x3;
|
||||||
GLuint swz_y = (inst->bits2.da3src.src1_swizzle >> 2) & 0x3;
|
unsigned swz_y = (inst->bits2.da3src.src1_swizzle >> 2) & 0x3;
|
||||||
GLuint swz_z = (inst->bits2.da3src.src1_swizzle >> 4) & 0x3;
|
unsigned swz_z = (inst->bits2.da3src.src1_swizzle >> 4) & 0x3;
|
||||||
GLuint swz_w = (inst->bits2.da3src.src1_swizzle >> 6) & 0x3;
|
unsigned swz_w = (inst->bits2.da3src.src1_swizzle >> 6) & 0x3;
|
||||||
GLuint src1_subreg_nr = (inst->bits2.da3src.src1_subreg_nr_low |
|
unsigned src1_subreg_nr = (inst->bits2.da3src.src1_subreg_nr_low |
|
||||||
(inst->bits3.da3src.src1_subreg_nr_high << 2));
|
(inst->bits3.da3src.src1_subreg_nr_high << 2));
|
||||||
|
|
||||||
err |= control (file, "negate", negate, inst->bits1.da3src.src1_negate,
|
err |= control (file, "negate", negate, inst->bits1.da3src.src1_negate,
|
||||||
@ -804,10 +804,10 @@ static int src1_3src (FILE *file, struct brw_instruction *inst)
|
|||||||
static int src2_3src (FILE *file, struct brw_instruction *inst)
|
static int src2_3src (FILE *file, struct brw_instruction *inst)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
GLuint swz_x = (inst->bits3.da3src.src2_swizzle >> 0) & 0x3;
|
unsigned swz_x = (inst->bits3.da3src.src2_swizzle >> 0) & 0x3;
|
||||||
GLuint swz_y = (inst->bits3.da3src.src2_swizzle >> 2) & 0x3;
|
unsigned swz_y = (inst->bits3.da3src.src2_swizzle >> 2) & 0x3;
|
||||||
GLuint swz_z = (inst->bits3.da3src.src2_swizzle >> 4) & 0x3;
|
unsigned swz_z = (inst->bits3.da3src.src2_swizzle >> 4) & 0x3;
|
||||||
GLuint swz_w = (inst->bits3.da3src.src2_swizzle >> 6) & 0x3;
|
unsigned swz_w = (inst->bits3.da3src.src2_swizzle >> 6) & 0x3;
|
||||||
|
|
||||||
err |= control (file, "negate", negate, inst->bits1.da3src.src2_negate,
|
err |= control (file, "negate", negate, inst->bits1.da3src.src2_negate,
|
||||||
NULL);
|
NULL);
|
||||||
@ -851,7 +851,7 @@ static int src2_3src (FILE *file, struct brw_instruction *inst)
|
|||||||
return err;
|
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) {
|
switch (type) {
|
||||||
case BRW_REGISTER_TYPE_UD:
|
case BRW_REGISTER_TYPE_UD:
|
||||||
format (file, "0x%08xUD", inst->bits3.ud);
|
format (file, "0x%08xUD", inst->bits3.ud);
|
||||||
|
@ -65,7 +65,7 @@ brw_swap_cmod(uint32_t cmod)
|
|||||||
/* How does predicate control work when execution_size != 8? Do I
|
/* How does predicate control work when execution_size != 8? Do I
|
||||||
* need to test/set for 0xffff when execution_size is 16?
|
* 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;
|
p->current->header.predicate_control = BRW_PREDICATE_NONE;
|
||||||
|
|
||||||
@ -81,7 +81,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;
|
p->current->header.predicate_control = pc;
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ void brw_set_predicate_inverse(struct brw_compile *p, bool predicate_inverse)
|
|||||||
p->current->header.predicate_inverse = 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;
|
p->current->header.destreg__conditionalmod = conditional;
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ void brw_set_flag_reg(struct brw_compile *p, int reg, int subreg)
|
|||||||
p->current->bits2.da1.flag_subreg_nr = 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;
|
p->current->header.access_mode = access_mode;
|
||||||
}
|
}
|
||||||
@ -144,7 +144,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;
|
p->current->header.mask_control = value;
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ void brw_set_saturate( struct brw_compile *p, bool enable )
|
|||||||
p->current->header.saturate = 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->intel.gen >= 6)
|
if (p->brw->intel.gen >= 6)
|
||||||
p->current->header.acc_wr_control = value;
|
p->current->header.acc_wr_control = value;
|
||||||
@ -219,13 +219,13 @@ brw_init_compile(struct brw_context *brw, struct brw_compile *p, void *mem_ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const GLuint *brw_get_program( struct brw_compile *p,
|
const unsigned *brw_get_program( struct brw_compile *p,
|
||||||
GLuint *sz )
|
unsigned *sz )
|
||||||
{
|
{
|
||||||
brw_compact_instructions(p);
|
brw_compact_instructions(p);
|
||||||
|
|
||||||
*sz = p->next_insn_offset;
|
*sz = p->next_insn_offset;
|
||||||
return (const GLuint *)p->store;
|
return (const unsigned *)p->store;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -49,7 +49,7 @@ extern "C" {
|
|||||||
struct brw_compile {
|
struct brw_compile {
|
||||||
struct brw_instruction *store;
|
struct brw_instruction *store;
|
||||||
int store_size;
|
int store_size;
|
||||||
GLuint nr_insn;
|
unsigned nr_insn;
|
||||||
unsigned int next_insn_offset;
|
unsigned int next_insn_offset;
|
||||||
|
|
||||||
void *mem_ctx;
|
void *mem_ctx;
|
||||||
@ -60,7 +60,7 @@ struct brw_compile {
|
|||||||
bool compressed_stack[BRW_EU_MAX_INSN_STACK];
|
bool compressed_stack[BRW_EU_MAX_INSN_STACK];
|
||||||
struct brw_instruction *current;
|
struct brw_instruction *current;
|
||||||
|
|
||||||
GLuint flag_value;
|
unsigned flag_value;
|
||||||
bool single_program_flow;
|
bool single_program_flow;
|
||||||
bool compressed;
|
bool compressed;
|
||||||
struct brw_context *brw;
|
struct brw_context *brw;
|
||||||
@ -98,23 +98,23 @@ static inline struct brw_instruction *current_insn( struct brw_compile *p)
|
|||||||
|
|
||||||
void brw_pop_insn_state( struct brw_compile *p );
|
void brw_pop_insn_state( struct brw_compile *p );
|
||||||
void brw_push_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_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_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_flag_value( struct brw_compile *p, unsigned value );
|
||||||
void brw_set_predicate_control( struct brw_compile *p, GLuint pc );
|
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_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_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 brw_init_compile(struct brw_context *, struct brw_compile *p,
|
||||||
void *mem_ctx);
|
void *mem_ctx);
|
||||||
void brw_dump_compile(struct brw_compile *p, FILE *out, int start, int end);
|
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,
|
void brw_set_dest(struct brw_compile *p, struct brw_instruction *insn,
|
||||||
struct brw_reg dest);
|
struct brw_reg dest);
|
||||||
void brw_set_src0(struct brw_compile *p, struct brw_instruction *insn,
|
void brw_set_src0(struct brw_compile *p, struct brw_instruction *insn,
|
||||||
@ -122,7 +122,7 @@ void brw_set_src0(struct brw_compile *p, struct brw_instruction *insn,
|
|||||||
|
|
||||||
void gen6_resolve_implied_move(struct brw_compile *p,
|
void gen6_resolve_implied_move(struct brw_compile *p,
|
||||||
struct brw_reg *src,
|
struct brw_reg *src,
|
||||||
GLuint msg_reg_nr);
|
unsigned msg_reg_nr);
|
||||||
|
|
||||||
/* Helpers for regular instructions:
|
/* Helpers for regular instructions:
|
||||||
*/
|
*/
|
||||||
@ -188,101 +188,101 @@ ROUND(RNDE)
|
|||||||
*/
|
*/
|
||||||
void brw_set_sampler_message(struct brw_compile *p,
|
void brw_set_sampler_message(struct brw_compile *p,
|
||||||
struct brw_instruction *insn,
|
struct brw_instruction *insn,
|
||||||
GLuint binding_table_index,
|
unsigned binding_table_index,
|
||||||
GLuint sampler,
|
unsigned sampler,
|
||||||
GLuint msg_type,
|
unsigned msg_type,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
GLuint msg_length,
|
unsigned msg_length,
|
||||||
GLuint header_present,
|
unsigned header_present,
|
||||||
GLuint simd_mode,
|
unsigned simd_mode,
|
||||||
GLuint return_format);
|
unsigned return_format);
|
||||||
|
|
||||||
void brw_set_dp_read_message(struct brw_compile *p,
|
void brw_set_dp_read_message(struct brw_compile *p,
|
||||||
struct brw_instruction *insn,
|
struct brw_instruction *insn,
|
||||||
GLuint binding_table_index,
|
unsigned binding_table_index,
|
||||||
GLuint msg_control,
|
unsigned msg_control,
|
||||||
GLuint msg_type,
|
unsigned msg_type,
|
||||||
GLuint target_cache,
|
unsigned target_cache,
|
||||||
GLuint msg_length,
|
unsigned msg_length,
|
||||||
bool header_present,
|
bool header_present,
|
||||||
GLuint response_length);
|
unsigned response_length);
|
||||||
|
|
||||||
void brw_set_dp_write_message(struct brw_compile *p,
|
void brw_set_dp_write_message(struct brw_compile *p,
|
||||||
struct brw_instruction *insn,
|
struct brw_instruction *insn,
|
||||||
GLuint binding_table_index,
|
unsigned binding_table_index,
|
||||||
GLuint msg_control,
|
unsigned msg_control,
|
||||||
GLuint msg_type,
|
unsigned msg_type,
|
||||||
GLuint msg_length,
|
unsigned msg_length,
|
||||||
bool header_present,
|
bool header_present,
|
||||||
GLuint last_render_target,
|
unsigned last_render_target,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
GLuint end_of_thread,
|
unsigned end_of_thread,
|
||||||
GLuint send_commit_msg);
|
unsigned send_commit_msg);
|
||||||
|
|
||||||
void brw_urb_WRITE(struct brw_compile *p,
|
void brw_urb_WRITE(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
bool allocate,
|
bool allocate,
|
||||||
bool used,
|
bool used,
|
||||||
GLuint msg_length,
|
unsigned msg_length,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
bool eot,
|
bool eot,
|
||||||
bool writes_complete,
|
bool writes_complete,
|
||||||
GLuint offset,
|
unsigned offset,
|
||||||
GLuint swizzle);
|
unsigned swizzle);
|
||||||
|
|
||||||
void brw_ff_sync(struct brw_compile *p,
|
void brw_ff_sync(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
bool allocate,
|
bool allocate,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
bool eot);
|
bool eot);
|
||||||
|
|
||||||
void brw_svb_write(struct brw_compile *p,
|
void brw_svb_write(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
GLuint binding_table_index,
|
unsigned binding_table_index,
|
||||||
bool send_commit_msg);
|
bool send_commit_msg);
|
||||||
|
|
||||||
void brw_fb_WRITE(struct brw_compile *p,
|
void brw_fb_WRITE(struct brw_compile *p,
|
||||||
int dispatch_width,
|
int dispatch_width,
|
||||||
GLuint msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
GLuint msg_control,
|
unsigned msg_control,
|
||||||
GLuint binding_table_index,
|
unsigned binding_table_index,
|
||||||
GLuint msg_length,
|
unsigned msg_length,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
bool eot,
|
bool eot,
|
||||||
bool header_present);
|
bool header_present);
|
||||||
|
|
||||||
void brw_SAMPLE(struct brw_compile *p,
|
void brw_SAMPLE(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
GLuint binding_table_index,
|
unsigned binding_table_index,
|
||||||
GLuint sampler,
|
unsigned sampler,
|
||||||
GLuint writemask,
|
unsigned writemask,
|
||||||
GLuint msg_type,
|
unsigned msg_type,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
GLuint msg_length,
|
unsigned msg_length,
|
||||||
GLuint header_present,
|
unsigned header_present,
|
||||||
GLuint simd_mode,
|
unsigned simd_mode,
|
||||||
GLuint return_format);
|
unsigned return_format);
|
||||||
|
|
||||||
void brw_math( struct brw_compile *p,
|
void brw_math( struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint function,
|
unsigned function,
|
||||||
GLuint msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
struct brw_reg src,
|
struct brw_reg src,
|
||||||
GLuint data_type,
|
unsigned data_type,
|
||||||
GLuint precision );
|
unsigned precision );
|
||||||
|
|
||||||
void brw_math2(struct brw_compile *p,
|
void brw_math2(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint function,
|
unsigned function,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
struct brw_reg src1);
|
struct brw_reg src1);
|
||||||
|
|
||||||
@ -296,12 +296,12 @@ void brw_oword_block_read_scratch(struct brw_compile *p,
|
|||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
struct brw_reg mrf,
|
struct brw_reg mrf,
|
||||||
int num_regs,
|
int num_regs,
|
||||||
GLuint offset);
|
unsigned offset);
|
||||||
|
|
||||||
void brw_oword_block_write_scratch(struct brw_compile *p,
|
void brw_oword_block_write_scratch(struct brw_compile *p,
|
||||||
struct brw_reg mrf,
|
struct brw_reg mrf,
|
||||||
int num_regs,
|
int num_regs,
|
||||||
GLuint offset);
|
unsigned offset);
|
||||||
|
|
||||||
void brw_shader_time_add(struct brw_compile *p,
|
void brw_shader_time_add(struct brw_compile *p,
|
||||||
int mrf,
|
int mrf,
|
||||||
@ -311,7 +311,7 @@ void brw_shader_time_add(struct brw_compile *p,
|
|||||||
* channel.
|
* channel.
|
||||||
*/
|
*/
|
||||||
struct brw_instruction *brw_IF(struct brw_compile *p,
|
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_instruction *gen6_IF(struct brw_compile *p, uint32_t conditional,
|
||||||
struct brw_reg src0, struct brw_reg src1);
|
struct brw_reg src0, struct brw_reg src1);
|
||||||
|
|
||||||
@ -321,7 +321,7 @@ void brw_ENDIF(struct brw_compile *p);
|
|||||||
/* DO/WHILE loops:
|
/* DO/WHILE loops:
|
||||||
*/
|
*/
|
||||||
struct brw_instruction *brw_DO(struct brw_compile *p,
|
struct brw_instruction *brw_DO(struct brw_compile *p,
|
||||||
GLuint execute_size);
|
unsigned execute_size);
|
||||||
|
|
||||||
struct brw_instruction *brw_WHILE(struct brw_compile *p);
|
struct brw_instruction *brw_WHILE(struct brw_compile *p);
|
||||||
|
|
||||||
@ -344,7 +344,7 @@ void brw_WAIT(struct brw_compile *p);
|
|||||||
*/
|
*/
|
||||||
void brw_CMP(struct brw_compile *p,
|
void brw_CMP(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint conditional,
|
unsigned conditional,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
struct brw_reg src1);
|
struct brw_reg src1);
|
||||||
|
|
||||||
@ -355,22 +355,22 @@ void brw_CMP(struct brw_compile *p,
|
|||||||
void brw_copy_indirect_to_indirect(struct brw_compile *p,
|
void brw_copy_indirect_to_indirect(struct brw_compile *p,
|
||||||
struct brw_indirect dst_ptr,
|
struct brw_indirect dst_ptr,
|
||||||
struct brw_indirect src_ptr,
|
struct brw_indirect src_ptr,
|
||||||
GLuint count);
|
unsigned count);
|
||||||
|
|
||||||
void brw_copy_from_indirect(struct brw_compile *p,
|
void brw_copy_from_indirect(struct brw_compile *p,
|
||||||
struct brw_reg dst,
|
struct brw_reg dst,
|
||||||
struct brw_indirect ptr,
|
struct brw_indirect ptr,
|
||||||
GLuint count);
|
unsigned count);
|
||||||
|
|
||||||
void brw_copy4(struct brw_compile *p,
|
void brw_copy4(struct brw_compile *p,
|
||||||
struct brw_reg dst,
|
struct brw_reg dst,
|
||||||
struct brw_reg src,
|
struct brw_reg src,
|
||||||
GLuint count);
|
unsigned count);
|
||||||
|
|
||||||
void brw_copy8(struct brw_compile *p,
|
void brw_copy8(struct brw_compile *p,
|
||||||
struct brw_reg dst,
|
struct brw_reg dst,
|
||||||
struct brw_reg src,
|
struct brw_reg src,
|
||||||
GLuint count);
|
unsigned count);
|
||||||
|
|
||||||
void brw_math_invert( struct brw_compile *p,
|
void brw_math_invert( struct brw_compile *p,
|
||||||
struct brw_reg dst,
|
struct brw_reg dst,
|
||||||
|
@ -62,7 +62,7 @@ static void guess_execution_size(struct brw_compile *p,
|
|||||||
void
|
void
|
||||||
gen6_resolve_implied_move(struct brw_compile *p,
|
gen6_resolve_implied_move(struct brw_compile *p,
|
||||||
struct brw_reg *src,
|
struct brw_reg *src,
|
||||||
GLuint msg_reg_nr)
|
unsigned msg_reg_nr)
|
||||||
{
|
{
|
||||||
struct intel_context *intel = &p->brw->intel;
|
struct intel_context *intel = &p->brw->intel;
|
||||||
if (intel->gen < 6)
|
if (intel->gen < 6)
|
||||||
@ -478,10 +478,10 @@ brw_set_message_descriptor(struct brw_compile *p,
|
|||||||
|
|
||||||
static void brw_set_math_message( struct brw_compile *p,
|
static void brw_set_math_message( struct brw_compile *p,
|
||||||
struct brw_instruction *insn,
|
struct brw_instruction *insn,
|
||||||
GLuint function,
|
unsigned function,
|
||||||
GLuint integer_type,
|
unsigned integer_type,
|
||||||
bool low_precision,
|
bool low_precision,
|
||||||
GLuint dataType )
|
unsigned dataType )
|
||||||
{
|
{
|
||||||
struct brw_context *brw = p->brw;
|
struct brw_context *brw = p->brw;
|
||||||
struct intel_context *intel = &brw->intel;
|
struct intel_context *intel = &brw->intel;
|
||||||
@ -536,7 +536,7 @@ static void brw_set_math_message( struct brw_compile *p,
|
|||||||
static void brw_set_ff_sync_message(struct brw_compile *p,
|
static void brw_set_ff_sync_message(struct brw_compile *p,
|
||||||
struct brw_instruction *insn,
|
struct brw_instruction *insn,
|
||||||
bool allocate,
|
bool allocate,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
bool end_of_thread)
|
bool end_of_thread)
|
||||||
{
|
{
|
||||||
brw_set_message_descriptor(p, insn, BRW_SFID_URB,
|
brw_set_message_descriptor(p, insn, BRW_SFID_URB,
|
||||||
@ -553,12 +553,12 @@ static void brw_set_urb_message( struct brw_compile *p,
|
|||||||
struct brw_instruction *insn,
|
struct brw_instruction *insn,
|
||||||
bool allocate,
|
bool allocate,
|
||||||
bool used,
|
bool used,
|
||||||
GLuint msg_length,
|
unsigned msg_length,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
bool end_of_thread,
|
bool end_of_thread,
|
||||||
bool complete,
|
bool complete,
|
||||||
GLuint offset,
|
unsigned offset,
|
||||||
GLuint swizzle_control )
|
unsigned swizzle_control )
|
||||||
{
|
{
|
||||||
struct brw_context *brw = p->brw;
|
struct brw_context *brw = p->brw;
|
||||||
struct intel_context *intel = &brw->intel;
|
struct intel_context *intel = &brw->intel;
|
||||||
@ -593,15 +593,15 @@ static void brw_set_urb_message( struct brw_compile *p,
|
|||||||
void
|
void
|
||||||
brw_set_dp_write_message(struct brw_compile *p,
|
brw_set_dp_write_message(struct brw_compile *p,
|
||||||
struct brw_instruction *insn,
|
struct brw_instruction *insn,
|
||||||
GLuint binding_table_index,
|
unsigned binding_table_index,
|
||||||
GLuint msg_control,
|
unsigned msg_control,
|
||||||
GLuint msg_type,
|
unsigned msg_type,
|
||||||
GLuint msg_length,
|
unsigned msg_length,
|
||||||
bool header_present,
|
bool header_present,
|
||||||
GLuint last_render_target,
|
unsigned last_render_target,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
GLuint end_of_thread,
|
unsigned end_of_thread,
|
||||||
GLuint send_commit_msg)
|
unsigned send_commit_msg)
|
||||||
{
|
{
|
||||||
struct brw_context *brw = p->brw;
|
struct brw_context *brw = p->brw;
|
||||||
struct intel_context *intel = &brw->intel;
|
struct intel_context *intel = &brw->intel;
|
||||||
@ -652,13 +652,13 @@ brw_set_dp_write_message(struct brw_compile *p,
|
|||||||
void
|
void
|
||||||
brw_set_dp_read_message(struct brw_compile *p,
|
brw_set_dp_read_message(struct brw_compile *p,
|
||||||
struct brw_instruction *insn,
|
struct brw_instruction *insn,
|
||||||
GLuint binding_table_index,
|
unsigned binding_table_index,
|
||||||
GLuint msg_control,
|
unsigned msg_control,
|
||||||
GLuint msg_type,
|
unsigned msg_type,
|
||||||
GLuint target_cache,
|
unsigned target_cache,
|
||||||
GLuint msg_length,
|
unsigned msg_length,
|
||||||
bool header_present,
|
bool header_present,
|
||||||
GLuint response_length)
|
unsigned response_length)
|
||||||
{
|
{
|
||||||
struct brw_context *brw = p->brw;
|
struct brw_context *brw = p->brw;
|
||||||
struct intel_context *intel = &brw->intel;
|
struct intel_context *intel = &brw->intel;
|
||||||
@ -708,14 +708,14 @@ brw_set_dp_read_message(struct brw_compile *p,
|
|||||||
void
|
void
|
||||||
brw_set_sampler_message(struct brw_compile *p,
|
brw_set_sampler_message(struct brw_compile *p,
|
||||||
struct brw_instruction *insn,
|
struct brw_instruction *insn,
|
||||||
GLuint binding_table_index,
|
unsigned binding_table_index,
|
||||||
GLuint sampler,
|
unsigned sampler,
|
||||||
GLuint msg_type,
|
unsigned msg_type,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
GLuint msg_length,
|
unsigned msg_length,
|
||||||
GLuint header_present,
|
unsigned header_present,
|
||||||
GLuint simd_mode,
|
unsigned simd_mode,
|
||||||
GLuint return_format)
|
unsigned return_format)
|
||||||
{
|
{
|
||||||
struct brw_context *brw = p->brw;
|
struct brw_context *brw = p->brw;
|
||||||
struct intel_context *intel = &brw->intel;
|
struct intel_context *intel = &brw->intel;
|
||||||
@ -748,7 +748,7 @@ brw_set_sampler_message(struct brw_compile *p,
|
|||||||
|
|
||||||
#define next_insn brw_next_insn
|
#define next_insn brw_next_insn
|
||||||
struct brw_instruction *
|
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;
|
struct brw_instruction *insn;
|
||||||
|
|
||||||
@ -779,7 +779,7 @@ brw_next_insn(struct brw_compile *p, GLuint opcode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct brw_instruction *brw_alu1( struct brw_compile *p,
|
static struct brw_instruction *brw_alu1( struct brw_compile *p,
|
||||||
GLuint opcode,
|
unsigned opcode,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
struct brw_reg src )
|
struct brw_reg src )
|
||||||
{
|
{
|
||||||
@ -790,7 +790,7 @@ static struct brw_instruction *brw_alu1( struct brw_compile *p,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct brw_instruction *brw_alu2(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 dest,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
struct brw_reg src1 )
|
struct brw_reg src1 )
|
||||||
@ -902,7 +902,7 @@ brw_set_3src_src2(struct brw_compile *p,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct brw_instruction *brw_alu3(struct brw_compile *p,
|
static struct brw_instruction *brw_alu3(struct brw_compile *p,
|
||||||
GLuint opcode,
|
unsigned opcode,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
struct brw_reg src1,
|
struct brw_reg src1,
|
||||||
@ -1170,7 +1170,7 @@ get_inner_do_insn(struct brw_compile *p)
|
|||||||
* popped off. If the stack is now empty, normal execution resumes.
|
* popped off. If the stack is now empty, normal execution resumes.
|
||||||
*/
|
*/
|
||||||
struct brw_instruction *
|
struct brw_instruction *
|
||||||
brw_IF(struct brw_compile *p, GLuint execute_size)
|
brw_IF(struct brw_compile *p, unsigned execute_size)
|
||||||
{
|
{
|
||||||
struct intel_context *intel = &p->brw->intel;
|
struct intel_context *intel = &p->brw->intel;
|
||||||
struct brw_instruction *insn;
|
struct brw_instruction *insn;
|
||||||
@ -1572,7 +1572,7 @@ struct brw_instruction *gen6_HALT(struct brw_compile *p)
|
|||||||
* For gen6, there's no more mask stack, so no need for DO. WHILE
|
* For gen6, there's no more mask stack, so no need for DO. WHILE
|
||||||
* just points back to the first instruction of the loop.
|
* 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 intel_context *intel = &p->brw->intel;
|
struct intel_context *intel = &p->brw->intel;
|
||||||
|
|
||||||
@ -1634,7 +1634,7 @@ struct brw_instruction *brw_WHILE(struct brw_compile *p)
|
|||||||
{
|
{
|
||||||
struct intel_context *intel = &p->brw->intel;
|
struct intel_context *intel = &p->brw->intel;
|
||||||
struct brw_instruction *insn, *do_insn;
|
struct brw_instruction *insn, *do_insn;
|
||||||
GLuint br = 1;
|
unsigned br = 1;
|
||||||
|
|
||||||
if (intel->gen >= 5)
|
if (intel->gen >= 5)
|
||||||
br = 2;
|
br = 2;
|
||||||
@ -1701,7 +1701,7 @@ void brw_land_fwd_jump(struct brw_compile *p, int jmp_insn_idx)
|
|||||||
{
|
{
|
||||||
struct intel_context *intel = &p->brw->intel;
|
struct intel_context *intel = &p->brw->intel;
|
||||||
struct brw_instruction *jmp_insn = &p->store[jmp_insn_idx];
|
struct brw_instruction *jmp_insn = &p->store[jmp_insn_idx];
|
||||||
GLuint jmpi = 1;
|
unsigned jmpi = 1;
|
||||||
|
|
||||||
if (intel->gen >= 5)
|
if (intel->gen >= 5)
|
||||||
jmpi = 2;
|
jmpi = 2;
|
||||||
@ -1720,7 +1720,7 @@ void brw_land_fwd_jump(struct brw_compile *p, int jmp_insn_idx)
|
|||||||
*/
|
*/
|
||||||
void brw_CMP(struct brw_compile *p,
|
void brw_CMP(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint conditional,
|
unsigned conditional,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
struct brw_reg src1)
|
struct brw_reg src1)
|
||||||
{
|
{
|
||||||
@ -1769,11 +1769,11 @@ void brw_WAIT (struct brw_compile *p)
|
|||||||
*/
|
*/
|
||||||
void brw_math( struct brw_compile *p,
|
void brw_math( struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint function,
|
unsigned function,
|
||||||
GLuint msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
struct brw_reg src,
|
struct brw_reg src,
|
||||||
GLuint data_type,
|
unsigned data_type,
|
||||||
GLuint precision )
|
unsigned precision )
|
||||||
{
|
{
|
||||||
struct intel_context *intel = &p->brw->intel;
|
struct intel_context *intel = &p->brw->intel;
|
||||||
|
|
||||||
@ -1833,7 +1833,7 @@ void brw_math( struct brw_compile *p,
|
|||||||
*/
|
*/
|
||||||
void brw_math2(struct brw_compile *p,
|
void brw_math2(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint function,
|
unsigned function,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
struct brw_reg src1)
|
struct brw_reg src1)
|
||||||
{
|
{
|
||||||
@ -1893,7 +1893,7 @@ void brw_math2(struct brw_compile *p,
|
|||||||
void brw_oword_block_write_scratch(struct brw_compile *p,
|
void brw_oword_block_write_scratch(struct brw_compile *p,
|
||||||
struct brw_reg mrf,
|
struct brw_reg mrf,
|
||||||
int num_regs,
|
int num_regs,
|
||||||
GLuint offset)
|
unsigned offset)
|
||||||
{
|
{
|
||||||
struct intel_context *intel = &p->brw->intel;
|
struct intel_context *intel = &p->brw->intel;
|
||||||
uint32_t msg_control, msg_type;
|
uint32_t msg_control, msg_type;
|
||||||
@ -2005,7 +2005,7 @@ brw_oword_block_read_scratch(struct brw_compile *p,
|
|||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
struct brw_reg mrf,
|
struct brw_reg mrf,
|
||||||
int num_regs,
|
int num_regs,
|
||||||
GLuint offset)
|
unsigned offset)
|
||||||
{
|
{
|
||||||
struct intel_context *intel = &p->brw->intel;
|
struct intel_context *intel = &p->brw->intel;
|
||||||
uint32_t msg_control;
|
uint32_t msg_control;
|
||||||
@ -2130,18 +2130,18 @@ void brw_oword_block_read(struct brw_compile *p,
|
|||||||
|
|
||||||
void brw_fb_WRITE(struct brw_compile *p,
|
void brw_fb_WRITE(struct brw_compile *p,
|
||||||
int dispatch_width,
|
int dispatch_width,
|
||||||
GLuint msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
GLuint msg_control,
|
unsigned msg_control,
|
||||||
GLuint binding_table_index,
|
unsigned binding_table_index,
|
||||||
GLuint msg_length,
|
unsigned msg_length,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
bool eot,
|
bool eot,
|
||||||
bool header_present)
|
bool header_present)
|
||||||
{
|
{
|
||||||
struct intel_context *intel = &p->brw->intel;
|
struct intel_context *intel = &p->brw->intel;
|
||||||
struct brw_instruction *insn;
|
struct brw_instruction *insn;
|
||||||
GLuint msg_type;
|
unsigned msg_type;
|
||||||
struct brw_reg dest;
|
struct brw_reg dest;
|
||||||
|
|
||||||
if (dispatch_width == 16)
|
if (dispatch_width == 16)
|
||||||
@ -2192,17 +2192,17 @@ void brw_fb_WRITE(struct brw_compile *p,
|
|||||||
*/
|
*/
|
||||||
void brw_SAMPLE(struct brw_compile *p,
|
void brw_SAMPLE(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
GLuint binding_table_index,
|
unsigned binding_table_index,
|
||||||
GLuint sampler,
|
unsigned sampler,
|
||||||
GLuint writemask,
|
unsigned writemask,
|
||||||
GLuint msg_type,
|
unsigned msg_type,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
GLuint msg_length,
|
unsigned msg_length,
|
||||||
GLuint header_present,
|
unsigned header_present,
|
||||||
GLuint simd_mode,
|
unsigned simd_mode,
|
||||||
GLuint return_format)
|
unsigned return_format)
|
||||||
{
|
{
|
||||||
struct intel_context *intel = &p->brw->intel;
|
struct intel_context *intel = &p->brw->intel;
|
||||||
bool need_stall = 0;
|
bool need_stall = 0;
|
||||||
@ -2223,8 +2223,8 @@ void brw_SAMPLE(struct brw_compile *p,
|
|||||||
* needed.
|
* needed.
|
||||||
*/
|
*/
|
||||||
if (writemask != BRW_WRITEMASK_XYZW) {
|
if (writemask != BRW_WRITEMASK_XYZW) {
|
||||||
GLuint dst_offset = 0;
|
unsigned dst_offset = 0;
|
||||||
GLuint i, newmask = 0, len = 0;
|
unsigned i, newmask = 0, len = 0;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
if (writemask & (1<<i))
|
if (writemask & (1<<i))
|
||||||
@ -2320,16 +2320,16 @@ void brw_SAMPLE(struct brw_compile *p,
|
|||||||
*/
|
*/
|
||||||
void brw_urb_WRITE(struct brw_compile *p,
|
void brw_urb_WRITE(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
bool allocate,
|
bool allocate,
|
||||||
bool used,
|
bool used,
|
||||||
GLuint msg_length,
|
unsigned msg_length,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
bool eot,
|
bool eot,
|
||||||
bool writes_complete,
|
bool writes_complete,
|
||||||
GLuint offset,
|
unsigned offset,
|
||||||
GLuint swizzle)
|
unsigned swizzle)
|
||||||
{
|
{
|
||||||
struct intel_context *intel = &p->brw->intel;
|
struct intel_context *intel = &p->brw->intel;
|
||||||
struct brw_instruction *insn;
|
struct brw_instruction *insn;
|
||||||
@ -2509,10 +2509,10 @@ brw_set_uip_jip(struct brw_compile *p)
|
|||||||
|
|
||||||
void brw_ff_sync(struct brw_compile *p,
|
void brw_ff_sync(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
bool allocate,
|
bool allocate,
|
||||||
GLuint response_length,
|
unsigned response_length,
|
||||||
bool eot)
|
bool eot)
|
||||||
{
|
{
|
||||||
struct intel_context *intel = &p->brw->intel;
|
struct intel_context *intel = &p->brw->intel;
|
||||||
@ -2549,9 +2549,9 @@ void brw_ff_sync(struct brw_compile *p,
|
|||||||
void
|
void
|
||||||
brw_svb_write(struct brw_compile *p,
|
brw_svb_write(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
GLuint msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
struct brw_reg src0,
|
struct brw_reg src0,
|
||||||
GLuint binding_table_index,
|
unsigned binding_table_index,
|
||||||
bool send_commit_msg)
|
bool send_commit_msg)
|
||||||
{
|
{
|
||||||
struct brw_instruction *insn;
|
struct brw_instruction *insn;
|
||||||
|
@ -53,16 +53,16 @@ void brw_math_invert( struct brw_compile *p,
|
|||||||
void brw_copy4(struct brw_compile *p,
|
void brw_copy4(struct brw_compile *p,
|
||||||
struct brw_reg dst,
|
struct brw_reg dst,
|
||||||
struct brw_reg src,
|
struct brw_reg src,
|
||||||
GLuint count)
|
unsigned count)
|
||||||
{
|
{
|
||||||
GLuint i;
|
unsigned i;
|
||||||
|
|
||||||
dst = vec4(dst);
|
dst = vec4(dst);
|
||||||
src = vec4(src);
|
src = vec4(src);
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
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), byte_offset(src, delta));
|
||||||
brw_MOV(p, byte_offset(dst, delta+16), byte_offset(src, delta+16));
|
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,
|
void brw_copy8(struct brw_compile *p,
|
||||||
struct brw_reg dst,
|
struct brw_reg dst,
|
||||||
struct brw_reg src,
|
struct brw_reg src,
|
||||||
GLuint count)
|
unsigned count)
|
||||||
{
|
{
|
||||||
GLuint i;
|
unsigned i;
|
||||||
|
|
||||||
dst = vec8(dst);
|
dst = vec8(dst);
|
||||||
src = vec8(src);
|
src = vec8(src);
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
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), 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,
|
void brw_copy_indirect_to_indirect(struct brw_compile *p,
|
||||||
struct brw_indirect dst_ptr,
|
struct brw_indirect dst_ptr,
|
||||||
struct brw_indirect src_ptr,
|
struct brw_indirect src_ptr,
|
||||||
GLuint count)
|
unsigned count)
|
||||||
{
|
{
|
||||||
GLuint i;
|
unsigned i;
|
||||||
|
|
||||||
for (i = 0; i < count; 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), deref_4f(src_ptr, delta));
|
||||||
brw_MOV(p, deref_4f(dst_ptr, delta+16), deref_4f(src_ptr, delta+16));
|
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,
|
void brw_copy_from_indirect(struct brw_compile *p,
|
||||||
struct brw_reg dst,
|
struct brw_reg dst,
|
||||||
struct brw_indirect ptr,
|
struct brw_indirect ptr,
|
||||||
GLuint count)
|
unsigned count)
|
||||||
{
|
{
|
||||||
GLuint i;
|
unsigned i;
|
||||||
|
|
||||||
dst = vec4(dst);
|
dst = vec4(dst);
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
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), deref_4f(ptr, delta));
|
||||||
brw_MOV(p, byte_offset(dst, delta+16), deref_4f(ptr, delta+16));
|
brw_MOV(p, byte_offset(dst, delta+16), deref_4f(ptr, delta+16));
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -35,12 +35,6 @@
|
|||||||
|
|
||||||
#include "brw_reg.h"
|
#include "brw_reg.h"
|
||||||
|
|
||||||
typedef unsigned char GLubyte;
|
|
||||||
typedef short GLshort;
|
|
||||||
typedef unsigned int GLuint;
|
|
||||||
typedef int GLint;
|
|
||||||
typedef float GLfloat;
|
|
||||||
|
|
||||||
extern long int gen_level;
|
extern long int gen_level;
|
||||||
extern int advanced_flag;
|
extern int advanced_flag;
|
||||||
extern int errors;
|
extern int errors;
|
||||||
@ -147,7 +141,7 @@ struct label_instruction {
|
|||||||
|
|
||||||
struct relocation {
|
struct relocation {
|
||||||
char *first_reloc_target, *second_reloc_target; // JIP and UIP respectively
|
char *first_reloc_target, *second_reloc_target; // JIP and UIP respectively
|
||||||
GLint first_reloc_offset, second_reloc_offset; // in number of instructions
|
int first_reloc_offset, second_reloc_offset; // in number of instructions
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,7 +81,7 @@ static struct src_operand ip_src =
|
|||||||
.reg.dw1.bits.swizzle = BRW_SWIZZLE_NOOP,
|
.reg.dw1.bits.swizzle = BRW_SWIZZLE_NOOP,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int get_type_size(GLuint type);
|
static int get_type_size(unsigned type);
|
||||||
static void set_instruction_opcode(struct brw_program_instruction *instr,
|
static void set_instruction_opcode(struct brw_program_instruction *instr,
|
||||||
unsigned opcode);
|
unsigned opcode);
|
||||||
static int set_instruction_dest(struct brw_program_instruction *instr,
|
static int set_instruction_dest(struct brw_program_instruction *instr,
|
||||||
@ -339,7 +339,7 @@ static bool validate_src_reg(struct brw_instruction *insn,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_subreg_address(GLuint regfile, GLuint type, GLuint subreg, GLuint address_mode)
|
static int get_subreg_address(unsigned regfile, unsigned type, unsigned subreg, unsigned address_mode)
|
||||||
{
|
{
|
||||||
int unit_size = 1;
|
int unit_size = 1;
|
||||||
|
|
||||||
@ -370,7 +370,7 @@ static int get_subreg_address(GLuint regfile, GLuint type, GLuint subreg, GLuint
|
|||||||
* a0.12 6 invalid input
|
* a0.12 6 invalid input
|
||||||
* a0.14 7 invalid input
|
* a0.14 7 invalid input
|
||||||
*/
|
*/
|
||||||
static int get_indirect_subreg_address(GLuint subreg)
|
static int get_indirect_subreg_address(unsigned subreg)
|
||||||
{
|
{
|
||||||
return advanced_flag == 0 ? subreg / 2 : subreg;
|
return advanced_flag == 0 ? subreg / 2 : subreg;
|
||||||
}
|
}
|
||||||
@ -2744,7 +2744,7 @@ void yyerror (char *msg)
|
|||||||
++errors;
|
++errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_type_size(GLuint type)
|
static int get_type_size(unsigned type)
|
||||||
{
|
{
|
||||||
int size = 1;
|
int size = 1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user