struct acp_entry : public exec_node {
fs_reg dst;
fs_reg src;
+ enum opcode opcode;
};
struct block_data {
if (entry->src.file == IMM)
return false;
+ if (entry->opcode == SHADER_OPCODE_LOAD_PAYLOAD &&
+ inst->opcode == SHADER_OPCODE_LOAD_PAYLOAD)
+ return false;
+
/* Bail if inst is reading more than entry is writing. */
if ((inst->regs_read(this, arg) * inst->src[arg].stride *
type_sz(inst->src[arg].type)) > type_sz(entry->dst.type))
acp_entry *entry = ralloc(copy_prop_ctx, acp_entry);
entry->dst = inst->dst;
entry->src = inst->src[0];
+ entry->opcode = inst->opcode;
acp[entry->dst.reg % ACP_HASH_SIZE].push_tail(entry);
+ } else if (inst->opcode == SHADER_OPCODE_LOAD_PAYLOAD &&
+ inst->dst.file == GRF) {
+ for (int i = 0; i < inst->sources; i++) {
+ if (inst->src[i].file == GRF) {
+ acp_entry *entry = ralloc(copy_prop_ctx, acp_entry);
+ entry->dst = inst->dst;
+ entry->dst.reg_offset = i;
+ entry->src = inst->src[i];
+ entry->opcode = inst->opcode;
+ if (!entry->dst.equals(inst->src[i])) {
+ acp[entry->dst.reg % ACP_HASH_SIZE].push_tail(entry);
+ } else {
+ ralloc_free(entry);
+ }
+ }
+ }
}
}