Samuel Pitoiset
3be728f1d0
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 >
2022-12-05 08:22:28 +00:00
Samuel Pitoiset
20856bfe0f
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 >
2022-12-05 08:22:28 +00:00
Samuel Pitoiset
664aa7a37b
radv: fix emitting invalid color attachments
...
Note sure how this happened.
Fixes: 97dc28b177 ("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 >
2022-12-05 07:46:47 +00:00
Gert Wollny
64d584b8e4
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 >
2022-12-04 17:11:28 +00:00
Gert Wollny
d7393c6b9c
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 >
2022-12-04 17:11:28 +00:00
Gert Wollny
1975d5eaf4
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 >
2022-12-04 17:11:28 +00:00
Gert Wollny
bcd9da1b38
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 >
2022-12-04 17:11:28 +00:00
Gert Wollny
0a0dc7c04b
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 >
2022-12-04 17:11:28 +00:00
Gert Wollny
d4dfae313e
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 >
2022-12-04 17:11:28 +00:00
Gert Wollny
fc75c1e07f
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 >
2022-12-04 17:11:28 +00:00
Gert Wollny
71df6ba92d
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 >
2022-12-04 17:11:28 +00:00
Gert Wollny
b47928043d
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 >
2022-12-04 17:11:28 +00:00
Gert Wollny
1f7d34b4a2
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 >
2022-12-04 17:11:28 +00:00
Pavel Ondračka
ca0164f487
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 >
2022-12-04 15:38:26 +01:00
Pavel Ondračka
384fc52dd3
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 >
2022-12-04 15:38:12 +01:00
Marek Olšák
eb9f17b309
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: 003cbddfee - 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 >
2022-12-04 04:31:48 -05:00
Jan Alexander Steffens (heftig)
b513389400
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 >
2022-12-04 01:07:08 +00:00
Jan Alexander Steffens (heftig)
b3d1ae19f2
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 >
2022-12-04 01:06:48 +00:00
Qiang Yu
55ffbf867b
radeonsi: fix ngg lds base load intrinsic llvm implementation
...
Otherwise we get llvm assertion.
Fixes: 7e1b804992 ("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 >
2022-12-03 22:41:29 +08:00
Sviatoslav Peleshko
77ecf9149c
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 >
2022-12-03 00:10:32 +00:00
Jason Ekstrand
cd5c66e165
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: b9c61379ab ("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 >
2022-12-02 23:12:30 +00:00
Jason Ekstrand
f3f1c28f8e
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: 165fb5117b ("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 >
2022-12-02 23:12:30 +00:00
Jason Ekstrand
49d86200e5
st/mesa: Use nir_const_value_for_bool() in ATIFS
...
Fixes: 0a179bb6e2 ("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 >
2022-12-02 23:12:30 +00:00
Jason Ekstrand
e6de164e03
nir: Use nir_const_value_for_int in nir_lower_subgroups
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7670
Fixes: e4e79de2a4 ("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 >
2022-12-02 23:12:30 +00:00
Konstantin Seurer
ef168a57b9
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 >
2022-12-02 22:06:11 +00:00
Konstantin Seurer
c94e3687d1
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 >
2022-12-02 22:06:11 +00:00
Konstantin Seurer
9d4172f548
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 >
2022-12-02 22:06:11 +00:00
Konstantin Seurer
cc8b398c96
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 >
2022-12-02 22:06:11 +00:00
Konstantin Seurer
9a452a97d9
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 >
2022-12-02 22:06:11 +00:00
Konstantin Seurer
ad8de42ce5
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 >
2022-12-02 22:06:11 +00:00
Yiwei Zhang
c2fdd6a2c2
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 >
2022-12-02 21:42:25 +00:00
Yiwei Zhang
739b20beda
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 >
2022-12-02 21:42:25 +00:00
Yiwei Zhang
ea7c2d3d94
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 >
2022-12-02 21:42:25 +00:00
Yiwei Zhang
bda80458f9
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 >
2022-12-02 21:42:25 +00:00
Konstantin Seurer
6397304519
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 >
2022-12-02 21:14:00 +00:00
Konstantin Seurer
f89708c2c5
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 >
2022-12-02 20:46:33 +00:00
Jesse Natalie
8d8188ec59
microsoft/clc: Add a test for nested function-temp arrays
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20111 >
2022-12-02 09:53:09 -08:00
Jesse Natalie
88b2c2a5ca
microsoft/compiler: Handle nested arrays correctly for emitting global consts
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20111 >
2022-12-02 09:53:09 -08:00
Jesse Natalie
d4c70e483d
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 >
2022-12-02 09:52:44 -08:00
Jesse Natalie
4a976d371b
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 >
2022-12-02 17:15:30 +00:00
Konstantin Seurer
7fe515f6d4
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 >
2022-12-02 16:48:07 +00:00
Konstantin Seurer
e2b7e478a5
radv/rra: Fix setting some offsets
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20047 >
2022-12-02 16:48:07 +00:00
Konstantin Seurer
79dcacfc04
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 >
2022-12-02 16:48:07 +00:00
Konstantin Seurer
bb6b45e26e
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 >
2022-12-02 16:48:07 +00:00
Konstantin Seurer
0e3325dfb6
radv/rra: Remove an obsolete comment
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20047 >
2022-12-02 16:48:07 +00:00
Konstantin Seurer
94ec359ae5
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 >
2022-12-02 16:48:07 +00:00
Konstantin Seurer
ae9c65a552
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 >
2022-12-02 16:48:07 +00:00
Konstantin Seurer
08a85076e5
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 >
2022-12-02 16:48:07 +00:00
Konstantin Seurer
ff3ba5c74d
radv: Add hash_table_foreach to .clang-format
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20047 >
2022-12-02 16:48:07 +00:00
Pedro J. Estébanez
b2c4338862
microsoft/spirv_to_dxil: Properly handle load- and is_helper_invocation
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19908 >
2022-12-02 16:29:13 +00:00