mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 09:58:05 +02:00
brw/copy: Don't copy propagate through smaller entry dest size
Copy propagation would incorrectly occur in this code
mov(16) v4+2.0:UW, u0<0>:UW NoMask
...
mov(8) v6+2.0:UD, v4+2.0:UD NoMask group0
to create
mov(16) v4+2.0:UW, u0<0>:UW NoMask
...
mov(8) v6+2.0:UD, u0<0>:UD NoMask group0
This has different behavior. I think I just made a mistake when I
changed this condition in e3f502e007.
It seems like this condition could be relaxed to cover cases like (note
the change of destination stride)
mov(16) v4+2.0<2>:UW, u0<0>:UW NoMask
...
mov(8) v6+2.0:UD, v4+2.0:UD NoMask group0
I'm not sure it's worth it.
No shader-db or fossil-db changes on any Intel platform. Even the code
for the test case mentioned in the original commit did not change.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Fixes: e3f502e007 ("intel/fs: Allow copy propagation between MOVs of mixed sizes")
Closes: #12116
(cherry picked from commit 80a5d158ae)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32119>
This commit is contained in:
parent
08955d2ee8
commit
1e792b0933
2 changed files with 4 additions and 6 deletions
|
|
@ -1284,7 +1284,7 @@
|
|||
"description": "brw/copy: Don't copy propagate through smaller entry dest size",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "e3f502e0074cc0b9d5a6807fa900b240cf7e0fc6",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -825,9 +825,8 @@ try_copy_propagate(const brw_compiler *compiler, fs_inst *inst,
|
|||
* destination of the copy, and simply replacing the sources would give a
|
||||
* program with different semantics.
|
||||
*/
|
||||
if ((brw_type_size_bits(entry->dst.type) < brw_type_size_bits(inst->src[arg].type) ||
|
||||
entry->is_partial_write) &&
|
||||
inst->opcode != BRW_OPCODE_MOV) {
|
||||
if (brw_type_size_bits(entry->dst.type) < brw_type_size_bits(inst->src[arg].type) ||
|
||||
(entry->is_partial_write && inst->opcode != BRW_OPCODE_MOV)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1506,8 +1505,7 @@ try_copy_propagate_def(const brw_compiler *compiler,
|
|||
* destination of the copy, and simply replacing the sources would give a
|
||||
* program with different semantics.
|
||||
*/
|
||||
if (inst->opcode != BRW_OPCODE_MOV &&
|
||||
brw_type_size_bits(def->dst.type) <
|
||||
if (brw_type_size_bits(def->dst.type) <
|
||||
brw_type_size_bits(inst->src[arg].type))
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue