Caio Oliveira
96c4aa8545
intel/brw: Pull peephole_sel out of fs_visitor
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887 >
2024-02-26 20:54:25 +00:00
Caio Oliveira
10489b418c
intel/brw: Pull bank_conflicts out of fs_visitor
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887 >
2024-02-26 20:54:25 +00:00
Caio Oliveira
13c312431c
intel/brw: Pull opt_cse out of fs_visitor
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887 >
2024-02-26 20:54:25 +00:00
Caio Oliveira
4f09ad9dee
intel/brw: Pull opt_combine_constants out of fs_visitor
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887 >
2024-02-26 20:54:24 +00:00
Caio Oliveira
59bff8adf4
intel/brw: Pull dead_code_eliminate out of fs_visitor
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887 >
2024-02-26 20:54:24 +00:00
Caio Oliveira
1bd175f458
intel/brw: Pull opt_saturate_propagation out of fs_visitor
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887 >
2024-02-26 20:54:24 +00:00
Caio Oliveira
dc33a8fb06
intel/brw: Pull opt_cmod_propagation out of fs_visitor
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887 >
2024-02-26 20:54:24 +00:00
Caio Oliveira
6a3329a6c4
intel/brw: Pull opt_copy_propagation out of fs_visitor
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887 >
2024-02-26 20:54:24 +00:00
Caio Oliveira
0b73d163d4
intel/brw: Remove Gfx8- passes from optimize()
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887 >
2024-02-26 20:54:24 +00:00
Tapani Pälli
1a4f220c29
intel/blorp: disable use of REP16 independent of format
...
Previously we were optimistic and tied this to certain format but wa
description lists other formats and bspec clearly disallows the usage.
Issue can be seen with different 16bpp tests, effect looks a bit like
dithering pattern but it is not, it is just rep16 failing.
Fixes:
GTF-GL46.gtf42.GL3Tests.texture_storage.texture_storage_texture_as_framebuffer_attachment
on DG2 and MTL, some 565 EGL tests on Android and internal issue on game
that displays a dither like pattern on the background while it's not
supposed to do that.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10646
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27794 >
2024-02-26 19:30:31 +00:00
Eric R. Smith
1adb2e9e95
panfrost: support multi-sampled image load/store
...
On panfrost we can treat 2DMS image access like 3D access.
Use a lowering pass to do this to implement 2DMS image
load/store.
Signed-off-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27626 >
2024-02-26 19:01:32 +00:00
Eric R. Smith
c9831a4d34
panfrost: add lowering pass for multisampled images
...
Panfrost generally treats 2D multisampled images like 3D images,
with the R coordinate holding the sample index. This commit adds
a lowering pass to convert 2DMS images to 3D for the compiler. It
is not actually invoked yet.
Signed-off-by: Eric R. Smith <eric.smith@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27626 >
2024-02-26 19:01:32 +00:00
Pierre-Eric Pelloux-Prayer
a8a4bcec36
wsi/wl: check wsi_wl_surface's validity before use
...
Fixes: 9a00a360ad ("wsi/wl: flush connection on swapchain failure")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27767 >
2024-02-26 16:56:27 +00:00
Faith Ekstrand
8ab337047c
nvk: Advertise VK_KHR_maintenance5
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9616
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795 >
2024-02-26 16:25:08 +00:00
Faith Ekstrand
509fdf4fe4
nvk: Use VkPipelineCreateFlags2 flag names
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795 >
2024-02-26 16:25:08 +00:00
Faith Ekstrand
a72bcc0a26
vulkan/meta: Handle VK_REMAINING_ARRAY_LAYERS in blit and resolve
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795 >
2024-02-26 16:25:08 +00:00
Faith Ekstrand
8ed3aa7b1a
nvk/copy: Handle VK_REMAINING_ARRAY_LAYERS
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795 >
2024-02-26 16:25:08 +00:00
Faith Ekstrand
a120022b02
nvk: Handle missing gl_PointSize in the last geometry stage
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795 >
2024-02-26 16:25:07 +00:00
Faith Ekstrand
4287d04e98
nak: Add writes_point_size to nak_shader_info
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795 >
2024-02-26 16:25:07 +00:00
Faith Ekstrand
828b3c18fb
nil: Add PIPE_FORMAT_R5G5B5A1_UNORM
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795 >
2024-02-26 16:25:07 +00:00
Alyssa Rosenzweig
6825902bb6
treewide: use ralloc_memdup
...
@@
expression memctx, dst, src, size;
@@
-dst = ralloc_size(memctx, size);
-memcpy(dst, src, size);
+dst = ralloc_memdup(memctx, src, size);
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27762 >
2024-02-26 15:37:58 +00:00
Alyssa Rosenzweig
66b00e2966
util/ralloc: add memdup
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27762 >
2024-02-26 15:37:58 +00:00
Alyssa Rosenzweig
d964f57a48
util/hash_table: add u64 foreach macro
...
needs some nontrivial wrapping but can mostly fallback to the regular impl.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27762 >
2024-02-26 15:37:58 +00:00
Timur Kristóf
cc1501628f
nir: Clean up divergence analysis for TES patch input loads.
...
Just make the code a little bit easier to follow.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27680 >
2024-02-26 14:53:23 +00:00
Timur Kristóf
870a2e4197
nir: Cleanup divergence analysis for mesh shaders.
...
1. Mesh shaders don't have inputs (only task payload),
so remove them from handling load_input.
2. Clarify in comments that loading any mesh shader
output is an NV_mesh_shader only feature.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27680 >
2024-02-26 14:53:23 +00:00
Timur Kristóf
9553d67373
nir: Fix divergence analysis of load_patch_vertices_in.
...
load_patch_vertices_in can only occur in tessellation shaders,
and contains the number of vertices in an input patch.
* TCS: patch_vertices_in is equal to the input patch size
* TES: patch_vertices_in is equal to the TCS output patch size
The patch sizes may be set by a pipeline or dynamic states,
however in both cases it is definitely uniform within a subgroup.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27680 >
2024-02-26 14:53:23 +00:00
Timur Kristóf
537c0029dd
nir: Fix divergence of reductions.
...
By accident, the function would return without setting
the divergence information.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27680 >
2024-02-26 14:53:23 +00:00
Alyssa Rosenzweig
9548cba8ab
anv,hasvk: use vk_index_to_restart
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27764 >
2024-02-26 14:13:08 +00:00
Alyssa Rosenzweig
9da77e6c97
tu: use vk_index_to_restart
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27764 >
2024-02-26 14:13:08 +00:00
Alyssa Rosenzweig
a97966b840
vulkan: add vk_index_type_to_restart helper
...
from nvk
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27764 >
2024-02-26 14:13:07 +00:00
Patrick Lerda
4d00edda00
r300: fix memory leaks when register allocation fails
...
For instance, this issue is triggered with
"piglit/bin/ext_framebuffer_multisample-accuracy all_samples color depthstencil -auto -fbo":
Direct leak of 1160 byte(s) in 1 object(s) allocated from:
#0 0x7fbe8897d7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
#1 0x7fbe7e7abfcc in rc_constants_copy ../src/gallium/drivers/r300/compiler/radeon_code.c:47
#2 0x7fbe7e7ec902 in r3xx_compile_fragment_program ../src/gallium/drivers/r300/compiler/r3xx_fragprog.c:174
#3 0x7fbe7e7e1b22 in r300_translate_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:516
#4 0x7fbe7e7e6373 in r300_pick_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:591
#5 0x7fbe7e75456e in r300_create_fs_state ../src/gallium/drivers/r300/r300_state.c:1073
#6 0x7fbe7cd2ebe5 in st_create_fp_variant ../src/mesa/state_tracker/st_program.c:1070
#7 0x7fbe7cd374b5 in st_get_fp_variant ../src/mesa/state_tracker/st_program.c:1116
#8 0x7fbe7cd38273 in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1281
#9 0x7fbe7cd38273 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1345
#10 0x7fbe7d798ca8 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:724
#11 0x7fbe7d798ca8 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:952
#12 0x7fbe7d6790d5 in link_program ../src/mesa/main/shaderapi.c:1336
#13 0x7fbe7d6790d5 in link_program_error ../src/mesa/main/shaderapi.c:1447
...
SUMMARY: AddressSanitizer: 2528456 byte(s) leaked in 1057 allocation(s).
Fixes: 54f6e72b27 ("r300: better register allocator for vertex shaders")
Signed-off-by: Patrick Lerda <patrick9876@free.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27792 >
2024-02-26 13:55:53 +00:00
Patrick Lerda
b11ecacb93
r300: fix r300_destroy_context() related memory leaks
...
For instance, with "piglit/bin/fcc-blit-between-clears -auto -fbo"":
SUMMARY: AddressSanitizer: 70512 byte(s) leaked in 497 allocation(s).
Fixes: e01f86c67b ("r300: set PIPE_BIND_CONSTANT_BUFFER for const_uploader")
Signed-off-by: Patrick Lerda <patrick9876@free.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27791 >
2024-02-26 12:56:30 +01:00
Samuel Pitoiset
4071c399a2
radv: compute the total LDS usage in gfx10_get_ngg_info()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722 >
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
d85311b120
radv: compute NGG scratch LDS base in gfx10_get_ngg_info()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722 >
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
0570d40d5b
radv: determine NGG culling info before NGG info
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722 >
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
e3863a22bb
radv: pass radv_shader_info to gfx10_get_ngg_info()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722 >
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
4db0952639
radv: pass gfx10_ngg_info to gfx10_get_ngg_info()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722 >
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
beb2e7df68
radv: determine NGG query info before linking shader info
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722 >
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
64f46c83a3
radv: use so.num_outputs to determine if NGG shaders need XFB queries
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722 >
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
7f8a84a024
radv: do not set gs.has_pipeline_stat_query twice for NGG GS
...
It's already initialized in gather_shader_info_gs().
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722 >
2024-02-26 10:42:37 +00:00
Samuel Pitoiset
6c1e82e309
radv: remove unused parameter in gfx10_get_ngg_query_info()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27722 >
2024-02-26 10:42:37 +00:00
Lionel Landwerlin
e9169881db
anv: add missing generated file dep
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10672
Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27786 >
2024-02-26 07:56:50 +00:00
Mike Blumenkrantz
5816b5961f
zink: use new flag to determine whether swapchain readback cache is usable
...
the resource-valid flag isn't ideal for this since it doesn't convey
whether the swapchain cache is up-to-date
this should fix cases where the cache may have been erroneously used when
it hadn't been updated
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553 >
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
01c9199cb8
zink: only update swapchain readback cache when necessary
...
this avoids modifying the cache for cases where the acquired image was
never modified
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553 >
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
8fb83c0935
zink: only update swapchain readback cache on create if necessary
...
minor optimization
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553 >
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
417a1986fb
zink: set and manage a flag indicating that swapchain readback needs updating
...
not currently used, but this is more coherent than relying on other flags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553 >
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
114a5da790
zink: update swapchain readback cache on create
...
ensure this can be used immediately
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553 >
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
7486aaa1c0
zink: make readback attempts count towards ZINK_READBACK_THRESHOLD
...
readback is readback even if the app is being "smart" (swapchain readback
is never smart)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553 >
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
d5d5f54fe9
zink: add a swapchain readback case for reading differently-acquired image
...
if a swapchain is shared between multiple resources, a deadlock and/or invalid
data will result from readback attempts if one resource holds a swapchain
image that the other resource must read from
to avoid this, allow accessing the acquiring resource directly since this is
the only sane way to perform readback
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553 >
2024-02-25 21:44:19 -05:00
Mike Blumenkrantz
ae80f9ce65
zink: make kopper_swapchain_image::acquired the resource that acquired it
...
no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553 >
2024-02-25 21:44:19 -05:00