{
unsigned src_idx;
unsigned inst0, inst1;
+ unsigned push_modifier;
struct r600_bytecode_alu alu;
memset(&alu, 0, sizeof(alu));
for(src_idx = 0; src_idx < 3; src_idx++) {
alu.inst = inst0 | (inst1 << 8);
alu.last = bytes[bytes_read++];
alu.is_op3 = bytes[bytes_read++];
+ push_modifier = bytes[bytes_read++];
alu.pred_sel = bytes[bytes_read++];
alu.bank_swizzle = bytes[bytes_read++];
alu.bank_swizzle_force = bytes[bytes_read++];
alu.omod = bytes[bytes_read++];
alu.index_mode = bytes[bytes_read++];
- r600_bytecode_add_alu(ctx->bc, &alu);
+
+
+ if (alu.inst == CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE) ||
+ alu.inst == CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE) ||
+ alu.inst == CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_INT) ||
+ alu.inst == CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_INT)) {
+ alu.update_pred = 1;
+ alu.dst.write = 0;
+ alu.src[1].sel = V_SQ_ALU_SRC_0;
+ alu.src[1].chan = 0;
+ alu.last = 1;
+ }
+
+ if (push_modifier) {
+ alu.pred_sel = 0;
+ alu.execute_mask = 1;
+ r600_bytecode_add_alu_type(ctx->bc, &alu, CTX_INST(V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_PUSH_BEFORE));
+ } else
+ r600_bytecode_add_alu(ctx->bc, &alu);
+
/* XXX: Handle other KILL instructions */
if (alu.inst == CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT)) {
static void llvm_if(struct r600_shader_ctx *ctx, struct r600_bytecode_alu * alu,
unsigned pred_inst)
{
- alu->inst = pred_inst;
- alu->execute_mask = 1;
- alu->update_pred = 1;
- alu->dst.write = 0;
- alu->src[1].sel = V_SQ_ALU_SRC_0;
- alu->src[1].chan = 0;
- alu->last = 1;
- r600_bytecode_add_alu_type(ctx->bc, alu,
- CTX_INST(V_SQ_CF_ALU_WORD1_SQ_CF_INST_ALU_PUSH_BEFORE));
-
r600_bytecode_add_cfinst(ctx->bc, CTX_INST(V_SQ_CF_WORD1_SQ_CF_INST_JUMP));
fc_pushlevel(ctx, FC_IF);
callstack_check_depth(ctx, FC_PUSH_VPM, 0);