Commit Graph

169094 Commits

Author SHA1 Message Date
Mike Blumenkrantz
bd74da9d2a glthread: add _mesa_glthread_invalidate_zsbuf()
this allows frontends to trigger ancillary invalidation before syncing

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21910>
2023-03-30 05:06:47 +00:00
Mike Blumenkrantz
0c7994bb2d mapi: add InternalInvalidateFramebufferAncillaryMESA
this allows glthread to handle ancillary buffer invalidation

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21910>
2023-03-30 05:06:47 +00:00
Mike Blumenkrantz
aa9d823318 lavapipe: move default rasterizer state values to rendering_state init
these should always be set

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
38e3132dfa lavapipe: avoid uniformly unsetting gs_output_lines
instead fix the conditional now that it's possible to tell whether
a gs is bound

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
ddf8917b2d lavapipe: only unset tess_states pointers on tes bind
this is otherwise irrelevant

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
5feeb2535b lavapipe: only update shader access for bind/unbind stages
also squash a loop

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
770d162318 lavapipe: split out gfx stage unbinding
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
42ebb995c5 lavapipe: don't double unbind gfx stages on pipeline bind
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
d97d921634 lavapipe: dynamically bind noop fs at draw time when needed
this is simpler than special casing it everywhere

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
3366b4a9b9 lavapipe: unify lvp_pipeline_nir creation
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
5880fc00c2 lavapipe: add a ref for the tess_ccw nir on creation
not sure if it matters but good to be consistent

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
d127c134eb lavapipe: refactor pipeline destroy a bit
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
30db1800e9 lavapipe: delete unused struct member
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
25a47e3cc6 lavapipe: break out all the important parts of gfx pipeline setting for reuse
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
ac1f843b28 lavapipe: pull out dynamic tess origin check in gfx pipeline bind
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
295141b39b lavapipe: don't access pipeline shader structs as much during bind
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
062bf6f455 lavapipe: PIPE_SHADER_ -> MESA_SHADER_
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
ef4df9bc01 lavapipe: merge some loops in handle_graphics_pipeline()
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
8aa59f57a0 lavapipe: refactor compute shader binding
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
39bb7785e6 lavapipe: stop using rendering_state::pipeline
access shaders directly now

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:36 +00:00
Mike Blumenkrantz
d5857240bb lavapipe: add a device member to rendering_state
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:35 +00:00
Mike Blumenkrantz
b7197451d0 lavapipe: track bound shader stages on rendering_state
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:35 +00:00
Mike Blumenkrantz
771e0e14a8 lavapipe: refactor shader compile functions to not take pipeline params
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:35 +00:00
Mike Blumenkrantz
f986f85fdc lavapipe: don't memcpy tess_ccw when copying pipeline library shaders
this gets handled later

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:35 +00:00
Mike Blumenkrantz
9193fb2efd lavapipe: always copy streamout info when creating shaders
llvmpipe should be smart enough to figure this out internally

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21866>
2023-03-30 04:50:35 +00:00
Daniel Stone
80bde78084 ci/radeonsi: Skip really slow tests on stoney
These allocate way more memory than is reasonable, a bunch of times. I'd
guess they pushed the machine pretty deep into memory pressure which is
why it was all taking like 3 minutes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22193>
2023-03-30 04:16:50 +00:00
Daniel Stone
7d425b5a9b ci/radeonsi: sort and dedup stoney skips
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22193>
2023-03-30 04:16:50 +00:00
Georg Lehmann
dae13f3dc1 aco: add tests for neg(mul) with opsel
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069>
2023-03-30 03:34:35 +00:00
Georg Lehmann
02b94037f6 aco/tests: run optimize.mad_mix.input_conv.modifiers on gfx11
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069>
2023-03-30 03:34:35 +00:00
Georg Lehmann
728146b2fc aco: add test for min/max combining with opsel
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069>
2023-03-30 03:34:35 +00:00
Georg Lehmann
9499f202e8 aco: add tests for cmp ordering with opsel
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069>
2023-03-30 03:34:35 +00:00
Georg Lehmann
22903bcded aco: add tests for swap operand with opsel
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069>
2023-03-30 03:34:35 +00:00
Georg Lehmann
0b29dc5c06 aco: add tests for dpp with 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
f7bb794dda aco: add tests for fma with 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
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
9650724370 aco/gfx11: allow opsel for VOP12C
Foz-DB GFX1100:
Totals from 515 (0.38% of 134864) affected shaders:
CodeSize: 2768228 -> 2761076 (-0.26%)
Instrs: 520301 -> 518523 (-0.34%)
Latency: 5190860 -> 5187254 (-0.07%)
InvThroughput: 2120844 -> 2119447 (-0.07%)
Copies: 57238 -> 56101 (-1.99%)

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
ace017bba8 aco/ir: copy opsel when converting to DPP
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
fc1bf9c3b4 aco: return true in usesModifiers for VOP12C with 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
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
32d7a11acf aco/ra: prepare 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