Vinson Lee [Mon, 21 Aug 2023 00:31:06 +0000 (17:31 -0700)]
nv50: Remove unused value
Fix defect reported by Coverity Scan.
Unused value (UNUSED_VALUE)
assigned_pointer: Assigning value from &nv50->vtxbuf[b] to vb here, but
that stored value is overwritten before it can be used.
Fixes:
76725452239 ("gallium: move vertex stride to CSO")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24801>
Paul Gofman [Fri, 18 Aug 2023 21:58:12 +0000 (15:58 -0600)]
driconf: add a workaround for Rainbow Six Extraction
CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24784>
M Henning [Sat, 19 Aug 2023 19:48:02 +0000 (15:48 -0400)]
nv/codegen: Delete copy and assign
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24904>
M Henning [Sat, 19 Aug 2023 19:46:14 +0000 (15:46 -0400)]
nv/codegen: Change copy-constructor call to assign
This almost certainly intends to call the user-definied assignment
operator here instead of the automatically generated copy constructor.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24904>
Ian Romanick [Fri, 21 Jul 2023 23:50:01 +0000 (16:50 -0700)]
nir/algebraic: Remove redundant pack / unpack lowering patterns
No shader-db or fossil-db changes on any Intel platform.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24900>
Ian Romanick [Sat, 22 Jul 2023 00:01:35 +0000 (17:01 -0700)]
nir/builder: Add nir_extract_i8_imm and nir_extract_u8_imm helpers
v2: Fix problems with 16-bit src0.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24899>
Caio Oliveira [Thu, 27 Jul 2023 21:54:02 +0000 (14:54 -0700)]
hasvk/tests: Propagate failures to gtest
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24355>
Caio Oliveira [Thu, 27 Jul 2023 21:18:43 +0000 (14:18 -0700)]
hasvk/tests: Link a single hasvk_tests binary using gtest
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24355>
Caio Oliveira [Thu, 27 Jul 2023 21:06:45 +0000 (14:06 -0700)]
hasvk/tests: Refactor state_pool_test_helper to not use macros for parametrization
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24355>
Caio Oliveira [Thu, 27 Jul 2023 21:54:02 +0000 (14:54 -0700)]
anv/tests: Propagate failures to gtest
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24355>
Caio Oliveira [Thu, 27 Jul 2023 21:18:43 +0000 (14:18 -0700)]
anv/tests: Link a single anv_tests binary using gtest
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24355>
Caio Oliveira [Thu, 27 Jul 2023 21:06:45 +0000 (14:06 -0700)]
anv/tests: Refactor state_pool_test_helper to not use macros for parametrization
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24355>
David Heidelberg [Thu, 24 Aug 2023 17:28:01 +0000 (19:28 +0200)]
ci/panfrost: we have enough device, parallelize Vulkan tests
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24873>
David Heidelberg [Thu, 24 Aug 2023 17:26:47 +0000 (19:26 +0200)]
ci/panfrost: add G52 flakes
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24873>
Roland Scheidegger [Fri, 25 Aug 2023 13:46:35 +0000 (15:46 +0200)]
lavapipe: further limit accurate_a0 hack
With lavapipe the previous change to only enable the hack when there's
no textures bound doesn't work anymore, since we don't have that
information when using the texture handles.
So add another random state restriction which is sufficient to pass
tests. (This really needs a better long term solution.)
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24887>
Mike Blumenkrantz [Fri, 25 Aug 2023 16:46:36 +0000 (12:46 -0400)]
zink: add a618 flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24892>
Pavel Ondračka [Tue, 22 Aug 2023 14:25:10 +0000 (16:25 +0200)]
r300: there is no limitation on presubtract source file
RV530 shader-db:
total instructions in shared programs: 128840 -> 128803 (-0.03%)
instructions in affected programs: 1085 -> 1048 (-3.41%)
helped: 37
HURT: 1
total presub in shared programs: 7670 -> 7751 (1.06%)
presub in affected programs: 328 -> 409 (24.70%)
helped: 0
HURT: 81
total temps in shared programs: 16926 -> 16939 (0.08%)
temps in affected programs: 182 -> 195 (7.14%)
helped: 6
HURT: 19
total cycles in shared programs: 193751 -> 193729 (-0.01%)
cycles in affected programs: 3088 -> 3066 (-0.71%)
helped: 33
HURT: 5
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24830>
Pavel Ondračka [Mon, 17 Jul 2023 12:49:21 +0000 (14:49 +0200)]
r300: move power of two multipliers down
RV530 shader-db:
total instructions in shared programs: 128864 -> 128840 (-0.02%)
instructions in affected programs: 1260 -> 1236 (-1.90%)
helped: 21
HURT: 2
total presub in shared programs: 7682 -> 7670 (-0.16%)
presub in affected programs: 77 -> 65 (-15.58%)
helped: 12
HURT: 0
total omod in shared programs: 386 -> 403 (4.40%)
omod in affected programs: 3 -> 20 (566.67%)
helped: 0
HURT: 14
total temps in shared programs: 16948 -> 16926 (-0.13%)
temps in affected programs: 280 -> 258 (-7.86%)
helped: 20
HURT: 2
total cycles in shared programs: 194101 -> 193751 (-0.18%)
cycles in affected programs: 3422 -> 3072 (-10.23%)
helped: 25
HURT: 5
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6855
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24830>
Pavel Ondračka [Tue, 22 Aug 2023 14:08:01 +0000 (16:08 +0200)]
r300: convert x * 2 into x + x for presubtract
total instructions in shared programs: 128859 -> 128864 (<.01%)
instructions in affected programs: 931 -> 936 (0.54%)
helped: 0
HURT: 5
total presub in shared programs: 7635 -> 7682 (0.62%)
presub in affected programs: 208 -> 255 (22.60%)
helped: 0
HURT: 17
total cycles in shared programs: 194124 -> 194101 (-0.01%)
cycles in affected programs: 1671 -> 1648 (-1.38%)
helped: 9
HURT: 1
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24830>
Pavel Ondračka [Wed, 9 Aug 2023 08:17:48 +0000 (10:17 +0200)]
r300: implement bias presubtract
RV530 shader-db:
total instructions in shared programs: 129468 -> 128859 (-0.47%)
instructions in affected programs: 34432 -> 33823 (-1.77%)
helped: 362
HURT: 56
total presub in shared programs: 5411 -> 7635 (41.10%)
presub in affected programs: 2069 -> 4293 (107.49%)
helped: 8
HURT: 468
total temps in shared programs: 16918 -> 16944 (0.15%)
temps in affected programs: 2022 -> 2048 (1.29%)
helped: 73
HURT: 79
total lits in shared programs: 3555 -> 2913 (-18.06%)
lits in affected programs: 2346 -> 1704 (-27.37%)
helped: 479
HURT: 0
total cycles in shared programs: 194675 -> 194124 (-0.28%)
cycles in affected programs: 62939 -> 62388 (-0.88%)
helped: 343
HURT: 84
Also dEQP-GLES2.functional.shaders.random.trigonometric.fragment.15
now fits into the instruction limit on RV370.
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24830>
Pavel Ondračka [Wed, 9 Aug 2023 06:32:01 +0000 (08:32 +0200)]
r300: exit early in presubtract is not supported
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24830>
Pavel Ondračka [Mon, 17 Jul 2023 11:17:04 +0000 (13:17 +0200)]
r300: reorder for easier presubtract 1-x pattern recognition
It is much easier to just add a simple late algebraic pass than actually
trying to teach the backend to recognize all the different patterns.
RV530 shader-db:
total instructions in shared programs: 129643 -> 129468 (-0.13%)
instructions in affected programs: 17665 -> 17490 (-0.99%)
helped: 176
HURT: 39
total presub in shared programs: 4912 -> 5411 (10.16%)
presub in affected programs: 1651 -> 2150 (30.22%)
helped: 0
HURT: 287
total temps in shared programs: 16904 -> 16918 (0.08%)
temps in affected programs: 812 -> 826 (1.72%)
helped: 25
HURT: 37
total cycles in shared programs: 194771 -> 194675 (-0.05%)
cycles in affected programs: 28096 -> 28000 (-0.34%)
helped: 146
HURT: 41
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9364
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24830>
Mike Blumenkrantz [Mon, 17 Oct 2022 14:11:08 +0000 (10:11 -0400)]
zink: pass KERNEL shaders through successfully
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24868>
Mike Blumenkrantz [Mon, 17 Oct 2022 13:34:01 +0000 (09:34 -0400)]
rusticl: fixes for zink shader images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24868>
Karol Herbst [Tue, 22 Aug 2023 17:37:52 +0000 (19:37 +0200)]
rusticl/device: _MAX_CONST_BUFFER0_SIZE is unsigned
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24868>
Karol Herbst [Tue, 22 Aug 2023 19:17:33 +0000 (21:17 +0200)]
rusticl: add debug option to sync every event
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24868>
Samuel Pitoiset [Wed, 23 Aug 2023 12:14:40 +0000 (14:14 +0200)]
radv,aco: remove unused clip/cull distances variables
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24883>
Samuel Pitoiset [Thu, 24 Aug 2023 07:41:46 +0000 (09:41 +0200)]
aco: add support for compiling {VS,TES}+GS separately on GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24862>
Samuel Pitoiset [Thu, 24 Aug 2023 07:41:55 +0000 (09:41 +0200)]
aco: ensure to initialize exec manually for non-monolithic {VS,TES}/GS on GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24862>
Samuel Pitoiset [Thu, 24 Aug 2023 06:13:02 +0000 (08:13 +0200)]
radv: preserve shader arguments for non-monolithic {VS,TES}/GS on GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24862>
Samuel Pitoiset [Thu, 24 Aug 2023 06:13:26 +0000 (08:13 +0200)]
radv: always declare some arguments for non-monolithic {VS,TES}/GS shaders
When compiling VS/TES and GS separately, we can't know if the GS will
need shader queries, so we have to always declare this argument.
Similar story for the view index.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24862>
Kenneth Graunke [Fri, 25 Aug 2023 07:12:43 +0000 (00:12 -0700)]
iris: Check prog[] instead of uncompiled[] for BLORP state skipping
Huge thanks to Tapani Pälli for debugging this issue, figuring out
what was going wrong, proposing fixes, and walking me through where
things were going off the rails.
BLORP always disables tessellation and geometry shaders. Our handling
tried to look at ice->shaders.uncompiled[] to determine whether the next
draw needed those shaders. If not, we can leave BLORP's residual state
that disabled those stages in place, and skip looking at it.
Unfortunately, predicting the future is a bit fraught, in part due to
the uncompiled[] and prog[] arrays being slightly out of sync at times.
Consider the following case:
1. Draw with tessellation shaders in place
=> uncompiled[TES] and prog[TES] will both point at valid shaders.
2. Gallium calls pipe->bind_tes_state(NULL).
=> This makes uncompiled[TES] point at NULL, and flags
IRIS_STAGE_DIRTY_UNCOMPILED_TES.
Because iris_update_compiled_shaders() hasn't happened yet,
uncompiled[TES] is NULL but prog[TES] has the stale TES from
the previous draw still.
3. BLORP operations happen
=> BLORP sees uncompiled[TES] == NULL and decides that tessellation
is off for the upcoming draws. So it skips flagging tess state.
4. Gallium calls pipe->bind_tes_state(shader from step #1).
=> uncompiled[TES] points at the original shader.
IRIS_STAGE_DIRTY_UNCOMPILED_TES gets flagged again.
5. Draw again
=> This calls iris_update_compiled_shaders(), which sees that
a TES is bound, and calls iris_update_compiled_tes(). But
because the same shader was bound as before, the program it
comes up with is identical to the one already bound at
ice->shaders.prog[TES]. So, it thinks it doesn't have to
flag any tessellation state dirty because it was already
set up for the last draw.
This random unbind and rebind between draws leads to a situation
where, at step #3, BLORP thinks it can skip flagging tessellation
state (nothing is bound), and at step #5, normal state handling
thinks it can skip flagging tessellation state (nothing changed
since last time). So nobody does, and things break.
This unbind appears to be happening when st_release_variants()
decides it wants to free some shaders. Then a rebind happens to
put back the actual shader for the draw. So, it's not theoretical.
To fix this, we change BLORP to look at ice->shaders.prog[] rather
than uncompiled[]. This is equivalent to thinking about the previous
draw, rather than the next. If the last draw had tessellation off,
then BLORP's disabling was a no-op, and the GPU is still in the same
state as the previous draw. This is more reliable than predicting
the future.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8308
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9678
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24880>
Yiwei Zhang [Mon, 21 Aug 2023 22:15:26 +0000 (15:15 -0700)]
venus: set deviceMemoryReport feature
VK_EXT_device_memory_report is implemented in venus driver side, which
has a feature struct. So we must enable it after setting features for
renderer extensions. This change also includes tiny format fixes.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24881>
Konstantin Seurer [Fri, 18 Aug 2023 10:30:05 +0000 (12:30 +0200)]
venus: Use the common GetPhysicalDeviceFeatures2 implementation
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24881>
Konstantin Seurer [Wed, 16 Aug 2023 15:16:07 +0000 (17:16 +0200)]
vulkan/wsi/x11: Implement capture hotkey using the keymap
This way, we can avoid opening another connection. The capture key is
changes to F1 because F12 has issues on Wayland. (After pressing F12,
all keys become unresponsive, refocussing the window fixes it)
Fixes: 291fa05 ("vulkan/wsi/x11: Capture traces using a hotkey")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9578
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24710>
Samuel Pitoiset [Tue, 15 Aug 2023 13:20:16 +0000 (15:20 +0200)]
aco: add support for compiling VS+TCS separately on GFX9+
The VS will just jump to the TCS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24697>
Samuel Pitoiset [Mon, 21 Aug 2023 13:50:23 +0000 (15:50 +0200)]
aco: ensure to initialize exec manually for VS as LS on GFX9+
When VS and TCS are compiled separately with shader object on GFX9+.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24697>
Samuel Pitoiset [Tue, 15 Aug 2023 08:52:53 +0000 (10:52 +0200)]
aco: disable shared VGPRs for non-monolithic shaders on GFX9+
For unmerged shaders on GFX9+, we would need to jump to the second
shader part which means shared VGPRs can't be enabled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24697>
Samuel Pitoiset [Wed, 23 Aug 2023 16:11:14 +0000 (18:11 +0200)]
radv: preserve shader arguments for non-monolithic VS/TCS on GFX9+
This is more robust than re-creating the function signature in ACO.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24697>
Samuel Pitoiset [Wed, 23 Aug 2023 16:10:25 +0000 (18:10 +0200)]
ac: allow to mark shader arguments as preserved
These arguments would be used by ACO to generate a function signature
for merged shaders automatically.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24697>
Samuel Pitoiset [Tue, 15 Aug 2023 09:56:56 +0000 (11:56 +0200)]
radv: add a new shader argument for non-monolithic shaders PC
This will be used to jump from VS to TCS/GS or TES to GS on GFX9+.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24697>
Samuel Pitoiset [Wed, 23 Aug 2023 14:56:58 +0000 (16:56 +0200)]
radv: always declare some arguments for non-monolithic VS/TCS shaders
For separate VS/TCS compilation on GFX9+, the TCS might be using push
constants but not the VS and we can't know this information when
compiling the VS. Similar logic for the other arguments.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24697>
Samuel Pitoiset [Tue, 15 Aug 2023 09:41:17 +0000 (11:41 +0200)]
radv: force indirect descriptor sets for non-monolithic shaders
When VS and TCS are compiled separately on GFX9+, we can't know how
many descriptor sets are used for both stages and the function
arguments must match.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24697>
Samuel Pitoiset [Tue, 15 Aug 2023 09:37:46 +0000 (11:37 +0200)]
radv: do not inline push constants for non-monolithic shaders
It's hard to implement this because the function arguments must match
when eg. VS or TCS are compiled separately on GFX9+.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24697>
Samuel Pitoiset [Wed, 23 Aug 2023 14:48:49 +0000 (16:48 +0200)]
radv: use info->uses_view_index directly when declaring shader arguments
No need for a separate variable.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24697>
Samuel Pitoiset [Mon, 14 Aug 2023 10:01:49 +0000 (12:01 +0200)]
radv: add radv_shader_info::is_monolithic
This will be used to implement shader object on GFX9+.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24697>
Benjamin Cheng [Mon, 21 Aug 2023 13:58:15 +0000 (09:58 -0400)]
anv/video: send h264 scaling list in raster order
ITU spec defines the H264 ScalingList{4x4,8x8} in zig-zag order, but
Intel HW wants raster order.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24572>
Benjamin Cheng [Tue, 8 Aug 2023 23:52:37 +0000 (19:52 -0400)]
radv/video: send h264 scaling list in raster order
ITU spec defines the H264 ScalingList{4x4,8x8} in zig-zag order, but
AMD HW wants raster order.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24572>
Benjamin Cheng [Tue, 8 Aug 2023 23:20:52 +0000 (19:20 -0400)]
util/vl: extract gallium vl scanning data to shared code
Vulkan video on both ANV and RADV need these data to make converting
from zig-zag to raster order easier.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24572>
Benjamin Cheng [Wed, 9 Aug 2023 05:32:16 +0000 (01:32 -0400)]
anv/video: use vk_video_derive_h264_scaling_list
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24572>
Benjamin Cheng [Wed, 9 Aug 2023 04:23:12 +0000 (00:23 -0400)]
radv/video: use vk_video_derive_h264_scaling_list
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24572>
Benjamin Cheng [Wed, 9 Aug 2023 04:19:27 +0000 (00:19 -0400)]
vulkan/video: add helper to derive H264 scaling lists
The H264 spec defines a complicated way of layering PPS scaling lists
on top of SPS scaling lists. The details can be found in 7.4.2.1
(seq_scaling_matrix_present_flag semantics) and 7.4.2.2
(pic_scaling_matrix_present_flag semantics).
Both ANV and RADV need to derive the final scaling lists sent to HW
using this logic in order to handle H264 scaling lists correctly.
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24572>
Yiwei Zhang [Thu, 24 Aug 2023 21:56:02 +0000 (14:56 -0700)]
venus: add no_sparse debug option to disable sparse resource support
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24877>
twisted89 [Tue, 8 Aug 2023 21:19:55 +0000 (22:19 +0100)]
util/driconf: add workarounds for the Chronicles of Riddick
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24567>
Mike Blumenkrantz [Thu, 24 Aug 2023 19:38:32 +0000 (15:38 -0400)]
zink: fix rewrite_read_as_0 filtering
Fixes:
9e42553ca8d ("zink: use lowered io (kinda) for i/o vars")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24874>
Faith Ekstrand [Thu, 24 Aug 2023 16:56:35 +0000 (11:56 -0500)]
nouveau/mme: Fix a compile warning
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24840>
Faith Ekstrand [Tue, 22 Aug 2023 23:12:10 +0000 (18:12 -0500)]
nvk: Plumb no_prefetch through to the DRM back-end
Instead of using bit 23 of nvk_cmd_push::range for this, pass it as a
separate bool. This lets us use the actual kernel flag with the new
UAPI.
Reviewed-by: Danilo Krummrich <dakr@redhat.com>
Tested-by: Danilo Krummrich <dakr@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24840>
Faith Ekstrand [Tue, 22 Aug 2023 23:04:24 +0000 (18:04 -0500)]
drm-uapi: Sync nouveau_drm.h
From https://cgit.freedesktop.org/drm-misc/
commit
443f9e0b1ab5e3b95abf8606097d13e30e2f2413
Author: Danilo Krummrich <dakr@redhat.com>
Date: Wed Aug 23 20:15:34 2023 +0200
drm/nouveau: uapi: don't pass NO_PREFETCH flag implicitl
Reviewed-by: Danilo Krummrich <dakr@redhat.com>
Tested-by: Danilo Krummrich <dakr@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24840>
Ian Romanick [Wed, 23 Aug 2023 19:53:56 +0000 (12:53 -0700)]
util/rb-tree: Fix typo in comment
Trivial.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24856>
Ian Romanick [Wed, 23 Aug 2023 19:08:21 +0000 (12:08 -0700)]
util/rb-tree: Return the actual first node from rb_tree_search
Previously rb_tree_search would return the first node encountered, but
that may not be the first node that would be encoutnered by, say,
rb_tree_foreach.
Two test cases are added.
v2: Add more curly braces. Suggested by Faith.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24856>
David Heidelberg [Thu, 24 Aug 2023 15:38:51 +0000 (17:38 +0200)]
ci/iris: add GL46.arrays_of_arrays_gl.SizedDeclarationsPrimitive timeout
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24870>
Dmitry Baryshkov [Thu, 24 Aug 2023 04:48:54 +0000 (07:48 +0300)]
tu: Pass real size of prime buffers to allocator
The msm driver reserves the actual DMABUF size in the memory map, while
TU can request smaller memory chunk to be allocated. This potentially
can lead to a situation when next allocation IOVA will be in the middle
of the address space which is reserved for the DMABUF. Pass the
`real_size' to TU allocator instead, so that kernel and userspace have
the same picture of memory allocations.
Cc: mesa-stable
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24861>
Alyssa Rosenzweig [Wed, 23 Aug 2023 16:53:26 +0000 (12:53 -0400)]
treewide: Also handle struct nir_builder form
Via Coccinelle patch:
@def@
typedef bool;
typedef nir_builder;
typedef nir_instr;
typedef nir_def;
identifier fn, instr, intr, x, builder, data;
@@
static fn(struct nir_builder* builder,
-nir_instr *instr,
+nir_intrinsic_instr *intr,
...)
{
(
- if (instr->type != nir_instr_type_intrinsic)
- return false;
- nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
|
- nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
- if (instr->type != nir_instr_type_intrinsic)
- return false;
)
<...
(
-instr->x
+intr->instr.x
|
-instr
+&intr->instr
)
...>
}
@pass depends on def@
identifier def.fn;
expression shader, progress;
@@
(
-nir_shader_instructions_pass(shader, fn,
+nir_shader_intrinsics_pass(shader, fn,
...)
|
-NIR_PASS_V(shader, nir_shader_instructions_pass, fn,
+NIR_PASS_V(shader, nir_shader_intrinsics_pass, fn,
...)
|
-NIR_PASS(progress, shader, nir_shader_instructions_pass, fn,
+NIR_PASS(progress, shader, nir_shader_intrinsics_pass, fn,
...)
)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24852>
Alyssa Rosenzweig [Wed, 23 Aug 2023 16:48:10 +0000 (12:48 -0400)]
treewide: Use nir_shader_intrinsic_pass sometimes
This converts a lot of trivial passes. Nice boilerplate deletion. Via Coccinelle
patch (with a small manual fix-up for panfrost where coccinelle got confused by
genxml + ninja clang-format squashed in, and for Zink because my semantic patch
was slightly buggy).
@def@
typedef bool;
typedef nir_builder;
typedef nir_instr;
typedef nir_def;
identifier fn, instr, intr, x, builder, data;
@@
static fn(nir_builder* builder,
-nir_instr *instr,
+nir_intrinsic_instr *intr,
...)
{
(
- if (instr->type != nir_instr_type_intrinsic)
- return false;
- nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
|
- nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
- if (instr->type != nir_instr_type_intrinsic)
- return false;
)
<...
(
-instr->x
+intr->instr.x
|
-instr
+&intr->instr
)
...>
}
@pass depends on def@
identifier def.fn;
expression shader, progress;
@@
(
-nir_shader_instructions_pass(shader, fn,
+nir_shader_intrinsics_pass(shader, fn,
...)
|
-NIR_PASS_V(shader, nir_shader_instructions_pass, fn,
+NIR_PASS_V(shader, nir_shader_intrinsics_pass, fn,
...)
|
-NIR_PASS(progress, shader, nir_shader_instructions_pass, fn,
+NIR_PASS(progress, shader, nir_shader_intrinsics_pass, fn,
...)
)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24852>
David Heidelberg [Mon, 21 Aug 2023 17:48:32 +0000 (19:48 +0200)]
ci: switch to 6.4 kernel, improving Adreno 660 reliability
Second argument is to leave Linux 6.3 which is EOL.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24815>
David Heidelberg [Mon, 31 Jul 2023 13:42:47 +0000 (16:42 +0300)]
ci/freedreno: There is only one King of Town.
Drop -r1, which got removed in the Linux 6.4.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24815>
David Heidelberg [Mon, 21 Aug 2023 19:54:09 +0000 (21:54 +0200)]
ci/piglit: add extra space on top to prevent single quote getting into URL
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24815>
Karol Herbst [Wed, 5 Oct 2022 14:16:39 +0000 (09:16 -0500)]
zink: update some compute caps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24859>
Karol Herbst [Tue, 22 Aug 2023 19:18:17 +0000 (21:18 +0200)]
zink: fix global stores
We have to cast the value if the type doesn't match.
Fixes:
ddc5c304899 ("zink: handle global and scratch vars")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24859>
Karol Herbst [Tue, 18 Oct 2022 14:47:47 +0000 (16:47 +0200)]
zink: fix source type in load/store scratch
Fixes:
ddc5c304899 ("zink: handle global and scratch vars")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24859>
Mike Blumenkrantz [Mon, 17 Oct 2022 15:49:05 +0000 (11:49 -0400)]
zink: use Aligned with global load/store ops
this is required by spec
Fixes:
ddc5c304899 ("zink: handle global and scratch vars")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24859>
Mike Blumenkrantz [Thu, 6 Oct 2022 15:55:56 +0000 (11:55 -0400)]
zink: handle global atomic intrinsics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24859>
Mauro Rossi [Thu, 8 Dec 2022 15:29:04 +0000 (16:29 +0100)]
hasvk/android: remove numFds check
Change required for compatibility with minigbm gralloc4
due to gralloc handle having DRV_MAX_FDS = (DRV_MAX_PLANES + 1)
https://android.googlesource.com/platform/external/minigbm/+/refs/tags/android-13.0.0_r18/cros_gralloc/cros_gralloc_handle.h#14
Cc: "22.3" mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7807
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20231>
Mauro Rossi [Thu, 8 Dec 2022 15:05:12 +0000 (16:05 +0100)]
anv/android: remove numFds check
Change required for compatibility with minigbm gralloc4
due to gralloc handle having DRV_MAX_FDS = (DRV_MAX_PLANES + 1)
https://android.googlesource.com/platform/external/minigbm/+/refs/tags/android-13.0.0_r18/cros_gralloc/cros_gralloc_handle.h#14
Cc: "22.2" "22.3" mesa-stable
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20231>
Chris Spencer [Wed, 23 Aug 2023 11:02:25 +0000 (12:02 +0100)]
anv: Don't reject Android image format if external props not supplied
anv_GetPhysicalDeviceImageFormatProperties2 returns 'not supported' if an
Android hardware buffer external memory handle type is specified, but no
external image format properties output struct is supplied. This struct is
optional, so we should populate it if present, but return successfully
either way.
This fixes an error when using ANV with hwui, which otherwise prevents the
system from booting.[1]
[1] https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/libs/hwui/renderthread/VulkanSurface.cpp;l=271;drc=
ad3fb95aa2fe0be59d3e991ddc883592ab5542bc
Signed-off-by: Chris Spencer <spencercw@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24844>
Simon Ser [Fri, 26 Aug 2022 09:35:13 +0000 (11:35 +0200)]
vulkan/wsi/wayland: add support for IMMEDIATE
Use the tearing-control-unstable-v1 protocol to indicate to the
Wayland compositor that tearing is acceptable.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18268>
Simon Ser [Mon, 21 Nov 2022 10:49:06 +0000 (11:49 +0100)]
wayland: enable use of wayland-protocols as a subproject
This allows developers to link subprojects/wayland-protocols/ to
a repository checkout. Useful when adding support for new protocols.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18268>
Jordan Justen [Fri, 18 Aug 2023 07:49:18 +0000 (00:49 -0700)]
intel/dev: Add more RPL PCI IDs
Ref: https://patchwork.freedesktop.org/patch/553646/?series=122712&rev=1
Cc: mesa-stable
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/24820>
Jordan Justen [Fri, 18 Aug 2023 07:49:18 +0000 (00:49 -0700)]
intel/dev: Use RPL-U name on RPL-U devices
Ref: https://patchwork.freedesktop.org/patch/553646/?series=122712&rev=1
Cc: mesa-stable
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/24820>
Samuel Pitoiset [Tue, 22 Aug 2023 20:49:27 +0000 (22:49 +0200)]
radv: stop declaring unused SGPR arguments for PS epilogs
ACO no longer requires these arguments.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24838>
Samuel Pitoiset [Fri, 18 Aug 2023 15:30:04 +0000 (17:30 +0200)]
radv: fix the per-patch data offset when TES isn't linked with TCS
When TCS and TES aren't linked together and TCS exports unused outputs,
the per-patch data offset needs to be adjusted. This is similar to the
LS-HS vertex stride when VS and TCS aren't linked together.
This fixes a bunch of failures by forcing the driver to use TCS epilogs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24776>
Tapani Pälli [Wed, 23 Aug 2023 11:55:48 +0000 (14:55 +0300)]
mesa: fix some TexParameter and SamplerParameter cases
EXT extension was added without tests so these functions did
not work properly.
Fixes:
799710be889 ("mesa: Add EXT_texture_mirror_clamp_to_edge to extension table")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24845>
Yonggang Luo [Sun, 6 Aug 2023 05:08:09 +0000 (13:08 +0800)]
compiler/glsl: Move glsl_print_type from glsl_types.* to ir_print_visitor.cpp
glsl_print_type only referenced in ir_print_visitor.cpp
there is no need expose it
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24824>
Yonggang Luo [Sun, 6 Aug 2023 05:03:00 +0000 (13:03 +0800)]
compiler: use 4 instead ATOMIC_COUNTER_SIZE in glsl_types.h to avoid #include "mesa/main/config.h"
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24824>
Yonggang Luo [Sun, 6 Aug 2023 05:02:12 +0000 (13:02 +0800)]
d3d12: replace use of MAX_VERTEX_STREAMS with PIPE_MAX_VERTEX_STREAMS
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24824>
Yonggang Luo [Sun, 6 Aug 2023 05:01:40 +0000 (13:01 +0800)]
intel/brw: use 4 instead of MAX_VERTEX_STREAMS to avoid #include "mesa/main/config.h"
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24824>
Yonggang Luo [Sun, 6 Aug 2023 05:00:53 +0000 (13:00 +0800)]
sfn: Use 4 instead of ATOMIC_COUNTER_SIZE
../../src/gallium/drivers/r600/sfn/sfn_nir.cpp:458:59: error: ‘ATOMIC_COUNTER_SIZE’ was not declared in this scope
../../src/gallium/drivers/r600/sfn/sfn_shader.cpp:609:53: error: ‘ATOMIC_COUNTER_SIZE’ was not declared in this scope
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24824>
Rob Clark [Mon, 21 Aug 2023 20:35:57 +0000 (13:35 -0700)]
tu: Workaround bionic _SC_LEVEL1_DCACHE_LINESIZE
Bionic just returns a hard-coded 0, which isn't helpful. But
fortunately on aarch64 it is easy enough just to read the value
ourselves.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24829>
Kenneth Graunke [Tue, 15 Aug 2023 08:15:26 +0000 (01:15 -0700)]
intel/fs: Dump IR for pre-RA scheduler modes in DEBUG_OPTIMIZER
This lets us more easily compare and contrast the various scheduling
options that the compiler considered.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24707>
Kenneth Graunke [Tue, 15 Aug 2023 02:32:25 +0000 (19:32 -0700)]
intel/fs: Pick the lowest register pressure schedule when spilling
We try various pre-RA scheduler modes and see if any of them allow
us to register allocate without spilling. If all of them spill,
however, we left it on the last mode: LIFO. This is unfortunately
sometimes significantly worse than other modes (such as "none").
This patch makes us instead select the pre-RA scheduling mode that
gives the lowest register pressure estimate, if none of them manage
to avoid spilling. The hope is that this scheduling will spill the
least out of all of them.
fossil-db stats (on Alchemist) speak for themselves:
Totals:
Instrs:
197297092 ->
195326552 (-1.00%); split: -1.02%, +0.03%
Cycles:
14291286956 ->
14303502596 (+0.09%); split: -0.55%, +0.64%
Spill count: 190886 -> 129204 (-32.31%); split: -33.01%, +0.70%
Fill count: 361408 -> 225038 (-37.73%); split: -39.17%, +1.43%
Scratch Memory Size:
12935168 ->
10868736 (-15.98%); split: -16.08%, +0.10%
Totals from 1791 (0.27% of 668386) affected shaders:
Instrs: 7628929 -> 5658389 (-25.83%); split: -26.50%, +0.67%
Cycles:
719326691 ->
731542331 (+1.70%); split: -10.95%, +12.65%
Spill count: 110627 -> 48945 (-55.76%); split: -56.96%, +1.20%
Fill count: 221560 -> 85190 (-61.55%); split: -63.89%, +2.34%
Scratch Memory Size: 4471808 -> 2405376 (-46.21%); split: -46.51%, +0.30%
Improves performance when using XeSS in Cyberpunk 2077 by 90% on A770.
Improves performance of Borderlands 3 by 1.54% on A770.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24707>
Kenneth Graunke [Wed, 23 Aug 2023 09:19:06 +0000 (02:19 -0700)]
intel/fs: Make helpers for saving/restoring instruction order
This moves a bit of code out of a large function, but also lets us reuse
it a few extra places in the next commit.
I opted to stop using ralloc here since this is short-lived data that
doesn't need to stick around for the rest of the compile, and it's easy
enough to free.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24707>
Kenneth Graunke [Tue, 15 Aug 2023 02:35:32 +0000 (19:35 -0700)]
intel/fs: Index scheduler mode string table by mode enum
pre_modes[] is an array with the modes ordered in our desired
preference. scheduler_mode_name[] was also in that order, and the two
had to be kept in sync. This is a little silly; we should just have
a mode enum -> string table and look it up via the enum.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24707>
Kenneth Graunke [Tue, 15 Aug 2023 02:19:45 +0000 (19:19 -0700)]
intel/compiler: Move SCHEDULE_NONE handling into schedule_instructions()
I'm going to introduce another call site for this function, and just
handling SCHEDULE_NONE in the scheduler itself makes more sense than
duplicating the logic.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24707>
Kenneth Graunke [Tue, 15 Aug 2023 08:15:17 +0000 (01:15 -0700)]
intel/fs: Account for payload GRFs when calculating register pressure
The register pressure analysis I wrote in 2013 only considered VGRFs,
and not other GRFs, such as payload registers and push constants. We
need to consider those too, because payload registers definitely occupy
space and add to pressure.
In 2015, Connor already made the scheduler account for this, so the only
real use for this is in shader statistic dumps and optimizer printouts.
But we should make it more accurate. (We will use it in more places
shortly, a few commits from now.)
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24707>
Rob Clark [Wed, 23 Aug 2023 18:25:26 +0000 (11:25 -0700)]
docs: Followup to !24636
Update docs to reflect that EGL_ANDROID_blob_cache is now available even
if on-disk caching is disabled.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24853>
David Rosca [Wed, 23 Aug 2023 05:16:41 +0000 (07:16 +0200)]
Revert "radeonsi/vcn: add an exception of field case for h264 decoding"
This change causes page faults when playing corrupted video from the
bugreport. The original issue have now been resolved in firmware.
This reverts commit
bfce57c7a5ba62d8e6f65addb2df136cab603a68.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9210
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24836>
Georg Lehmann [Fri, 4 Aug 2023 18:55:58 +0000 (20:55 +0200)]
aco: combine a | ~b to bfi(b, a, -1)
Somehow I missed this when writing the a & ~b patch.
Foz-DB Navi21:
Totals from 1591 (1.20% of 132657) affected shaders:
Instrs: 2316379 -> 2315940 (-0.02%)
CodeSize:
12524240 ->
12528724 (+0.04%); split: -0.00%, +0.04%
Latency:
45393195 ->
45389285 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 8658991 -> 8657944 (-0.01%); split: -0.01%, +0.00%
Copies: 135777 -> 135778 (+0.00%)
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24505>
Piotr Kocia [Wed, 23 Aug 2023 15:05:48 +0000 (17:05 +0200)]
nir: Remove dead nir_const_value variables
nir_const_value variables in nir_const_value_for_int and
nor_const_value_for_uint are unused resulting in unnecessary dead code.
The unused-variable warning has been suppressed by the memset following
their declarations.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24851>
David Heidelberg [Wed, 23 Aug 2023 15:31:38 +0000 (17:31 +0200)]
panfrost/ci: revert Disable T720
Tested, it was just some unlucky coincidence it didn't worked, the
device queue is almost empty.
This reverts commit
b0f02973d7d12b2755666a8822cfc25c680bd27b.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24850>
Mike Blumenkrantz [Tue, 22 Aug 2023 20:13:43 +0000 (16:13 -0400)]
zink: copy some cs shader properties to the program struct
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24835>