Emma Anholt [Tue, 29 Nov 2022 20:15:12 +0000 (12:15 -0800)]
egl: Pull the API mask directly out of the dri_screen.
Now that we know the driver on the other side is the same version of Mesa
as our build, we can just access the screen instead of having accessor
functions.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>
Emma Anholt [Tue, 29 Nov 2022 20:04:21 +0000 (12:04 -0800)]
dri: Add createContext hook to __DRI_MESA.
Again, reduces switching on driver type in the loader.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>
Emma Anholt [Tue, 29 Nov 2022 19:34:34 +0000 (11:34 -0800)]
gallium/dri: Move the backendVtable InitScreen func into __DRI_MESA.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>
Emma Anholt [Tue, 29 Nov 2022 18:39:52 +0000 (10:39 -0800)]
dri: Add createNewScreen into the __DRI_MESA extension.
Now the loaders don't have to switch on dri2/dri3/swrast.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>
Emma Anholt [Tue, 29 Nov 2022 18:48:25 +0000 (10:48 -0800)]
gallium/dri: Clarify some "extensions" lists in driCreateNewScreen2.
I was having a hard time keeping track of them all.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>
Emma Anholt [Mon, 28 Nov 2022 20:50:59 +0000 (12:50 -0800)]
dri: Introduce internal Mesa DRI driver loader extension.
All DRI loaders in Mesa (EGL, GLX, gbm) now require this ext and that the
driver come from a matching build. This will let us use Mesa-internal
types and enums across the loader-driver bounary inside of Mesa.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Eric Engestrom <eric@igalia.com>
LOL-YESed-by: Kristian Høgsberg <krh@bitplanet.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>
Emma Anholt [Tue, 29 Nov 2022 19:16:49 +0000 (11:16 -0800)]
gbm: Refactor screen creation a bit.
A lot of the screen creation path was duplicated between swrast and dri2.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>
Emma Anholt [Tue, 29 Nov 2022 19:09:05 +0000 (11:09 -0800)]
gbm: Drop redundant extension error checks.
loader_bind_extensions error handling has already made sure these are
present.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>
Emma Anholt [Tue, 29 Nov 2022 06:25:52 +0000 (22:25 -0800)]
gallium/dri: Use loader_bind_extensions().
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>
Emma Anholt [Tue, 29 Nov 2022 01:08:04 +0000 (17:08 -0800)]
egl: Switch to using loader_bind_extensions().
Slightly different than our dri2_bind_extensions(), but same idea.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>
Emma Anholt [Tue, 29 Nov 2022 00:44:28 +0000 (16:44 -0800)]
glx: Use loader_bind_extensions().
This adds more consistent logging on failure and gives us a spot for
version checks.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>
Emma Anholt [Tue, 29 Nov 2022 00:28:21 +0000 (16:28 -0800)]
loader: Simplify the extension matching logic.
Also, add debug logging for missing optional extensions.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>
Emma Anholt [Tue, 29 Nov 2022 00:21:05 +0000 (16:21 -0800)]
gbm: Promote dri_bind_extensions() to the loader util library.
It's better than EGL's copy of it by having optional ext support in the
match structs, and GLX wishes it had either of the two.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069>
Konstantin Seurer [Sun, 4 Dec 2022 12:47:17 +0000 (13:47 +0100)]
radv: Add missing radeon_check_space() in radv_cmd_buffer_after_draw()
Also adds a missing assert that cdw <= cdw_max.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20149>
Konstantin Seurer [Sat, 3 Dec 2022 15:48:03 +0000 (16:48 +0100)]
radv: Use wave32 for ray queries inside compute shaders
Results in a 6% performance improvement with Quake II RTX.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20143>
Boyuan Zhang [Fri, 2 Dec 2022 12:45:13 +0000 (07:45 -0500)]
frontends/va: return proper error for unsupported profile
Return VA_STATUS_ERROR_UNSUPPORTED_PROFILE if given profile is not
supported for both decode and encode.
Return VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT if given profile is
supported (for at lease one of decode or encode), but current given
entrypoint is not supported.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20082>
Samuel Pitoiset [Mon, 5 Dec 2022 10:34:40 +0000 (11:34 +0100)]
aco: fix missing uses of MRT output flags
Fixes regressions on GFX6 and the RAGE2 workaround.
Fixes:
a297ac10a4e ("radv,aco: stop lowering FS outputs in NIR")
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/20154>
Matt Coster [Fri, 4 Nov 2022 17:25:33 +0000 (17:25 +0000)]
pvr: Add empty PDS program
This is a trivial program to accomplish allocation of local/common
store shared registers, used when no actual program is available or
required.
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20130>
Matt Coster [Fri, 4 Nov 2022 17:24:01 +0000 (17:24 +0000)]
pvr: Add pvr_pds_compute_shader_program_init()
Some fields are to be initialized to a specific non-zero value if
unused; this inline function takes care of that.
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20130>
Matt Coster [Thu, 1 Dec 2022 16:59:51 +0000 (16:59 +0000)]
pvr: Use util_dynarray_append_dynarray()
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18904>
Samuel Pitoiset [Wed, 30 Nov 2022 17:28:49 +0000 (18:28 +0100)]
radv: do not set ZPASS_INCREMENT_DISABLE on GFX11
This field no longer exists.
Cc: 22.3 mesa-stable
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/20090>
Samuel Pitoiset [Fri, 2 Dec 2022 07:29:35 +0000 (08:29 +0100)]
radv: fix SPI_SHADER_Z_FORMAT for alpha-to-coverage via MRTZ on GFX11
It should select a 32-bit format with alpha.
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/20126>
Samuel Pitoiset [Fri, 2 Dec 2022 08:24:17 +0000 (09:24 +0100)]
radv,aco: stop lowering FS outputs in NIR
This was a bad idea because:
- it diverges too much with the fragment shader epilog
- it doesn't allow to implement alpha-to-coverage via MRTZ correctly
- it was supposed to be used by LLVM but this never happened
Reverting this back allows us to fix alpha-to-coverage via MRTZ
on GFX11 easily, including for fragment shader epilogs.
fossils-db (NAVI21):
Totals from 20411 (15.13% of 134913) affected shaders:
VGPRs: 972056 -> 971400 (-0.07%); split: -0.08%, +0.01%
CodeSize:
92284804 ->
92295392 (+0.01%); split: -0.05%, +0.06%
MaxWaves: 465010 -> 465166 (+0.03%); split: +0.03%, -0.00%
Instrs:
17034162 ->
17034963 (+0.00%); split: -0.00%, +0.01%
Latency:
252013190 ->
251971764 (-0.02%); split: -0.03%, +0.02%
InvThroughput:
45859625 ->
45842556 (-0.04%); split: -0.04%, +0.01%
VClause: 324627 -> 324629 (+0.00%); split: -0.03%, +0.03%
SClause: 672918 -> 672826 (-0.01%); split: -0.05%, +0.04%
Copies: 1172126 -> 1158152 (-1.19%); split: -1.20%, +0.01%
Branches: 420602 -> 420604 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 1025441 -> 1025481 (+0.00%)
PreVGPRs: 861787 -> 860650 (-0.13%); split: -0.17%, +0.03%
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/20126>
Samuel Pitoiset [Fri, 2 Dec 2022 08:32:47 +0000 (09:32 +0100)]
aco: fix indexing MRT0 alpha channel for alpha-to-coverage via MRTZ on GFX11
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/20126>
Samuel Pitoiset [Fri, 2 Dec 2022 08:20:58 +0000 (09:20 +0100)]
aco: always use 32-bit for exporting alpha-to-coverage via MRTZ on GFX11
16-bit isn't possible. Note that this is currently style broken for
compressed formats because the w channel is never written to.
Ported from RadeonSI ('radeonsi/gfx11: fix alpha-to-coverage with
stencil or samplemask export')
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/20126>
Samuel Pitoiset [Fri, 2 Dec 2022 10:39:52 +0000 (11:39 +0100)]
radv: fix emitting invalid color attachments
Note sure how this happened.
Fixes:
97dc28b1776 ("radv: fix configuring COLOR_INVALID on GFX11")
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/20127>
Gert Wollny [Fri, 2 Dec 2022 14:34:56 +0000 (15:34 +0100)]
r600/sfn: Silence warning for unused parameters in override
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20141>
Gert Wollny [Wed, 30 Nov 2022 19:22:17 +0000 (20:22 +0100)]
r600/sfn: Allow more copy-propagation into TEX src
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20141>
Gert Wollny [Wed, 30 Nov 2022 17:54:00 +0000 (18:54 +0100)]
r600/sfn: use only as many components as needed for tex backend coord
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20141>
Gert Wollny [Wed, 30 Nov 2022 16:46:25 +0000 (17:46 +0100)]
r600/sfn: drop useless const specifier in return value
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20141>
Gert Wollny [Wed, 30 Nov 2022 16:06:25 +0000 (17:06 +0100)]
r600/sfn: simplify if clauses with empty then branch
nir_opt_if doesn't catch all the possible cases of empty then branches,
so resolve this on the fly when creating the backend IR.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20141>
Gert Wollny [Wed, 30 Nov 2022 14:25:35 +0000 (15:25 +0100)]
r600/sfn: legalize image acccess on Cayman
If we access non-existing images Cayman hardware may lock up
and trigger a reset that is not always successful. Therefore,
make sure the images access is legal.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20141>
Gert Wollny [Tue, 29 Nov 2022 12:36:37 +0000 (13:36 +0100)]
r600/sfn: use three channels only for unary trans opts if possible
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20141>
Gert Wollny [Tue, 29 Nov 2022 09:22:10 +0000 (10:22 +0100)]
r600/sfn: lower-to-scalar in optimization loop
This makes sure that no vector ops are left over
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20141>
Gert Wollny [Mon, 28 Nov 2022 18:02:41 +0000 (19:02 +0100)]
r600/sfn: Fix scheduling with limited channel availability
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20141>
Gert Wollny [Mon, 28 Nov 2022 18:01:23 +0000 (19:01 +0100)]
r600/sfn: Don't copy propagate using non-allocated dest channel
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20141>
Pavel Ondračka [Thu, 24 Nov 2022 19:53:18 +0000 (20:53 +0100)]
r300: improve conversion to native swizzles
Don't add extra movs to construct the swizzles, but just split the
instruction into separate channels, if possible. Idea by Filip Gawin.
shader-db for RV370:
total instructions in shared programs: 84632 -> 83565 (-1.26%)
instructions in affected programs: 12613 -> 11546 (-8.46%)
helped: 295
HURT: 8
total temps in shared programs: 12437 -> 12237 (-1.61%)
temps in affected programs: 1807 -> 1607 (-11.07%)
helped: 153
HURT: 20
LOST: 1
GAINED: 19
The HURT instructions and the single lost shaders are some fluctuations
from pair scheduling. The number of instructions before pair scheduling
is always lower or equivalent.
Partial fix for: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6339
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Tested-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20009>
Pavel Ondračka [Fri, 25 Nov 2022 09:02:32 +0000 (10:02 +0100)]
r300: doublecheck for free alpha source when coventing to alpha
For any instruction that can be reasonably converted to alpha we check
all of its readers to see if the conversion is possible (including check
for at least one free alpha source) at the beginning of pair scheduling.
However, if the reader instruction has multiples sources that could be
converted to alpha and multiple indeed are, than we could run of of the
alpha sources eventually. So recheck just before converting that there
are still some unused sources left.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Tested-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20009>
Marek Olšák [Sun, 4 Dec 2022 07:47:45 +0000 (02:47 -0500)]
radeonsi: fix a regression causing GPU hang with GLCTS using streamout
Move the streamout code into the streamout-only branch. The code must be
guarded by si_shader_uses_streamout(). Using xfb_stride is not enough.
Fixes:
003cbddfee3 - radeonsi: use native shader info when init streamout args
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20147>
Jan Alexander Steffens (heftig) [Sun, 4 Dec 2022 00:21:45 +0000 (00:21 +0000)]
dzn: Don't crash when libd3d12.so can't be found
`dzn_instance_create` will call `dzn_instance_destroy` when the d3d12
library fails to load. Just like the issue in `d3d12_screen`, this will
lead to a crash because `d3d12_mod` is NULL.
To fix this, only close the library after if it was actually opened.
Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20145>
Jan Alexander Steffens (heftig) [Sun, 4 Dec 2022 00:17:57 +0000 (00:17 +0000)]
d3d12: Don't crash when libd3d12.so can't be found
`d3d12_destroy_screen` is called by `d3d12_create_dxcore_screen` after
`d3d12_init_screen_base` fails and attempts to call `util_dl_close` on
a NULL pointer, leading to an abort.
To fix this, only close the library after if it was actually opened.
Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20145>
Qiang Yu [Sat, 3 Dec 2022 14:19:37 +0000 (22:19 +0800)]
radeonsi: fix ngg lds base load intrinsic llvm implementation
Otherwise we get llvm assertion.
Fixes:
7e1b804992d ("radeonsi: implement two lds base load intrinsics")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20142>
Sviatoslav Peleshko [Wed, 30 Nov 2022 05:05:51 +0000 (07:05 +0200)]
anv: Defer flushing PIPE_CONTROL bits forbidden in CCS while in GPGPU mode
Fixes:
313aeee8 ("anv: Use pending pipe control mechanism in flush_pipeline_select()
")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7816
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20124>
Jason Ekstrand [Fri, 11 Nov 2022 21:14:16 +0000 (15:14 -0600)]
dxil: Use nir_const_value_for_uint in dxil_nir_lower_int_samplers
This change should avoid any accidental rounding issues because of
border colors getting stored in a float in dxil_wrap_sampler_state. It
also switches us to using the correct helpers for nir_const_value so we
can avoid any weird uninitialized data failures that can be caused by
filling out the fields in the struct directly.
Fixes:
b9c61379ab4c ("microsoft/compiler: translate nir to dxil")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19689>
Jason Ekstrand [Fri, 11 Nov 2022 21:02:07 +0000 (15:02 -0600)]
r600/nir: Fix u64vec2 immediate lowering
There were a couple of issues here:
1. We should be using nir_const_value_for_uint instead of setting the
union fields directly to ensure the rest of the union is zeroed.
2. It was always filling out the first two components of val even if
the incoming constant had 2 64-bit components.
Fixes:
165fb5117bf7 ("r600/sfn: add lowering passes to get 64 bit ops lowered to 32 bit vec2")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19689>
Jason Ekstrand [Fri, 11 Nov 2022 20:58:51 +0000 (14:58 -0600)]
st/mesa: Use nir_const_value_for_bool() in ATIFS
Fixes:
0a179bb6e26b ("st/mesa: Generate NIR for ATI_fragment_shader instead of TGSI.")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19689>
Jason Ekstrand [Fri, 11 Nov 2022 20:56:19 +0000 (14:56 -0600)]
nir: Use nir_const_value_for_int in nir_lower_subgroups
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7670
Fixes:
e4e79de2a420 ("nir/subgroups: Support > 1 ballot components")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19689>
Konstantin Seurer [Thu, 22 Sep 2022 17:39:11 +0000 (19:39 +0200)]
llvmpipe: Use get_first_non_void_channel more often
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18634>
Konstantin Seurer [Fri, 16 Sep 2022 14:17:58 +0000 (16:17 +0200)]
virgl: Use get_first_non_void_channel more often
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18634>
Konstantin Seurer [Fri, 16 Sep 2022 14:17:11 +0000 (16:17 +0200)]
radeonsi: Use get_first_non_void_channel more often
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18634>
Konstantin Seurer [Fri, 16 Sep 2022 14:12:15 +0000 (16:12 +0200)]
r600: Use get_first_non_void_channel more often
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18634>
Konstantin Seurer [Fri, 16 Sep 2022 14:06:26 +0000 (16:06 +0200)]
r300: Use get_first_non_void_channel more often
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18634>
Konstantin Seurer [Fri, 16 Sep 2022 13:41:26 +0000 (15:41 +0200)]
radv: Use get_first_non_void_channel more often
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18634>
Yiwei Zhang [Thu, 17 Nov 2022 21:53:57 +0000 (21:53 +0000)]
venus: add VN_PERF_NO_CMD_BATCHING
Make it easier to debug object lifetime issues in Venus.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19830>
Yiwei Zhang [Thu, 17 Nov 2022 21:43:48 +0000 (21:43 +0000)]
venus: fix draw cmd batch accounting
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19830>
Yiwei Zhang [Thu, 17 Nov 2022 21:37:13 +0000 (21:37 +0000)]
venus: add VN_PERF_NO_MEMORY_SUBALLOC
Make it easier for memory alignment debugging.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19830>
Yiwei Zhang [Thu, 17 Nov 2022 21:23:18 +0000 (21:23 +0000)]
venus: avoid no_async_buffer_create related caches with the perf option
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19830>
Konstantin Seurer [Thu, 1 Dec 2022 19:02:08 +0000 (20:02 +0100)]
radv: Only create bvh pipelines when using rt
Saves some time when creating non-rt devices.
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20110>
Konstantin Seurer [Thu, 1 Dec 2022 19:17:34 +0000 (20:17 +0100)]
vulkan: Use vk_image_sanitize_extent
We set the image type before the extend which allows us to use
vk_image_sanitize_extent.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20112>
Jesse Natalie [Fri, 2 Dec 2022 16:24:29 +0000 (08:24 -0800)]
microsoft/clc: Add a test for nested function-temp arrays
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20111>
Jesse Natalie [Thu, 1 Dec 2022 19:10:47 +0000 (11:10 -0800)]
microsoft/compiler: Handle nested arrays correctly for emitting global consts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20111>
Jesse Natalie [Thu, 1 Dec 2022 19:09:44 +0000 (11:09 -0800)]
compiler: Handle nested arrays correctly for computing CL size/alignment
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20111>
Jesse Natalie [Thu, 1 Dec 2022 13:48:29 +0000 (05:48 -0800)]
gallium/u_debug_flush: Fix incompatible function signature warnings
Looks like an MSVC update started complaining that pipe_error is
no longer a compatible return type for function pointers that are
supposed to be int.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20102>
Konstantin Seurer [Wed, 30 Nov 2022 15:33:42 +0000 (16:33 +0100)]
radv/rra: Get rid of annoying memory aliasing warning
Such cursed behavior is almost non existent in practise. When capturing
a Doom Eternal, this warning spams the output for no reason.
The warning is also unnecessary since we copy acceleration structures
right after building them now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20047>
Konstantin Seurer [Tue, 29 Nov 2022 20:40:54 +0000 (21:40 +0100)]
radv/rra: Fix setting some offsets
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20047>
Konstantin Seurer [Tue, 29 Nov 2022 20:16:58 +0000 (21:16 +0100)]
radv/rra: Refactor rra_fill_accel_struct_header_common
No need to re-do the offset calculation for every field.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20047>
Konstantin Seurer [Tue, 29 Nov 2022 18:12:40 +0000 (19:12 +0100)]
radv/rra: Set the metadata size correctly
Fixes: 5749806 ("radv: Add Radeon Raytracing Analyzer trace dumping utilities")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20047>
Konstantin Seurer [Tue, 29 Nov 2022 18:03:00 +0000 (19:03 +0100)]
radv/rra: Remove an obsolete comment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20047>
Konstantin Seurer [Mon, 28 Nov 2022 21:22:10 +0000 (22:22 +0100)]
radv/rra: Defer destroying accel struct data
This allows us to dump acceleration structures that were destroyed
before present.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20047>
Konstantin Seurer [Mon, 28 Nov 2022 19:11:17 +0000 (20:11 +0100)]
radv/rra: Copy accel structs directly after build
This is the second step of decoupling acceleration structure dumping
from lifetimes. It also simplifies the logic a bit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20047>
Konstantin Seurer [Mon, 28 Nov 2022 18:31:17 +0000 (19:31 +0100)]
radv/rra: Introduce radv_rra_accel_struct_data
This will be useful for dumping acceleration structures that were
destroyed before submit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20047>
Konstantin Seurer [Mon, 28 Nov 2022 18:30:42 +0000 (19:30 +0100)]
radv: Add hash_table_foreach to .clang-format
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20047>
Pedro J. Estébanez [Tue, 22 Nov 2022 11:45:56 +0000 (12:45 +0100)]
microsoft/spirv_to_dxil: Properly handle load- and is_helper_invocation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19908>
Karol Herbst [Tue, 22 Nov 2022 10:48:08 +0000 (11:48 +0100)]
clc: fetch clang resource dir at runtime
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19617>
Karol Herbst [Wed, 9 Nov 2022 14:12:19 +0000 (15:12 +0100)]
clc: generate sources only with with_microsoft_clc
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19617>
Danylo Piliaiev [Thu, 1 Dec 2022 13:01:57 +0000 (14:01 +0100)]
nir/nir_opt_offsets: Prevent offsets going above max
In try_fold_load_store when trying to extract const addition from
non-const offset source, we should take into account that there is
already a constant base offset, which should count towards the limit.
The issue was found in "Monster Hunter: World" running on Turnip.
Fixes:
cac6f633b21799bd1ecc35471d73a0bd190ccada
("nir/opt_offsets: Use nir_ssa_scalar to chase offset additions.")
Well, the issue was present before this commit but it made a lot
of changes in surrounding code.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20099>
David Heidelberg [Mon, 21 Nov 2022 18:32:58 +0000 (19:32 +0100)]
ci/amd: re-enable previously OOM tests
Since we have ZRAM now, we can enable previously failing tests on OOM.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19535>
David Heidelberg [Fri, 4 Nov 2022 12:16:40 +0000 (13:16 +0100)]
ci/kernel: enable ZRAM on all archs
Let's enable ZRAM with 2G. Should help prevent peak OOM scenarios.
For more info see: https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19535>
Bas Nieuwenhuizen [Sun, 6 Nov 2022 13:02:54 +0000 (14:02 +0100)]
aco: Don't use v_lshrrev_b64 for moves on GFX11.
Looking at VOPD things, shifts are not very likely to get dual issued
but plain moves are. Looking at RDNA2 v_lshrrev_b64 are half the perf
of v_mov_b32 (but you need twice as many moves), so on GFX11 this likely
reaches the threshold where moves are faster.
Totals from 68400 (50.70% of 134906) affected shaders:
CodeSize:
275489516 ->
275459536 (-0.01%); split: -0.01%, +0.00%
Instrs:
51775474 ->
51991286 (+0.42%)
Latency:
589884847 ->
589066439 (-0.14%); split: -0.15%, +0.01%
InvThroughput:
127154986 ->
126037619 (-0.88%); split: -0.88%, +0.00%
Copies: 3756157 -> 3976193 (+5.86%)
Branches: 1259604 -> 1260072 (+0.04%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19633>
Bas Nieuwenhuizen [Sun, 6 Nov 2022 23:04:38 +0000 (00:04 +0100)]
aco: Use more detailed wave64 timing for GFX10+.
Also nabbed some dual issue stuff for GFX11 from LLVM.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19633>
Eric Engestrom [Wed, 30 Nov 2022 21:29:55 +0000 (21:29 +0000)]
docs: update calendar and link releases notes for 22.3.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20129>
Eric Engestrom [Fri, 2 Dec 2022 11:08:29 +0000 (11:08 +0000)]
docs: add release notes for 22.3.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20129>
David Heidelberg [Fri, 2 Dec 2022 11:25:12 +0000 (12:25 +0100)]
Revert "ci: disable Collabora's LAVA lab for maintance"
This reverts commit
3964a77454b616a91c78d7867d0d8cba4ffe6b63.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20128>
Qiang Yu [Wed, 30 Nov 2022 07:22:29 +0000 (15:22 +0800)]
ac/nir/ngg: merge multi stream gs shader queries
Before this commit each stream will emit a query block, now
we merge them to a single block.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20074>
Lionel Landwerlin [Fri, 25 Nov 2022 11:08:28 +0000 (13:08 +0200)]
anv: enable VK_KHR_ray_tracing_maintenance1
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>
Lionel Landwerlin [Fri, 25 Nov 2022 15:47:31 +0000 (17:47 +0200)]
anv: implement new queries for VK_KHR_ray_tracing_maintenance1
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>
Lionel Landwerlin [Fri, 25 Nov 2022 11:07:54 +0000 (13:07 +0200)]
anv: implement vkCmdTraceRaysIndirect2KHR
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>
Lionel Landwerlin [Fri, 25 Nov 2022 20:01:10 +0000 (22:01 +0200)]
anv: refactor ray tracing dispatch
Preparing for vkCmdTraceRaysIndirect2KHR
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>
Lionel Landwerlin [Fri, 25 Nov 2022 18:43:42 +0000 (20:43 +0200)]
intel/rt/nir: add support for RayCullMaskKHR
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>
Lionel Landwerlin [Fri, 25 Nov 2022 13:32:27 +0000 (15:32 +0200)]
intel/rt/nir: enable the trampoline shader to load the indirect ray shader bsr
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>
Lionel Landwerlin [Fri, 25 Nov 2022 11:05:07 +0000 (13:05 +0200)]
anv: correctly predicate ray tracing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
7479fe6ae093 ("anv: Implement vkCmdTraceRays and vkCmdTraceRaysIndirect")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>
Lionel Landwerlin [Fri, 25 Nov 2022 10:29:09 +0000 (12:29 +0200)]
anv/genxml: make gen_rt more like other genxml files
The main goal is to be able to generate genX_bits.h for those
structures so we can get generated field offsets.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>
Lionel Landwerlin [Wed, 19 Oct 2022 07:20:42 +0000 (10:20 +0300)]
hasvk: remove coarse pixel checks
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>
Jason Ekstrand [Sat, 3 Sep 2022 05:13:23 +0000 (00:13 -0500)]
hasvk: Drop more DG2 code
v2: remove unused devinfo (Lionel)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>
Jason Ekstrand [Sat, 3 Sep 2022 05:03:48 +0000 (00:03 -0500)]
hasvk: Rip out local memory support
Things could probably be simplified further but this at least gets rid
of most of the dead code and the dead flags and fields.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>
Jason Ekstrand [Sat, 3 Sep 2022 05:00:51 +0000 (00:00 -0500)]
hasvk: Rip out scratch surfaces
These are a DG2+ thing
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>
Jason Ekstrand [Sat, 3 Sep 2022 04:49:47 +0000 (23:49 -0500)]
hasvk: Drop SKL+ features
Most of these have already had all the code removeed. We just need to
remove the feature bits and queries.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>
Jason Ekstrand [Sat, 3 Sep 2022 04:44:52 +0000 (23:44 -0500)]
hasvk: Drop support for atomic_int64 and atomic_float2
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>
Jason Ekstrand [Sat, 3 Sep 2022 04:40:48 +0000 (23:40 -0500)]
hasvk: Drop bindless image support
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>
Jason Ekstrand [Sat, 3 Sep 2022 04:35:23 +0000 (23:35 -0500)]
hasvk: Drop A64 descriptor set support
It's only used by task/mesh and ray-tracing. Also drop a couple
remaining ray query things and a task/mesh we left behind.
v2: Fix incorrect use of nir_load_desc_set_address_intel (Lionel)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>