intel/fs: Track force_writemask_all behavior of copy propagation ACP entries.

force_writemask_all determines whether all channels of the copy are
actually valid, and may be required to be set for it to be propagated
safely in cases where the destination of the copy is used by another
force_writemask_all instruction, or when the copy occurs in a
divergent control flow block different from its use.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21351>
This commit is contained in:
Francisco Jerez
2023-02-10 19:29:20 -08:00
committed by Kenneth Graunke
parent 14f9f98dcb
commit 1c1be23497

View File

@@ -53,6 +53,7 @@ struct acp_entry : public exec_node {
enum opcode opcode;
bool saturate;
bool is_partial_write;
bool force_writemask_all;
};
struct block_data {
@@ -1097,6 +1098,7 @@ fs_visitor::opt_copy_propagation_local(void *copy_prop_ctx, bblock_t *block,
entry->opcode = inst->opcode;
entry->saturate = inst->saturate;
entry->is_partial_write = inst->is_partial_write();
entry->force_writemask_all = inst->force_writemask_all;
acp[entry->dst.nr % ACP_HASH_SIZE].push_tail(entry);
} else if (inst->opcode == SHADER_OPCODE_LOAD_PAYLOAD &&
inst->dst.file == VGRF) {
@@ -1116,6 +1118,7 @@ fs_visitor::opt_copy_propagation_local(void *copy_prop_ctx, bblock_t *block,
entry->size_written = size_written;
entry->size_read = inst->size_read(i);
entry->opcode = inst->opcode;
entry->force_writemask_all = inst->force_writemask_all;
if (!entry->dst.equals(inst->src[i])) {
acp[entry->dst.nr % ACP_HASH_SIZE].push_tail(entry);
} else {