mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 17:20:10 +01:00
r300: don't merge w channel in fragment shaders
Skip the merge if one of the instructions writes just w channel and we are compiling a fragment shader. We can pair-schedule it together later anyway and it will also give the scheduler a bit more flexibility. Shader-db stats with RV530: total instructions in shared programs: 169522 -> 169509 (<.01%) instructions in affected programs: 14170 -> 14157 (-0.09%) total temps in shared programs: 21712 -> 21722 (0.05%) temps in affected programs: 324 -> 334 (3.09%) Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com> Reviewed-by: Filip Gawin <filip@gawin.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
This commit is contained in:
parent
268f317f22
commit
13607d8c48
1 changed files with 8 additions and 0 deletions
|
|
@ -1030,6 +1030,14 @@ static void merge_channels(struct radeon_compiler * c, struct rc_instruction * i
|
|||
cur->U.I.SaturateMode == inst->U.I.SaturateMode &&
|
||||
(cur->U.I.DstReg.WriteMask & orig_dst_wmask) == 0) {
|
||||
|
||||
/* Skip the merge if one of the instructions writes just w channel
|
||||
* and we are compiling a fragment shader. We can pair-schedule it together
|
||||
* later anyway and it will also give the scheduler a bit more flexibility.
|
||||
*/
|
||||
if (c->has_omod && (cur->U.I.DstReg.WriteMask == RC_MASK_W ||
|
||||
inst->U.I.DstReg.WriteMask == RC_MASK_W))
|
||||
continue;
|
||||
|
||||
if (inst_combination(cur, inst, RC_OPCODE_MOV, RC_OPCODE_MOV)) {
|
||||
if (merge_movs(c, inst, cur))
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue