diff options
author | Marek Olšák <[email protected]> | 2014-08-07 02:05:10 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-04-01 00:06:41 +0200 |
commit | 150736b5c34fc07de296454b973ae72ede215ae2 (patch) | |
tree | 54d93a00b5b0da2000e9de564d7ce2be57c51842 /src/gallium/auxiliary/tgsi | |
parent | c011fe7452f5a0c90e1839e3549efc4c2ac665c1 (diff) |
gallium: remove support for predicates from TGSI (v2)
Neved used.
v2: gallivm: rename "pred" -> "exec_mask"
etnaviv: remove the cap
gallium: fix tgsi_instruction::Padding
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_build.c | 66 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_build.h | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_dump.c | 24 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_exec.c | 59 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_exec.h | 7 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_parse.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_parse.h | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_sanity.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_strings.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_text.c | 37 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_ureg.c | 84 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_ureg.h | 149 |
12 files changed, 4 insertions, 432 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c index 773f8926cb2..39c20b5e886 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_build.c +++ b/src/gallium/auxiliary/tgsi/tgsi_build.c @@ -637,7 +637,6 @@ tgsi_default_instruction( void ) instruction.NrTokens = 0; instruction.Opcode = TGSI_OPCODE_MOV; instruction.Saturate = 0; - instruction.Predicate = 0; instruction.NumDstRegs = 1; instruction.NumSrcRegs = 1; instruction.Label = 0; @@ -651,7 +650,6 @@ tgsi_default_instruction( void ) static struct tgsi_instruction tgsi_build_instruction(unsigned opcode, unsigned saturate, - unsigned predicate, unsigned num_dst_regs, unsigned num_src_regs, struct tgsi_header *header) @@ -666,7 +664,6 @@ tgsi_build_instruction(unsigned opcode, instruction = tgsi_default_instruction(); instruction.Opcode = opcode; instruction.Saturate = saturate; - instruction.Predicate = predicate; instruction.NumDstRegs = num_dst_regs; instruction.NumSrcRegs = num_src_regs; @@ -687,47 +684,6 @@ instruction_grow( header_bodysize_grow( header ); } -struct tgsi_instruction_predicate -tgsi_default_instruction_predicate(void) -{ - struct tgsi_instruction_predicate instruction_predicate; - - instruction_predicate.SwizzleX = TGSI_SWIZZLE_X; - instruction_predicate.SwizzleY = TGSI_SWIZZLE_Y; - instruction_predicate.SwizzleZ = TGSI_SWIZZLE_Z; - instruction_predicate.SwizzleW = TGSI_SWIZZLE_W; - instruction_predicate.Negate = 0; - instruction_predicate.Index = 0; - instruction_predicate.Padding = 0; - - return instruction_predicate; -} - -static struct tgsi_instruction_predicate -tgsi_build_instruction_predicate(int index, - unsigned negate, - unsigned swizzleX, - unsigned swizzleY, - unsigned swizzleZ, - unsigned swizzleW, - struct tgsi_instruction *instruction, - struct tgsi_header *header) -{ - struct tgsi_instruction_predicate instruction_predicate; - - instruction_predicate = tgsi_default_instruction_predicate(); - instruction_predicate.SwizzleX = swizzleX; - instruction_predicate.SwizzleY = swizzleY; - instruction_predicate.SwizzleZ = swizzleZ; - instruction_predicate.SwizzleW = swizzleW; - instruction_predicate.Negate = negate; - instruction_predicate.Index = index; - - instruction_grow(instruction, header); - - return instruction_predicate; -} - static struct tgsi_instruction_label tgsi_default_instruction_label( void ) { @@ -1066,7 +1022,6 @@ tgsi_default_full_instruction( void ) unsigned i; full_instruction.Instruction = tgsi_default_instruction(); - full_instruction.Predicate = tgsi_default_instruction_predicate(); full_instruction.Label = tgsi_default_instruction_label(); full_instruction.Texture = tgsi_default_instruction_texture(); full_instruction.Memory = tgsi_default_instruction_memory(); @@ -1102,32 +1057,11 @@ tgsi_build_full_instruction( *instruction = tgsi_build_instruction(full_inst->Instruction.Opcode, full_inst->Instruction.Saturate, - full_inst->Instruction.Predicate, full_inst->Instruction.NumDstRegs, full_inst->Instruction.NumSrcRegs, header); prev_token = (struct tgsi_token *) instruction; - if (full_inst->Instruction.Predicate) { - struct tgsi_instruction_predicate *instruction_predicate; - - if (maxsize <= size) { - return 0; - } - instruction_predicate = (struct tgsi_instruction_predicate *)&tokens[size]; - size++; - - *instruction_predicate = - tgsi_build_instruction_predicate(full_inst->Predicate.Index, - full_inst->Predicate.Negate, - full_inst->Predicate.SwizzleX, - full_inst->Predicate.SwizzleY, - full_inst->Predicate.SwizzleZ, - full_inst->Predicate.SwizzleW, - instruction, - header); - } - if (full_inst->Instruction.Label) { struct tgsi_instruction_label *instruction_label; diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.h b/src/gallium/auxiliary/tgsi/tgsi_build.h index 34d181ab247..53f31932c02 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_build.h +++ b/src/gallium/auxiliary/tgsi/tgsi_build.h @@ -110,9 +110,6 @@ tgsi_build_full_instruction( struct tgsi_header *header, unsigned maxsize ); -struct tgsi_instruction_predicate -tgsi_default_instruction_predicate(void); - struct tgsi_full_src_register tgsi_full_src_register_from_dst(const struct tgsi_full_dst_register *dst); diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c index 6c0fcf8572b..f6eba7424b3 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_dump.c +++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c @@ -578,30 +578,6 @@ iter_instruction( TXT( " " ); ctx->indent += info->post_indent; - if (inst->Instruction.Predicate) { - CHR( '(' ); - - if (inst->Predicate.Negate) - CHR( '!' ); - - TXT( "PRED[" ); - SID( inst->Predicate.Index ); - CHR( ']' ); - - if (inst->Predicate.SwizzleX != TGSI_SWIZZLE_X || - inst->Predicate.SwizzleY != TGSI_SWIZZLE_Y || - inst->Predicate.SwizzleZ != TGSI_SWIZZLE_Z || - inst->Predicate.SwizzleW != TGSI_SWIZZLE_W) { - CHR( '.' ); - ENM( inst->Predicate.SwizzleX, tgsi_swizzle_names ); - ENM( inst->Predicate.SwizzleY, tgsi_swizzle_names ); - ENM( inst->Predicate.SwizzleZ, tgsi_swizzle_names ); - ENM( inst->Predicate.SwizzleW, tgsi_swizzle_names ); - } - - TXT( ") " ); - } - TXT( info->mnemonic ); if (inst->Instruction.Saturate) { diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index 48d91af3e16..c41954cbf76 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -1291,7 +1291,6 @@ tgsi_exec_machine_create(enum pipe_shader_type shader_type) mach->ShaderType = shader_type; mach->Addrs = &mach->Temps[TGSI_EXEC_TEMP_ADDR]; mach->MaxGeometryShaderOutputs = TGSI_MAX_TOTAL_VERTICES; - mach->Predicates = &mach->Temps[TGSI_EXEC_TEMP_P0]; if (shader_type != PIPE_SHADER_COMPUTE) { mach->Inputs = align_malloc(sizeof(struct tgsi_exec_vector) * PIPE_MAX_SHADER_INPUTS, 16); @@ -1559,15 +1558,6 @@ fetch_src_file_channel(const struct tgsi_exec_machine *mach, } break; - case TGSI_FILE_PREDICATE: - for (i = 0; i < TGSI_QUAD_SIZE; i++) { - assert(index->i[i] >= 0 && index->i[i] < TGSI_EXEC_NUM_PREDS); - assert(index2D->i[i] == 0); - - chan->u[i] = mach->Predicates[0].xyzw[swizzle].u[i]; - } - break; - case TGSI_FILE_OUTPUT: /* vertex/fragment output vars can be read too */ for (i = 0; i < TGSI_QUAD_SIZE; i++) { @@ -1770,11 +1760,9 @@ store_dest_dstret(struct tgsi_exec_machine *mach, uint chan_index, enum tgsi_exec_datatype dst_datatype) { - uint i; static union tgsi_exec_channel null; union tgsi_exec_channel *dst; union tgsi_exec_channel index2D; - uint execmask = mach->ExecMask; int offset = 0; /* indirection offset */ int index; @@ -1926,58 +1914,11 @@ store_dest_dstret(struct tgsi_exec_machine *mach, dst = &mach->Addrs[index].xyzw[chan_index]; break; - case TGSI_FILE_PREDICATE: - index = reg->Register.Index; - assert(index < TGSI_EXEC_NUM_PREDS); - dst = &mach->Predicates[index].xyzw[chan_index]; - break; - default: assert( 0 ); return NULL; } - if (inst->Instruction.Predicate) { - uint swizzle; - union tgsi_exec_channel *pred; - - switch (chan_index) { - case TGSI_CHAN_X: - swizzle = inst->Predicate.SwizzleX; - break; - case TGSI_CHAN_Y: - swizzle = inst->Predicate.SwizzleY; - break; - case TGSI_CHAN_Z: - swizzle = inst->Predicate.SwizzleZ; - break; - case TGSI_CHAN_W: - swizzle = inst->Predicate.SwizzleW; - break; - default: - assert(0); - return NULL; - } - - assert(inst->Predicate.Index == 0); - - pred = &mach->Predicates[inst->Predicate.Index].xyzw[swizzle]; - - if (inst->Predicate.Negate) { - for (i = 0; i < TGSI_QUAD_SIZE; i++) { - if (pred->u[i]) { - execmask &= ~(1 << i); - } - } - } else { - for (i = 0; i < TGSI_QUAD_SIZE; i++) { - if (!pred->u[i]) { - execmask &= ~(1 << i); - } - } - } - } - return dst; } diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h index d78b3c819e8..5708a5061a6 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.h +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h @@ -273,10 +273,6 @@ struct tgsi_sampler #define TGSI_EXEC_TEMP_ADDR (TGSI_EXEC_NUM_TEMPS + 8) #define TGSI_EXEC_NUM_ADDRS 3 -/* predicate register */ -#define TGSI_EXEC_TEMP_P0 (TGSI_EXEC_NUM_TEMPS + 11) -#define TGSI_EXEC_NUM_PREDS 1 - #define TGSI_EXEC_NUM_TEMP_EXTRAS 12 @@ -359,7 +355,6 @@ struct tgsi_exec_machine struct tgsi_exec_vector SystemValue[TGSI_MAX_MISC_INPUTS]; struct tgsi_exec_vector *Addrs; - struct tgsi_exec_vector *Predicates; struct tgsi_sampler *Sampler; @@ -505,8 +500,6 @@ tgsi_exec_get_shader_param(enum pipe_shader_cap param) return PIPE_MAX_CONSTANT_BUFFERS; case PIPE_SHADER_CAP_MAX_TEMPS: return TGSI_EXEC_NUM_TEMPS; - case PIPE_SHADER_CAP_MAX_PREDS: - return TGSI_EXEC_NUM_PREDS; case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED: return 1; case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR: diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.c b/src/gallium/auxiliary/tgsi/tgsi_parse.c index 940af7d302c..c706fc8ae2e 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_parse.c +++ b/src/gallium/auxiliary/tgsi/tgsi_parse.c @@ -182,10 +182,6 @@ tgsi_parse_token( memset(inst, 0, sizeof *inst); copy_token(&inst->Instruction, &token); - if (inst->Instruction.Predicate) { - next_token(ctx, &inst->Predicate); - } - if (inst->Instruction.Label) { next_token( ctx, &inst->Label); } diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.h b/src/gallium/auxiliary/tgsi/tgsi_parse.h index 4689fb797d0..07806ab3553 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_parse.h +++ b/src/gallium/auxiliary/tgsi/tgsi_parse.h @@ -88,7 +88,6 @@ struct tgsi_full_property struct tgsi_full_instruction { struct tgsi_instruction Instruction; - struct tgsi_instruction_predicate Predicate; struct tgsi_instruction_label Label; struct tgsi_instruction_texture Texture; struct tgsi_instruction_memory Memory; diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c index 239a2c93835..a95bbfa9880 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c +++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c @@ -256,7 +256,6 @@ static const char *file_names[TGSI_FILE_COUNT] = "SAMP", "ADDR", "IMM", - "PRED", "SV", "RES" }; diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c index d7201fc5069..85bb8d1727f 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_strings.c +++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c @@ -52,7 +52,6 @@ static const char *tgsi_file_names[] = "SAMP", "ADDR", "IMM", - "PRED", "SV", "IMAGE", "SVIEW", diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index 4ed905036f1..93a05568f49 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.c +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c @@ -1036,43 +1036,6 @@ parse_instruction( inst = tgsi_default_full_instruction(); - /* Parse predicate. - */ - eat_opt_white( &ctx->cur ); - if (*ctx->cur == '(') { - uint file; - int index; - uint swizzle[4]; - boolean parsed_swizzle; - - inst.Instruction.Predicate = 1; - - ctx->cur++; - if (*ctx->cur == '!') { - ctx->cur++; - inst.Predicate.Negate = 1; - } - - if (!parse_register_1d( ctx, &file, &index )) - return FALSE; - - if (parse_optional_swizzle( ctx, swizzle, &parsed_swizzle, 4 )) { - if (parsed_swizzle) { - inst.Predicate.SwizzleX = swizzle[0]; - inst.Predicate.SwizzleY = swizzle[1]; - inst.Predicate.SwizzleZ = swizzle[2]; - inst.Predicate.SwizzleW = swizzle[3]; - } - } - - if (*ctx->cur != ')') { - report_error( ctx, "Expected `)'" ); - return FALSE; - } - - ctx->cur++; - } - /* Parse instruction name. */ eat_opt_white( &ctx->cur ); diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index ab0a3ebe1a5..9eb00d09194 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -57,7 +57,6 @@ union tgsi_any_token { struct tgsi_immediate imm; union tgsi_immediate_data imm_data; struct tgsi_instruction insn; - struct tgsi_instruction_predicate insn_predicate; struct tgsi_instruction_label insn_label; struct tgsi_instruction_texture insn_texture; struct tgsi_instruction_memory insn_memory; @@ -83,7 +82,6 @@ struct ureg_tokens { #define UREG_MAX_CONSTANT_RANGE 32 #define UREG_MAX_IMMEDIATE 4096 #define UREG_MAX_ADDR 3 -#define UREG_MAX_PRED 1 #define UREG_MAX_ARRAY_TEMPS 256 struct const_decl { @@ -188,7 +186,6 @@ struct ureg_program unsigned properties[TGSI_PROPERTY_COUNT]; unsigned nr_addrs; - unsigned nr_preds; unsigned nr_instructions; struct ureg_tokens domain[2]; @@ -263,6 +260,7 @@ static union tgsi_any_token *retrieve_token( struct ureg_program *ureg, return &ureg->domain[domain].tokens[nr]; } + void ureg_property(struct ureg_program *ureg, unsigned name, unsigned value) { @@ -671,19 +669,6 @@ struct ureg_dst ureg_DECL_address( struct ureg_program *ureg ) return ureg_dst_register( TGSI_FILE_ADDRESS, 0 ); } -/* Allocate a new predicate register. - */ -struct ureg_dst -ureg_DECL_predicate(struct ureg_program *ureg) -{ - if (ureg->nr_preds < UREG_MAX_PRED) { - return ureg_dst_register(TGSI_FILE_PREDICATE, ureg->nr_preds++); - } - - assert(0); - return ureg_dst_register(TGSI_FILE_PREDICATE, 0); -} - /* Allocate a new sampler. */ struct ureg_src ureg_DECL_sampler( struct ureg_program *ureg, @@ -1228,17 +1213,11 @@ struct ureg_emit_insn_result ureg_emit_insn(struct ureg_program *ureg, unsigned opcode, boolean saturate, - boolean predicate, - boolean pred_negate, - unsigned pred_swizzle_x, - unsigned pred_swizzle_y, - unsigned pred_swizzle_z, - unsigned pred_swizzle_w, unsigned num_dst, - unsigned num_src ) + unsigned num_src) { union tgsi_any_token *out; - uint count = predicate ? 2 : 1; + uint count = 1; struct ureg_emit_insn_result result; validate( opcode, num_dst, num_src ); @@ -1253,16 +1232,6 @@ ureg_emit_insn(struct ureg_program *ureg, result.insn_token = ureg->domain[DOMAIN_INSN].count - count; result.extended_token = result.insn_token; - if (predicate) { - out[0].insn.Predicate = 1; - out[1].insn_predicate = tgsi_default_instruction_predicate(); - out[1].insn_predicate.Negate = pred_negate; - out[1].insn_predicate.SwizzleX = pred_swizzle_x; - out[1].insn_predicate.SwizzleY = pred_swizzle_y; - out[1].insn_predicate.SwizzleZ = pred_swizzle_z; - out[1].insn_predicate.SwizzleW = pred_swizzle_w; - } - ureg->nr_instructions++; return result; @@ -1389,33 +1358,16 @@ ureg_insn(struct ureg_program *ureg, struct ureg_emit_insn_result insn; unsigned i; boolean saturate; - boolean predicate; - boolean negate = FALSE; - unsigned swizzle[4] = { 0 }; if (nr_dst && ureg_dst_is_empty(dst[0])) { return; } saturate = nr_dst ? dst[0].Saturate : FALSE; - predicate = nr_dst ? dst[0].Predicate : FALSE; - if (predicate) { - negate = dst[0].PredNegate; - swizzle[0] = dst[0].PredSwizzleX; - swizzle[1] = dst[0].PredSwizzleY; - swizzle[2] = dst[0].PredSwizzleZ; - swizzle[3] = dst[0].PredSwizzleW; - } insn = ureg_emit_insn(ureg, opcode, saturate, - predicate, - negate, - swizzle[0], - swizzle[1], - swizzle[2], - swizzle[3], nr_dst, nr_src); @@ -1442,33 +1394,16 @@ ureg_tex_insn(struct ureg_program *ureg, struct ureg_emit_insn_result insn; unsigned i; boolean saturate; - boolean predicate; - boolean negate = FALSE; - unsigned swizzle[4] = { 0 }; if (nr_dst && ureg_dst_is_empty(dst[0])) { return; } saturate = nr_dst ? dst[0].Saturate : FALSE; - predicate = nr_dst ? dst[0].Predicate : FALSE; - if (predicate) { - negate = dst[0].PredNegate; - swizzle[0] = dst[0].PredSwizzleX; - swizzle[1] = dst[0].PredSwizzleY; - swizzle[2] = dst[0].PredSwizzleZ; - swizzle[3] = dst[0].PredSwizzleW; - } insn = ureg_emit_insn(ureg, opcode, saturate, - predicate, - negate, - swizzle[0], - swizzle[1], - swizzle[2], - swizzle[3], nr_dst, nr_src); @@ -1504,12 +1439,6 @@ ureg_memory_insn(struct ureg_program *ureg, insn = ureg_emit_insn(ureg, opcode, FALSE, - FALSE, - FALSE, - TGSI_SWIZZLE_X, - TGSI_SWIZZLE_Y, - TGSI_SWIZZLE_Z, - TGSI_SWIZZLE_W, nr_dst, nr_src); @@ -2002,13 +1931,6 @@ static void emit_decls( struct ureg_program *ureg ) 0, ureg->nr_addrs ); } - if (ureg->nr_preds) { - emit_decl_range(ureg, - TGSI_FILE_PREDICATE, - 0, - ureg->nr_preds); - } - for (i = 0; i < ureg->nr_immediates; i++) { emit_immediate( ureg, ureg->immediate[i].value.u, diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h index 99908d9ce05..d301915948e 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h @@ -79,12 +79,6 @@ struct ureg_dst unsigned DimIndirect : 1; /* BOOL */ unsigned Dimension : 1; /* BOOL */ unsigned Saturate : 1; /* BOOL */ - unsigned Predicate : 1; - unsigned PredNegate : 1; /* BOOL */ - unsigned PredSwizzleX : 2; /* TGSI_SWIZZLE_ */ - unsigned PredSwizzleY : 2; /* TGSI_SWIZZLE_ */ - unsigned PredSwizzleZ : 2; /* TGSI_SWIZZLE_ */ - unsigned PredSwizzleW : 2; /* TGSI_SWIZZLE_ */ int Index : 16; /* SINT */ int IndirectIndex : 16; /* SINT */ unsigned IndirectFile : 4; /* TGSI_FILE_ */ @@ -348,9 +342,6 @@ ureg_release_temporary( struct ureg_program *ureg, struct ureg_dst ureg_DECL_address( struct ureg_program * ); -struct ureg_dst -ureg_DECL_predicate(struct ureg_program *); - /* Supply an index to the sampler declaration as this is the hook to * the external pipe_sampler state. Users of this function probably * don't want just any sampler, but a specific one which they've set @@ -594,14 +585,8 @@ struct ureg_emit_insn_result ureg_emit_insn(struct ureg_program *ureg, unsigned opcode, boolean saturate, - boolean predicate, - boolean pred_negate, - unsigned pred_swizzle_x, - unsigned pred_swizzle_y, - unsigned pred_swizzle_z, - unsigned pred_swizzle_w, unsigned num_dst, - unsigned num_src ); + unsigned num_src); void ureg_emit_label(struct ureg_program *ureg, @@ -645,12 +630,6 @@ static inline void ureg_##op( struct ureg_program *ureg ) \ insn = ureg_emit_insn(ureg, \ opcode, \ FALSE, \ - FALSE, \ - FALSE, \ - TGSI_SWIZZLE_X, \ - TGSI_SWIZZLE_Y, \ - TGSI_SWIZZLE_Z, \ - TGSI_SWIZZLE_W, \ 0, \ 0); \ ureg_fixup_insn_size( ureg, insn.insn_token ); \ @@ -665,12 +644,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ FALSE, \ - FALSE, \ - FALSE, \ - TGSI_SWIZZLE_X, \ - TGSI_SWIZZLE_Y, \ - TGSI_SWIZZLE_Z, \ - TGSI_SWIZZLE_W, \ 0, \ 1); \ ureg_emit_src( ureg, src ); \ @@ -686,12 +659,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ FALSE, \ - FALSE, \ - FALSE, \ - TGSI_SWIZZLE_X, \ - TGSI_SWIZZLE_Y, \ - TGSI_SWIZZLE_Z, \ - TGSI_SWIZZLE_W, \ 0, \ 0); \ ureg_emit_label( ureg, insn.extended_token, label_token ); \ @@ -708,12 +675,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ FALSE, \ - FALSE, \ - FALSE, \ - TGSI_SWIZZLE_X, \ - TGSI_SWIZZLE_Y, \ - TGSI_SWIZZLE_Z, \ - TGSI_SWIZZLE_W, \ 0, \ 1); \ ureg_emit_label( ureg, insn.extended_token, label_token ); \ @@ -732,12 +693,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ 1, \ 0); \ ureg_emit_dst( ureg, dst ); \ @@ -757,12 +712,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ 1, \ 1); \ ureg_emit_dst( ureg, dst ); \ @@ -783,12 +732,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ 1, \ 2); \ ureg_emit_dst( ureg, dst ); \ @@ -811,12 +754,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ 1, \ 2); \ ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \ @@ -840,12 +777,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ 1, \ 2); \ ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \ @@ -869,12 +800,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ 1, \ 3); \ ureg_emit_dst( ureg, dst ); \ @@ -899,12 +824,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ 1, \ 3); \ ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \ @@ -931,12 +850,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ 1, \ 4); \ ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \ @@ -964,12 +877,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ 1, \ 4); \ ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \ @@ -997,12 +904,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ 1, \ 4); \ ureg_emit_dst( ureg, dst ); \ @@ -1030,12 +931,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ 1, \ 5); \ ureg_emit_dst( ureg, dst ); \ @@ -1064,12 +959,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \ insn = ureg_emit_insn(ureg, \ opcode, \ dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ 1, \ 5); \ ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \ @@ -1153,24 +1042,6 @@ ureg_saturate( struct ureg_dst reg ) return reg; } -static inline struct ureg_dst -ureg_predicate(struct ureg_dst reg, - boolean negate, - unsigned swizzle_x, - unsigned swizzle_y, - unsigned swizzle_z, - unsigned swizzle_w) -{ - assert(reg.File != TGSI_FILE_NULL); - reg.Predicate = 1; - reg.PredNegate = negate; - reg.PredSwizzleX = swizzle_x; - reg.PredSwizzleY = swizzle_y; - reg.PredSwizzleZ = swizzle_z; - reg.PredSwizzleW = swizzle_w; - return reg; -} - static inline struct ureg_dst ureg_dst_indirect( struct ureg_dst reg, struct ureg_src addr ) { @@ -1271,12 +1142,6 @@ ureg_dst_array_register(unsigned file, dst.IndirectIndex = 0; dst.IndirectSwizzle = 0; dst.Saturate = 0; - dst.Predicate = 0; - dst.PredNegate = 0; - dst.PredSwizzleX = TGSI_SWIZZLE_X; - dst.PredSwizzleY = TGSI_SWIZZLE_Y; - dst.PredSwizzleZ = TGSI_SWIZZLE_Z; - dst.PredSwizzleW = TGSI_SWIZZLE_W; dst.Index = index; dst.Dimension = 0; dst.DimensionIndex = 0; @@ -1312,12 +1177,6 @@ ureg_dst( struct ureg_src src ) dst.IndirectIndex = src.IndirectIndex; dst.IndirectSwizzle = src.IndirectSwizzle; dst.Saturate = 0; - dst.Predicate = 0; - dst.PredNegate = 0; - dst.PredSwizzleX = TGSI_SWIZZLE_X; - dst.PredSwizzleY = TGSI_SWIZZLE_Y; - dst.PredSwizzleZ = TGSI_SWIZZLE_Z; - dst.PredSwizzleW = TGSI_SWIZZLE_W; dst.Index = src.Index; dst.Dimension = src.Dimension; dst.DimensionIndex = src.DimensionIndex; @@ -1409,12 +1268,6 @@ ureg_dst_undef( void ) dst.IndirectIndex = 0; dst.IndirectSwizzle = 0; dst.Saturate = 0; - dst.Predicate = 0; - dst.PredNegate = 0; - dst.PredSwizzleX = TGSI_SWIZZLE_X; - dst.PredSwizzleY = TGSI_SWIZZLE_Y; - dst.PredSwizzleZ = TGSI_SWIZZLE_Z; - dst.PredSwizzleW = TGSI_SWIZZLE_W; dst.Index = 0; dst.Dimension = 0; dst.DimensionIndex = 0; |