Rhys Perry
0f60c18f29
aco: don't optimize s_or_b64(v_cmp_u_f32(a, b), cmp(a, a))
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22214 >
2023-03-31 19:41:54 +00:00
Georg Lehmann
bb7c2b70c1
aco/optimizer: remove to_SDWA
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069 >
2023-03-30 03:34:34 +00:00
Georg Lehmann
e699a4181c
aco: keep label_mul/usedef/minmax in apply_extract
...
16bit int mad/fma/minmax combining can work with opsel set.
All other optimizations should already check if the instruction uses sdwa,
because we don't check this when applying the label initially.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069 >
2023-03-30 03:34:34 +00:00
Georg Lehmann
7014145ab2
aco/optimizer: use opsel for VOP12C
...
Foz-DB GFX1100:
Totals from 11759 (8.72% of 134864) affected shaders:
VGPRs: 848288 -> 844556 (-0.44%); split: -0.44%, +0.00%
SpillSGPRs: 8527 -> 8543 (+0.19%)
SpillVGPRs: 1411 -> 1423 (+0.85%); split: -0.21%, +1.06%
CodeSize: 114337120 -> 113882472 (-0.40%); split: -0.40%, +0.01%
Scratch: 128768 -> 129024 (+0.20%); split: -0.20%, +0.40%
MaxWaves: 250962 -> 252014 (+0.42%)
Instrs: 22187426 -> 22062378 (-0.56%); split: -0.57%, +0.00%
Latency: 232655375 -> 232376977 (-0.12%); split: -0.20%, +0.08%
InvThroughput: 28292530 -> 28217699 (-0.26%); split: -0.45%, +0.18%
VClause: 352463 -> 352364 (-0.03%); split: -0.12%, +0.10%
SClause: 659282 -> 659354 (+0.01%); split: -0.02%, +0.04%
Copies: 1371369 -> 1342340 (-2.12%); split: -2.30%, +0.19%
Branches: 495903 -> 495941 (+0.01%); split: -0.00%, +0.01%
PreSGPRs: 867295 -> 863664 (-0.42%)
PreVGPRs: 793480 -> 790549 (-0.37%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069 >
2023-03-30 03:34:34 +00:00
Georg Lehmann
3907c54443
aco: don't label mul with opsel as abs/neg
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069 >
2023-03-30 03:34:34 +00:00
Georg Lehmann
a60b9313d3
aco: swap opsel when swapping VOP2/C operands
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069 >
2023-03-30 03:34:34 +00:00
Georg Lehmann
82f7b3acfa
aco: support neg(mul)/abs(mul) optimization in more cases
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069 >
2023-03-30 03:34:34 +00:00
Georg Lehmann
9d841507e1
aco: support v_cvt_f32_f16 with opsel in combine_mad_mix
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069 >
2023-03-30 03:34:34 +00:00
Georg Lehmann
9d6e223a7a
aco: update match_op3_for_vop3 for VOP12C opsel
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069 >
2023-03-30 03:34:34 +00:00
Georg Lehmann
0896ecec9a
aco: handle opsel in combine_constant_comparison_ordering
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069 >
2023-03-30 03:34:34 +00:00
Georg Lehmann
d8f07a0ddc
aco: handle opsel in combine_ordering_test
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069 >
2023-03-30 03:34:34 +00:00
Georg Lehmann
4db43415e5
aco: handle opsel in combine_comparison_ordering
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069 >
2023-03-30 03:34:34 +00:00
Georg Lehmann
8e6d79d10d
aco/optimizer: preserve opsel when fusing fma
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069 >
2023-03-30 03:34:34 +00:00
Georg Lehmann
fd3ea4ffc2
aco: clean up to_mad_mix
...
These instructions are 32bit, so they don't support opsel anyway.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22103 >
2023-03-28 23:30:08 +00:00
Georg Lehmann
b1668aedaf
aco: don't check usesModifiers for pseudo instructions
...
This can't happen.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22106 >
2023-03-27 14:22:07 +00:00
Timur Kristóf
b3933ffe60
aco: Don't add soffset to swizzled MUBUF base.
...
No Fossil DB changes on Rembrandt (GFX10.3).
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21930 >
2023-03-17 00:34:20 +00:00
Georg Lehmann
13ff4a5f64
aco: use bitfield_array for temporary neg/abs/opsel
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21766 >
2023-03-09 14:15:14 +00:00
Georg Lehmann
828aff2a2d
aco: use array indexing for opsel/opsel_lo/opsel_hi
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21766 >
2023-03-09 14:15:13 +00:00
Georg Lehmann
a47c3f84fb
aco: use integer access for neg_lo/neg_hi
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21766 >
2023-03-09 14:15:13 +00:00
Georg Lehmann
60cd3ba39f
aco: copy abs/neg with assignment
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21766 >
2023-03-09 14:15:13 +00:00
Georg Lehmann
0614c2e8bd
aco: don't reallocate fma{mk,ak,_mix} instruction
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21762 >
2023-03-08 18:42:21 +00:00
Georg Lehmann
a4873071e6
aco/optimizer: don't reallocate instruction when converting to VOP3
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21762 >
2023-03-08 18:42:21 +00:00
Georg Lehmann
de4805f25f
aco: use bitfield array helpers for valu modifiers
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023 >
2023-03-07 11:53:23 +00:00
Georg Lehmann
097a97cc42
aco: remove VOP[123C]P? structs
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023 >
2023-03-07 11:53:23 +00:00
Georg Lehmann
08542318e7
aco/optimizer: simplify using VALU instruction
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21023 >
2023-03-07 11:53:23 +00:00
Georg Lehmann
ede0630f9e
aco: use v_fma_mix_f32 for v_fma_f32 with 2 fp16 representable, different literals
...
We can pack two fp16 literals into one 32bit literal and use opsel to select
the correct value. Note that LLVM currently disassembles these instructions
incorrectly.
Foz-DB Navi21:
Totals from 13365 (9.91% of 134913) affected shaders:
VGPRs: 840880 -> 840016 (-0.10%); split: -0.11%, +0.01%
SpillSGPRs: 724 -> 722 (-0.28%)
CodeSize: 82439364 -> 82451336 (+0.01%); split: -0.06%, +0.08%
MaxWaves: 244858 -> 244980 (+0.05%)
Instrs: 15265976 -> 15247201 (-0.12%); split: -0.13%, +0.01%
Latency: 223316180 -> 223272495 (-0.02%); split: -0.03%, +0.02%
InvThroughput: 41981375 -> 41969917 (-0.03%); split: -0.04%, +0.01%
VClause: 266775 -> 266558 (-0.08%); split: -0.14%, +0.06%
SClause: 646602 -> 645996 (-0.09%); split: -0.16%, +0.07%
Copies: 794703 -> 776075 (-2.34%); split: -2.46%, +0.12%
Branches: 296317 -> 296316 (-0.00%)
PreSGPRs: 658796 -> 656479 (-0.35%); split: -0.35%, +0.00%
PreVGPRs: 744014 -> 743679 (-0.05%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20587 >
2023-03-02 10:59:05 +00:00
Georg Lehmann
ed349951cb
aco: mark mad definition as precise if the mul/add were precise
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20587 >
2023-03-02 10:59:05 +00:00
Rhys Perry
ab3184c0a2
aco: don't apply modifiers through DPP to unsupported instructions
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21201 >
2023-02-21 14:59:38 +00:00
Georg Lehmann
3bd5b583f9
aco: combine a ^ ~b and ~(a ^ b) to v_xnor_b32
...
Foz-DB Navi21:
Totals from 13 (0.01% of 134913) affected shaders:
CodeSize: 225432 -> 225180 (-0.11%)
Instrs: 41973 -> 41908 (-0.15%)
Latency: 297464 -> 297326 (-0.05%)
InvThroughput: 82536 -> 82467 (-0.08%)
Copies: 2452 -> 2440 (-0.49%)
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21410 >
2023-02-21 13:35:31 +00:00
Timur Kristóf
2c40215ab9
aco/optimizer: Change v_cmp with subgroup invocation to constant.
...
When a shader has a comparison with the subgroup invocation id,
we can use a constant instead, saving a VALU instruction.
When the constant can't be represented as a 64-bit literal,
use the s_bfm_b64 instruction to generate it instead, which
is still a win.
Fossil DB stats on GFX11:
Totals from 300 (0.22% of 134913) affected shaders:
CodeSize: 2223052 -> 2214336 (-0.39%); split: -0.43%, +0.04%
Instrs: 430216 -> 429882 (-0.08%); split: -0.14%, +0.06%
Latency: 5881180 -> 5878181 (-0.05%); split: -0.05%, +0.00%
InvThroughput: 731846 -> 729293 (-0.35%)
Copies: 31662 -> 31847 (+0.58%); split: -0.03%, +0.61%
Branches: 8241 -> 8100 (-1.71%)
PreVGPRs: 15788 -> 15786 (-0.01%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20843 >
2023-02-18 21:16:58 +01:00
Timur Kristóf
084d10a702
aco: Remove MTBUF zero operand.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21363 >
2023-02-16 17:16:34 +00:00
Georg Lehmann
5038a049f1
aco: add mov/cndmask opcodes to does_fp_op_flush_denorms
...
For completeness sake also add v_mov_b32, even if we don't use imod for it
because it's only supported since gfx10.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21170 >
2023-02-08 13:07:46 +00:00
Georg Lehmann
e527f686ca
Revert "aco: Combine v_cvt_u32_f32 with insert to v_cvt_pk_u8_f32."
...
This reverts commit 6d02054047 .
v_cvt_pk_u8_f32 returns 0xff instead of v_cvt_u32_f32 & 0xff if the input is
larger than 255.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8128
Cc: mesa-stable
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20829 >
2023-01-23 16:22:55 +00:00
Timur Kristóf
faba30a8f3
aco/optimizer: Optimize p_extract + v_mul_u32_u24 to v_mad_u32_u16.
...
This should perform the same but removes SDWA from the address
calculations in NGG culling shaders for example.
This is done because SDWA is no longer available on GFX11.
Fossil DB stats on GFX1100:
Totals from 36 (0.03% of 134913) affected shaders:
CodeSize: 300968 -> 300884 (-0.03%); split: -0.04%, +0.01%
Instrs: 60955 -> 60863 (-0.15%); split: -0.15%, +0.00%
Latency: 426809 -> 426819 (+0.00%); split: -0.06%, +0.06%
InvThroughput: 39076 -> 39025 (-0.13%); split: -0.14%, +0.01%
VClause: 1440 -> 1443 (+0.21%)
Copies: 5714 -> 5725 (+0.19%)
Fossil DB stats on GFX1100 with NGG culling enabled:
Totals from 60953 (45.18% of 134913) affected shaders:
VGPRs: 2273172 -> 2273160 (-0.00%)
CodeSize: 186401864 -> 186403036 (+0.00%); split: -0.00%, +0.00%
Instrs: 37038048 -> 36977353 (-0.16%); split: -0.16%, +0.00%
Latency: 146466770 -> 146350172 (-0.08%); split: -0.08%, +0.00%
InvThroughput: 15342790 -> 15228585 (-0.74%); split: -0.74%, +0.00%
VClause: 669662 -> 669665 (+0.00%)
Copies: 2972380 -> 2972482 (+0.00%); split: -0.01%, +0.01%
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17924 >
2023-01-16 19:27:39 +00:00
Timur Kristóf
171d76ded1
aco/optimizer: Add missing v_lshlrev condition to can_apply_extract.
...
This was already handled by apply_extract but missing from
can_apply_extract, therefore may not be properly applied everywhere.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17924 >
2023-01-16 19:27:39 +00:00
Rhys Perry
254b178d5b
aco: disallow SGPRS/constants with interpolation instructions
...
https://reviews.llvm.org/D137575
The VINTRP format cannot encode anything except VGPRs.
Reading VINTERPInstructions.td, looks like it's the same for GFX11.
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20251 >
2023-01-10 16:01:38 +00:00
Timur Kristóf
db5c3f170f
aco: Emulate Wave64 bpermute on GFX11.
...
Similar to emit_gfx10_wave64_bpermute, but uses the new
v_permlane64_b32 instruction to swap data between wave halves.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20293 >
2022-12-14 13:54:04 +00:00
Timur Kristóf
640e801651
aco: Split opcodes for GFX6 and GFX10 emulated bpermute.
...
Different sequences are emitted for these, so it makes sense to
have different opcodes too.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20293 >
2022-12-14 13:54:04 +00:00
Timur Kristóf
614348f28b
aco: Don't accept constants on p_bpermute.
...
The sequence emitted for this pseudo instruction is not ready
to handle constants or literals at all.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20293 >
2022-12-14 13:54:04 +00:00
Rhys Perry
381de3c809
aco: more carefully apply constant offsets into scratch accesses
...
Death stranding does scratch_arr[80-idx]. This doesn't seem to work if we
try to combine the subtraction into the access.
fossil-db (navi21):
Totals from 52 (0.04% of 135636) affected shaders:
Instrs: 78560 -> 79036 (+0.61%)
CodeSize: 427940 -> 431188 (+0.76%)
Latency: 1313809 -> 1318142 (+0.33%)
InvThroughput: 292833 -> 293842 (+0.34%)
VClause: 2361 -> 2555 (+8.22%); split: -0.51%, +8.73%
Copies: 8767 -> 8746 (-0.24%); split: -0.35%, +0.11%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 0e783d687a ("aco: use scratch_* for scratch load/store on GFX9+")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7735
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20117 >
2022-12-06 15:23:38 +00:00
Rhys Perry
917cfd587c
aco: use v_minmax/v_maxmin opcodes
...
fossil-db (gfx1100):
Totals from 29868 (22.12% of 135032) affected shaders:
MaxWaves: 741336 -> 741344 (+0.00%)
Instrs: 34624902 -> 34539766 (-0.25%); split: -0.25%, +0.00%
CodeSize: 187196804 -> 187192100 (-0.00%); split: -0.01%, +0.01%
VGPRs: 1816860 -> 1816788 (-0.00%); split: -0.01%, +0.01%
Latency: 502597202 -> 502245627 (-0.07%); split: -0.08%, +0.01%
InvThroughput: 84813176 -> 84586122 (-0.27%); split: -0.28%, +0.01%
VClause: 633826 -> 633749 (-0.01%); split: -0.02%, +0.01%
SClause: 1317738 -> 1317047 (-0.05%); split: -0.06%, +0.01%
Copies: 2130610 -> 2130954 (+0.02%); split: -0.03%, +0.05%
Branches: 766093 -> 765969 (-0.02%); split: -0.02%, +0.00%
PreSGPRs: 1630250 -> 1630034 (-0.01%); split: -0.02%, +0.00%
PreVGPRs: 1590777 -> 1590664 (-0.01%); split: -0.01%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19933 >
2022-12-01 21:43:28 +00:00
Rhys Perry
dfbc8e0192
aco: change order in combine_minmax()
...
Prepare for future optimizations.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19933 >
2022-12-01 21:43:28 +00:00
Georg Lehmann
7aa94efe82
aco: Combine constant bit test to s_bitcmp.
...
Foz-DB Navi21:
Totals from 73988 (54.84% of 134913) affected shaders:
VGPRs: 2959768 -> 2959752 (-0.00%)
SpillSGPRs: 10250 -> 10697 (+4.36%); split: -0.64%, +5.00%
SpillVGPRs: 2326 -> 2291 (-1.50%); split: -2.24%, +0.73%
CodeSize: 261339476 -> 261045912 (-0.11%); split: -0.12%, +0.00%
Scratch: 239616 -> 238592 (-0.43%)
Instrs: 49214044 -> 49188242 (-0.05%); split: -0.06%, +0.00%
Latency: 413214139 -> 413296229 (+0.02%); split: -0.03%, +0.05%
InvThroughput: 71741622 -> 71786300 (+0.06%); split: -0.07%, +0.13%
VClause: 856838 -> 856973 (+0.02%); split: -0.01%, +0.02%
SClause: 1504502 -> 1504567 (+0.00%); split: -0.01%, +0.02%
Copies: 4058433 -> 4060424 (+0.05%); split: -0.03%, +0.08%
Branches: 1502953 -> 1502945 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 3081927 -> 3081531 (-0.01%); split: -0.02%, +0.01%
PreVGPRs: 2513990 -> 2513992 (+0.00%)
The vast majority of instruction count regressions are caused by parallel-rdp.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18870 >
2022-11-28 18:43:53 +00:00
Georg Lehmann
73be938c48
aco: Combine bit test to s_bitcmp.
...
Foz-DB Navi21:
Totals from 6396 (4.74% of 134913) affected shaders:
VGPRs: 483280 -> 483152 (-0.03%); split: -0.03%, +0.01%
SpillSGPRs: 8119 -> 7941 (-2.19%)
CodeSize: 63377880 -> 63268556 (-0.17%); split: -0.20%, +0.03%
MaxWaves: 86778 -> 86810 (+0.04%)
Instrs: 11745621 -> 11725857 (-0.17%); split: -0.20%, +0.03%
Latency: 162400148 -> 162282230 (-0.07%); split: -0.08%, +0.01%
InvThroughput: 29179429 -> 29133173 (-0.16%); split: -0.16%, +0.00%
VClause: 208032 -> 208100 (+0.03%); split: -0.01%, +0.05%
SClause: 431390 -> 430849 (-0.13%); split: -0.24%, +0.11%
Copies: 896222 -> 893285 (-0.33%); split: -0.62%, +0.30%
Branches: 349806 -> 348770 (-0.30%); split: -0.90%, +0.60%
PreSGPRs: 618908 -> 613773 (-0.83%); split: -0.83%, +0.00%
PreVGPRs: 482901 -> 482893 (-0.00%)
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18870 >
2022-11-28 18:43:53 +00:00
Georg Lehmann
853d2cb6f1
aco: Combine s_abs and s_sub/s_add to s_absdiff.
...
Totals from 2 (0.00% of 134913) affected shaders:
CodeSize: 1344 -> 1336 (-0.60%)
Instrs: 277 -> 275 (-0.72%)
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18870 >
2022-11-28 18:43:53 +00:00
Georg Lehmann
7e1d77fd90
aco: Ignore instructions with exec operands in follow_operand.
...
No Foz-DB changes.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18870 >
2022-11-28 18:43:53 +00:00
Georg Lehmann
65a3328b4c
aco/optimizer: Cleanup ctx.uses handling for patterns which use follow_operand(..., true).
...
No Foz-DB changes.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18870 >
2022-11-28 18:43:53 +00:00
Yonggang Luo
cdbe1ad570
aco: Fixes -Werror,-Wbitwise-instead-of-logical for clang-15 in aco_optimizer.cpp
...
error message:
error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19969 >
2022-11-24 02:56:03 +00:00
Samuel Pitoiset
bb90d29660
aco: add p_dual_src_export_gfx11 for dual source blending on GFX11
...
Dual source blending must be in strict WQM mode.
Cc: 22.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19643 >
2022-11-16 18:35:10 +00:00
Georg Lehmann
6d02054047
aco: Combine v_cvt_u32_f32 with insert to v_cvt_pk_u8_f32.
...
No Foz-DB difference on Navi21.
Foz-DB GFX11:
Totals from 746 (0.55% of 134913) affected shaders:
CodeSize: 8430248 -> 8416128 (-0.17%); split: -0.17%, +0.00%
Instrs: 1617202 -> 1614707 (-0.15%)
Latency: 13943398 -> 13934161 (-0.07%); split: -0.07%, +0.00%
InvThroughput: 2601620 -> 2596624 (-0.19%); split: -0.20%, +0.01%
Copies: 114346 -> 114334 (-0.01%); split: -0.01%, +0.00%
PreVGPRs: 48314 -> 48312 (-0.00%)
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18492 >
2022-11-16 16:49:04 +00:00