Commit Graph

163600 Commits

Author SHA1 Message Date
Jordan Justen 4db33adf9d intel/isl: Disable CCS on MTL
MTL requires some ccs/aux-map changes from Jianxun Zhang, which are
still in progress. So, for now we disable ccs on MTL.

Rework:
 * Drop change in isl_surf_supports_ccs (Nanley)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20046>
2022-11-28 17:09:52 -08:00
Jordan Justen cbae305258 anv, iris: Make use of devinfo::has_caching_uapi
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19911>
2022-11-28 21:54:20 +00:00
Jordan Justen ed84f163ff intel/dev: Add devinfo::has_caching_uapi (and disable for dg1 and dg2+)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19911>
2022-11-28 21:54:20 +00:00
David Heidelberg 0213750e6d ci/alpine: disable mold on Alpine builds
All the timeouts started close to Mold linking phase, disable it.

See:
 - https://gitlab.freedesktop.org/mesa/mesa/-/jobs/32502446
 - https://gitlab.freedesktop.org/mesa/mesa/-/jobs/32465151

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20032>
2022-11-28 20:53:37 +00:00
Thong Thai afcff6f333 radeonsi/vcn/enc: add encoder statistics support
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19512>
2022-11-28 19:58:41 +00:00
Thong Thai 2d1bd619df frontends/va: add ability for encoder to output statistics
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19512>
2022-11-28 19:58:41 +00:00
Asahi Lina 022d03013a ail: Split off test-miptree.cpp from test-layout.cpp
Keep test-layout.cpp for the simple smoke tests, and move the big pile
of miptree tests to its own file.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20031>
2022-11-28 19:50:18 +00:00
Asahi Lina d0532196a2 ail: Add uncompressed twiddled texture sizing tests
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20031>
2022-11-28 19:50:18 +00:00
Asahi Lina 50ee22f5a5 ail: Rename test-compression.cpp to test-comp-twiddled.cpp
To better align with the analogous test-uncomp-twiddled.cpp

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20031>
2022-11-28 19:50:18 +00:00
Asahi Lina c52d4bef2d ail: Add more compression size test cases
Also sort the table in a consistent way, to make it easier to add
tests without creating duplicates in the future.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20031>
2022-11-28 19:50:18 +00:00
Asahi Lina c39ca7007f ail: Fix logic for buffer alignment
It turns out that specifically Z/S single-layer textures have the main
miptree padded to the page size, but not others.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20031>
2022-11-28 19:50:18 +00:00
Asahi Lina ecdcb3e1aa ail: Fix compression metadata buffer sizing corner cases
Although the metadata is possibly one byte per 8x4 block, the
logical block size for compression/allocation is a 16x16 block,
so align to that. Also align the initial dimensions to that size,
and change the minification to a simple DIV_ROUND_UP.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20031>
2022-11-28 19:50:18 +00:00
Asahi Lina 112830f1a0 asahi: Pass through layer alignment flag to the hardware
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20031>
2022-11-28 19:50:18 +00:00
Asahi Lina d88b546e65 ail: Introduce layer_alignment flag
The hardware uses this flag to determine whether layer strides are
implicitly aligned to the page size or not.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20031>
2022-11-28 19:50:18 +00:00
Rhys Perry 974358a8c1 radv/llvm: add clip distance outputs manually if they're missing
It's possible that undef is written to clip/cull distance outputs and
they're eliminated, and we never set any position export to done=1 because
outinfo->pos_exports was calculated with the expectation that clip/cull is
exported.

Eliminating the export and fixing the done=1 bit hangs because the
hardware is still expecting clip/cull distances.

Fixes dEQP-VK.rasterization.provoking_vertex.transform_feedback.first.line_list
hang with LLVM.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19200>
2022-11-28 19:18:50 +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
Gert Wollny 28c7684eb9 r600/sfn: always use four slots for Cayman trans ops
This is a partial revert of
  ed6204eb0 (r600/sfn: only use 3 channels on Cayman for trans ops)

The scheduler and/or optimizer passes generate faulty code when
we use only three slots as decribed in the spec. So for now disable
this optimization.

Fixes: ed6204eb0 (r600/sfn: only use 3 channels on Cayman for trans ops)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7774

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20034>
2022-11-28 18:34:19 +00:00
Samuel Pitoiset aa545a0012 radv: reduce CPU overhead when emitting streamout descriptors
Only the last VGT stage can have streamout.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19723>
2022-11-28 17:59:51 +00:00
Alyssa Rosenzweig eae904260b asahi: Implement DISCARD_WHOLE_RESOURCE
We can reallocate to avoid a flush.

Scrolling rosenzweig.io in Firefox with WebRender enabled is now vsyncing at
60fps instead of being capped around 50fps. SuperTuxKart is noticeably faster as
well, though this was prompted by WebRender.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20013>
2022-11-28 16:48:38 +00:00
Alyssa Rosenzweig a3e5445d4a agx: Don't depend sampler view on BO
The BO can change when shadowing, fix up at drawtime.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20013>
2022-11-28 16:48:38 +00:00
Alyssa Rosenzweig 597e303b5b agx: Add merge helpers to GenXML
From panfrost.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20013>
2022-11-28 16:48:38 +00:00
Alyssa Rosenzweig debee344a2 agx: Make empty texture pack to all-zeroes
So we can do partial textures.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20013>
2022-11-28 16:48:38 +00:00
Samuel Pitoiset db7dcc4567 radv: only install 00-radv-defaults.conf if xmlconfig is used
RADV has its own drirc file. Make sure it also uses the xmlconfig
enable option.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20029>
2022-11-28 16:19:47 +00:00
Asahi Lina f5a26cc646 asahi: Fix remaining build issues on macOS
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20030>
2022-11-28 16:10:19 +00:00
Eric Engestrom fcb207a4d3 asahi: add fallback for DRM_FORMAT_MOD_INVALID on macOS
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19879>
2022-11-28 16:00:29 +00:00
Samuel Pitoiset a6d7d2a525 radv: emit DB_RENDER_OVERRIDE2 as part of the framebuffer
The number of samples from the image has to match the number of samples
from the pipeline anyways.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19906>
2022-11-28 15:20:59 +00:00
Erik Faye-Lund 8d3c96a49c freedreno/decode: add missing dependency
The source code for rddecompiler includes adreno_common.xml.h, which is
a generated header. In order to ensure that the header has been written
when compiling rddecompiler.c, we need a dependency here.

Fixes: 03d80e0a6d ("freedreno/decode: Add 'rddecompiler' tool")
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20003>
2022-11-28 13:08:05 +00:00
Vinson Lee f6bef7305b freedreno/rddecompiler: Fix memory leak.
Fix defect reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable stream_data going out of scope leaks the storage it points to.

Fixes: a7773c3c4c ("freedreno/rddecompiler: Add shader disasm/asm support")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20028>
2022-11-28 12:59:07 +00:00
Gert Wollny 9fe16c91b3 clover: test for nir fp64 lowering options for cl_khr_fp64
With NIR we have softfp64, but we don't really want this for CL,
so check whether fp64 is lowered to a software implementation.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7750

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19919>
2022-11-28 11:48:42 +00:00
Karmjit Mahil e30b6563ca pvr: Setup tile buffers.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20007>
2022-11-28 11:38:38 +00:00
Karmjit Mahil 42e9cc010d pvr: Don't print out secondaries if they aren't used.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008>
2022-11-28 09:12:36 +00:00
Karmjit Mahil ebf639f4ff pvr: Add '+' before desc offsets in debug output.
Having the '+' makes it more obvious that it's the offset of the
primary/secondary.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008>
2022-11-28 09:12:36 +00:00
Karmjit Mahil 8a69019277 pvr: Use glsl syntax to show set and binding number.
This makes the descriptor set debug output's descriptor set number
and binding number more obvious. The previous format wasn't as
obvious unless you knew how to read it.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008>
2022-11-28 09:12:36 +00:00
Karmjit Mahil 260db8112a pvr: Change how desc set debug output section dividers are printed.
Instead of hard coding in the exact string to print out for the
divider, now we're printing the same char n times so we only need
to specify the character and how many times to retreat it.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008>
2022-11-28 09:12:36 +00:00
Karmjit Mahil 02626072e2 pvr: Don't print inactive bindings.
Previously all bindings were printed out and an "X" was used to
indicate if a binding was not active for a particular stage.
This commit just skips those bindings entirely reducing possible
confusion.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008>
2022-11-28 09:12:36 +00:00
Karmjit Mahil 6d9a7d1597 pvr: Print out empty row if dynamic primaries or secondaries are missing.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008>
2022-11-28 09:12:36 +00:00
Karmjit Mahil 567ae39738 pvr: Explain why dynamic descriptors are allocated separately.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008>
2022-11-28 09:12:35 +00:00
Konstantin Seurer c5d91ab254 radv/rt: Check space before emitting descriptors
Found by inspection.

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20020>
2022-11-27 18:45:41 +00:00
Konstantin Seurer 0966fb2c10 radv/ray_queries: Fix AABB handling
AABB intersections always have to be committed manually.
-> We don't have to copy opaque ones to closest.

It's also invalid to query t for candidate AABBs.

Totals from 7 (14.29% of 49) affected shaders:
CodeSize: 171008 -> 169672 (-0.78%)
Instrs: 32499 -> 32250 (-0.77%); split: -0.78%, +0.01%
Latency: 418859 -> 414759 (-0.98%); split: -0.98%, +0.00%
InvThroughput: 89182 -> 88251 (-1.04%); split: -1.05%, +0.00%
VClause: 602 -> 599 (-0.50%)
SClause: 837 -> 835 (-0.24%)
Copies: 4804 -> 4802 (-0.04%); split: -0.35%, +0.31%
Branches: 1593 -> 1585 (-0.50%)
PreSGPRs: 567 -> 566 (-0.18%)

Fixes: 3f72061 ("radv/rq: Use the common traversal helper")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19698>
2022-11-27 12:57:02 +01:00
Konstantin Seurer 409556f048 radv/ray_queries: Move some initialization outside a likely branch
Gets rid of some copies.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19698>
2022-11-27 12:57:02 +01:00
Marek Olšák 8fdaa25c54 frontend/dri: rewrite and comment dri_make_current to make it make sense
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19741>
2022-11-27 02:52:42 +00:00
Marek Olšák 51fcabfb04 frontend/dri: unduplicate flush_drawable callback
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19741>
2022-11-27 02:52:42 +00:00
Marek Olšák eaf99194ea frontend/dri: remove the drawable ctx hack, we should always use current context
I've checked the loaders that this is what they expect.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19741>
2022-11-27 02:52:42 +00:00
Marek Olšák f2c4aba9e1 frontend/dri: clean up updating dri_drawable::refcount
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19741>
2022-11-27 02:52:42 +00:00
Marek Olšák 7d5b1cd02c frontend/dri: move callbacks from the VTable into dri_screen, dri_drawable
This just moves the callbacks and renames the functions.
Some functions had to be moved up because they are initialized there.
Remove some obsolete comments.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19741>
2022-11-27 02:52:42 +00:00
Marek Olšák f34d607d2f frontend/dri: clean up the hacky implementation of kopper_drawable
Just put the kopper_drawable fields into dri_drawable and remove
kopper_drawable. The creation code is simplified.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19741>
2022-11-27 02:52:42 +00:00