Commit Graph

165608 Commits

Author SHA1 Message Date
Rhys Perry
8f7da2aecd aco: fix nir_var_shader_out barriers for task shaders
These will be used in a future commit.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22211>
(cherry picked from commit 6974e5479c)
2023-04-05 10:13:54 -07:00
Mike Blumenkrantz
2ce6652a7a zink: flag vertex buffers for rebind after vstate draws
vstate draws bind their own vertex buffers unrelated to the bound
gallium buffers, so any draw occurring after a vstate draw must
rebind vertex buffers to ensure the correct ones are bound

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
(cherry picked from commit 4be5caba67)
2023-04-04 16:35:54 -07:00
Mike Blumenkrantz
a09d1d6bfa zink: block resolves where src extents > dst extents
vulkan resolves only provide "extents" instead of src and dst regions like
GL, which means vk resolves can't be used to downscale images, as such
operations will instead just crop the image

fixes #8655

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22195>
(cherry picked from commit db582e5e7d)
2023-04-04 16:35:54 -07:00
Mike Blumenkrantz
b7a4193899 llvmpipe: fix handling of unused color attachments
if an attachment doesn't have blending or color output from the shader,
nothing should touch the attachment

this is consistent with vulkan spec and needed for upcoming cts coverage

cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22135>
(cherry picked from commit db1371cce1)
2023-04-04 16:35:52 -07:00
Mike Blumenkrantz
876a67ef6d llvmpipe: fix linear fs analysis with nonzero fs outputs
linear fs only works with output 0

cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22135>
(cherry picked from commit 6a5dcd2776)
2023-04-04 16:35:52 -07:00
Pierre-Eric Pelloux-Prayer
792e54d0a4 radeonsi: don't use alignment_log2 of imported buffers
This value isn't passed to the importer by the kernel
so we can't check it.

Fixes: f7a4051b83 ("radeonsi: Check pitch and offset for validity.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8431
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22170>
(cherry picked from commit 9c90deefb2)
2023-04-04 16:35:51 -07:00
Karol Herbst
016fc3c449 nvc0: enable fp helper invocation memory loads on Turing+
Starting with GSP this will be the only way of doing so, for older gens
we'll just fix it up on the kernel side.

Cc: mesa-stable
Acked-by: M Henning <drawoc@darkrefraction.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21989>
(cherry picked from commit 72b7e20bf7)
2023-04-04 16:35:48 -07:00
Tapani Pälli
3c4e28cdf4 anv: use primitive ID override when shader does not supply it
Patch moves over this fix from iris driver.

Fixes following test on DG2:
   dEQP-VK.rasterization.culling.primitive_id

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com> [v1]
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22130>
(cherry picked from commit ca4ec49b0e)
2023-04-04 15:56:46 -07:00
antonino
b96362381b nir: avoid generating conflicting output variables
Because not all vertex outputs can have corresponding fragment inputs
(eg. edgeflags) some logic is needed to correctly generate variables in
a passthough gs.

Before this change some output variables ened up with the same location.

Fixes: d0342e28b3 ("nir: Add helper to create passthrough GS shader")

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>
(cherry picked from commit edecb66b01)
2023-04-04 15:56:12 -07:00
antonino
a0224f1b3a nir: handle primitives with adjacency
`nir_create_passthrough_gs` can now handle primitives with adjacency where some
vertices need to be skipped.

Fixes: d0342e28b3 ("nir: Add helper to create passthrough GS shader")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>
(cherry picked from commit ea14579f3d)
2023-04-04 15:56:12 -07:00
Lionel Landwerlin
5b97011697 iris: implement recommended flush/wait of AUX-TT invalidation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22183>
(cherry picked from commit 937924f2a5)
2023-04-04 15:56:12 -07:00
Lionel Landwerlin
d86beb2050 anv: implement recommended flush/wait of AUX-TT invalidation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22183>
(cherry picked from commit 763854f7e3)
2023-04-04 15:56:12 -07:00
Mike Blumenkrantz
1059a23745 aux/trace: fix GALLIUM_TRACE_NIR handling
this now correctly doesn't dump nir when the counter is zero

Fixes: f99eab23ad ("aux/trace: delete GALLIUM_TRACE_NIR log message")

Reviewed-by: Matti Hämäläinen <ccr@tnsp.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22164>
(cherry picked from commit 83929f9955)
2023-04-04 13:06:05 -07:00
Filip Gawin
6ca17e3a72 crocus: don't quantize the clear value
Helps with:
spec@!opengl 1.0@depth-clear-precision-check@depth32f_stencil8,UnexpectedPass
spec@!opengl 3.0@clearbuffer-bug,UnexpectedPass

Cc: mesa-stable

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22137>
(cherry picked from commit fa6ecd0032)
2023-04-04 13:06:03 -07:00
Ilya K
9191fa44ce intel/vk/grl: don't install libgrl.a
It isn't used by anything at runtime and shouldn't be installed.
Saves about 3MB of space on the final artifacts on x86_64-linux.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8711
Fixes: 63966505 ("anv/grl: Build OpenCL kernels")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22133>
(cherry picked from commit 679c84142f)
2023-04-04 13:06:02 -07:00
Marcin Ślusarz
d2dc9fd75c anv,hasvk: remove stale comments
Added in 060a6434ec.
The field it described was removed in c1f4343807.

Fixes: c1f4343807 ("anv: Set up memory types and heaps during physical device init")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22113>
(cherry picked from commit 698135fd3e)
2023-04-04 13:06:02 -07:00
Konstantin Seurer
95d24c496c nir/lower_shader_calls: Remat derefs before lowering resumes
Closes: #7923
cc: mesa-stable

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20399>
(cherry picked from commit 200e551cbb)
2023-04-04 13:06:00 -07:00
antonino
fea4ef9c2f mesa: correctly allocate space for converted primtives
Previosuly it was assumed that primitives where always converted to
triangles if the driver did not support all primitives, however that's
not true for a driver that supports quads but not quad strips.

Fixes piglit spec@!opengl 1.1@dlist-fdo3129-01 on Panfrost

Fixes: dcbf2423d2 ("vbo/dlist: add vertices to incomplete primitives")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21987>
(cherry picked from commit d4a6c97779)
2023-04-04 10:47:26 -07:00
Lionel Landwerlin
cf4ce99b94 anv: fix incorrect utrace bo release
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c67c9688c3 ("anv/utrace: use a bo pool for utrace buffers")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22006>
(cherry picked from commit 87a1d6423c)
2023-04-04 10:47:22 -07:00
Jesse Natalie
a9b6993937 microsoft/compiler: Fix setting bit 31 in feature flags
Fixes: a84208ee ("microsoft/compiler: Fill out and sort the shader/module flags")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21913>
(cherry picked from commit 273a7cf0e2)
2023-04-04 10:47:22 -07:00
Qiang Yu
b2f0947178 ac/llvm: add missing type convert for nir_load_buffer_amd
Fixes: afcbccb078 ("ac/llvm: implement ACCESS_USE_FORMAT_AMD as buffer_load/store_format")
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/22043>
(cherry picked from commit 0cd89a27ed)
2023-04-04 09:37:21 -07:00
Qiang Yu
5e8c50665c ac/llvm: respect channel_type when ac_build_buffer_load
Mainly for nir_load_smem_buffer_amd which pass i32 for this parameter.

Fixes: 8030fbcf16 ("nir,ac/llvm: add nir_load_smem_buffer_amd")
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/22043>
(cherry picked from commit 5ddb46e963)
2023-04-04 09:37:21 -07:00
David Heidelberg
c5be1a5ae6 aco: drop leftover variable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8652
Fixes: 44fdd2ebcb ("aco: end reduce tmp after control flow, when used within control flow")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22011>
(cherry picked from commit 7dcd02bd32)
2023-04-04 09:36:50 -07:00
Mike Blumenkrantz
f1ac88448a zink: handle swapchain creation failure less lazily
this is a real scenario

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
(cherry picked from commit ca43ecefa4)
2023-04-04 09:36:30 -07:00
Lang Yu
6a0c20df84 amd/common: fix a typo
Fixes: 35f053ba8c ("radv: Fix corrupted mipmap copies on GFX9+")

Signed-off-by: Lang Yu <lang.yu@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22000>
(cherry picked from commit 19b89c8077)
2023-04-03 19:50:34 -07:00
Konstantin Seurer
6d9fe91af6 radv/rt: Handle load_constant instructions when inlining shaders
Fixes the following tests:
dEQP-VK.ray_query.builtin.rayqueryterminate.ahit.aabbs,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.ahit.triangles,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.call.aabbs,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.call.triangles,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.chit.aabbs,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.chit.triangles,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.miss.aabbs,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.miss.triangles,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.rgen.aabbs,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.rgen.triangles,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.sect.aabbs,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.sect.triangles,Fail

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8647
Fixes: fda262f ("radv/rt: move Ray Tracing shader creation into separate file")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22002>
(cherry picked from commit deb537de3c)
2023-04-03 19:50:34 -07:00
Eric Engestrom
05de28d01b v3d: fix dirty bitset being too small to accept V3D_DIRTY_SSBO
Many of the `V3D_DIRTY_*` flags are above 32 bits, but for now the only
one used here is V3D_DIRTY_SSBO.

`shader->uniform_dirty_bits`, where `dirty` ends up, is already 64 bits.

Fixes: 45bb8f2957 ("broadcom: Add V3D 3.3 gallium driver called "vc5", for BCM7268.")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22019>
(cherry picked from commit a7c051b5ac)
2023-04-03 15:47:23 -07:00
Timothy Arceri
deebec40a0 util/00-mesa-defaults: add Akka Arrh workaround
Cc: mesa-stable

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21979>
(cherry picked from commit 29c71b8eb0)
2023-04-03 15:47:22 -07:00
Mike Blumenkrantz
8381698215 zink: double check layouts for possible feedback loop images
if a feedback loop hasn't yet been added for an image with both
descriptor and fb binds, queue a check for that to avoid mismatch

affects godot-tps-gles3-high.trace

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21906>
(cherry picked from commit 63f425c7d2)
2023-04-03 10:50:15 -07:00
Dylan Baker
1b18b9a415 .pick_status.json: Update to 2cc9364c20 2023-04-03 10:50:08 -07:00
Francisco Jerez
fe618a5be7 intel/fs: Fix register coalesce in presence of force_writemask_all copy source writes.
This fixes the behavior of register coalesce in cases where the source
of a copy is written elsewhere in the program by a force_writemask_all
instruction, which could cause the overwrite to be executed for an
inactive channel under non-uniform control flow, causing
can_coalesce_vars() to give incorrect results.  This has been reported
in cases like:

> while (true) {
>    x = imageSize(img);
>    if (non_uniform_condition()) {
>       y = x;
>       break;
>    }
> }
> use(y);

Currently the register coalesce pass would coalesce x and y in the
example above, which is invalid since in the example above imageSize()
is implemented as a force_writemask_all SEND message, whose result is
broadcast to all channels, so when a given channel executes 'y = x'
and breaks out of the loop, another divergent channel can execute a
subsequent iteration of the loop overwriting 'x' with a different
value, hence coalescing y and x into the same register changes the
behavior of the program.

Note that this is a regression introduced by commit a4b36cd3dd.  In
order to avoid the problem without reverting that patch, we prevent
register coalesce if there is an overwrite of the source with
force_writemask_all behavior inconsistent with the copy and this
occurs anywhere in the intersection of the live ranges of source and
destination, even if it occurs lexically before the copy, since it
might be physically executed after the copy under divergent loop
control flow.

Fixes: a4b36cd3dd ("intel/fs: Coalesce when the src live range is contained in the dst")
Reported-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21351>
(cherry picked from commit 76b4255cd8)
2023-03-29 14:56:08 -07:00
Jesse Natalie
682b695e4a nir: Propagate alignment when rematerializing cast derefs
Fixes: 878a8daca6 ("nir: Add alignment information to cast derefs")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21975>
(cherry picked from commit 49885f87c3)
2023-03-29 14:56:06 -07:00
Mike Blumenkrantz
9d9de1b0fd zink: track tc fences better
tc fence lifetimes can exceed the lifetimes of their parent contexts,
which means they can be destroyed after mfence->fence has been destroyed

to avoid invalid memory access on a destroyed fence, store all the assigned
tc fences into an array on the real fence and then use that to unset fence
pointers on any outstanding tc fences

fixes flakiness in dEQP-EGL.functional.sharing.gles2.multithread.random_egl_sync.images.texsubimage2d.12

in caselist:
dEQP-EGL.functional.query_context.get_current_surface.rgba4444_pbuffer
dEQP-EGL.functional.create_surface.platform_window.rgba5551_depth_no_stencil
dEQP-EGL.functional.query_surface.simple.pbuffer.rgb888_depth_no_stencil
dEQP-EGL.functional.color_clears.multi_context.gles2.rgb888_pixmap
dEQP-EGL.functional.color_clears.multi_context.gles1_gles2.rgba8888_window
dEQP-EGL.functional.color_clears.multi_context.gles1_gles2_gles3.rgb888_window
dEQP-EGL.functional.render.multi_thread.gles2_gles3.rgba5551_pbuffer
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_sync.buffers.buffersubdata.3
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_sync.programs.link.6
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_sync.images.texsubimage2d.12

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21843>
(cherry picked from commit 9df68c633e)
2023-03-29 13:56:29 -07:00
Sviatoslav Peleshko
5fe3b05f98 glsl: Fix codegen for constant ir_binop_{l,r}shift with mixed types
Fixes: 13106e10 ("glsl: Generate code for constant ir_binop_lshift and ir_binop_rshift expressions")

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17787>
(cherry picked from commit 1648e3b4b9)
2023-03-28 13:46:18 -07:00
Alyssa Rosenzweig
86487ffe66 panfrost: Don't round up Midgard polygon list BOs
Rounding up the polygon list BO can waste large amounts of memory. In a common
case I observed, it rounded up 11MB to 16MB, wasting 5MB. That adds up quickly
across processes, especially on the 2GB machines.

This only applies to Midgard. On Bifrost and newer, the driver does not
explicitly allocate this data structure. Cc stable because this rounding is
incorrect and the increase in RAM usage can cause real problems (especially
given how slow the shrinker is).

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21831>
(cherry picked from commit f2617944bf)
2023-03-28 13:46:17 -07:00
Timothy Arceri
530c9bdce5 glsl: allow 64-bit integer on RHS of shift
Fixes: 9ba9a7f854 ("glsl: Add 64-bit integer support to some operations.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6862

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21919>
(cherry picked from commit 174d6e6a54)
2023-03-28 13:46:13 -07:00
Lynne
c8991ee56f aco_validate: allow for wave32 in p_dual_src_export_gfx11
Fixes RADV_PERFTEST=pswave32

Fixes: bb90d29660 ("aco: add p_dual_src_export_gfx11 for dual source blending on GFX11")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21934>
(cherry picked from commit f5e5ec180c)
2023-03-28 13:46:13 -07:00
Emma Anholt
d4b25d3bee turnip: Don't push inline uniform buffer contents outside constlen.
This would apparently lead to trying to load from this inline uniform
buffer in later submits.

Fixes: 37cde2c634 ("tu: Rewrite inline uniform implementation")
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8219
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21915>
(cherry picked from commit 78d4a82d30)
2023-03-28 13:46:12 -07:00
Mike Blumenkrantz
e239111ec6 aux/trace: delete GALLIUM_TRACE_NIR log message
this is not only annoying, it breaks trace xml output

cc: mesa-stable

Acked-by: Simon Zeni <simon@bl4ckb0ne.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21609>
(cherry picked from commit f99eab23ad)
2023-03-28 13:46:11 -07:00
antonino
91bd2510eb zink: fix final_hash update in zink_gfx_program_update
The logic that updates `ctx->gfx_pipeline_state.final_hash` assumed that
the program is replaced. It is supposed to xor `final_hash` with the
hash first and then with the new hash however when the program is
updated it end up xor-ing the new hash twice so it does nothing.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fixes: 15450d2c2e ("zink: incrementally hash all pipeline component hashes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21925>
(cherry picked from commit 1538a28803)
2023-03-28 13:46:10 -07:00
Marek Olšák
45c7e3b416 vbo: fix current attribs not updating gallium vertex elements
An initial workaround that helped discover this was written by:
Illia Polishchuk illia.a.polishchuk@globallogic.com

Closes: #8440
Fixes: a18b9d07 ("st/mesa: optimize uploading zero-stride vertex attribs")

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21805>
(cherry picked from commit 3bc374ca93)
2023-03-28 13:46:09 -07:00
Lionel Landwerlin
9bfe45edbe intel/fs: fix subgroup invocation read bounds checking
nir->info.subgroup_size can be set to an enum :
  SUBGROUP_SIZE_VARYING = 0
  SUBGROUP_SIZE_UNIFORM = 1
  SUBGROUP_SIZE_API_CONSTANT = 2
  SUBGROUP_SIZE_FULL_SUBGROUPS = 3

So compute the API subgroup size value and compare it to the dispatch
size to determine whether we need some bound checking.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9ac192d79d ("intel/fs: bound subgroup invocation read to dispatch size")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21856>
(cherry picked from commit 56474fae93)
2023-03-27 15:07:14 -07:00
Daniel Schürmann
6caeb11fe9 radv/rt: Fix any_hit scratch variables.
We have to make sure not to change call_data locations as well.

Fixes: 481f78ab93 ('radv/rt: place any-hit scratch vars after intersection scratch vars')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21876>
(cherry picked from commit f6a36190a1)
2023-03-27 15:07:14 -07:00
Lionel Landwerlin
3e383010d1 intel/fs: fixup sources number from opt_algebraic
Fixes issues with register_coalesce :

fossilize-replay: brw_fs_register_coalesce.cpp:297: bool fs_visitor::register_coalesce(): Assertion `mov[i]->sources == 1' failed.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21782>
(cherry picked from commit ed3c2f73db)
2023-03-27 15:07:13 -07:00
Lionel Landwerlin
7fa4eb305a intel/fs: fix nir_opt_peephole_ffma max vec assumption
There can be larger vec than vec4.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21782>
(cherry picked from commit 18bdc71459)
2023-03-27 15:07:13 -07:00
Lionel Landwerlin
d444199779 intel/fs: don't SEND messages as partial writes
For instance, to load uniform data with the LSC we usually rely on
tranpose messages which have to execute in SIMD1. Those end up being
considered as partial writes so within loops their life span spread to
the whole loop, increasing register pressure.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21867>
(cherry picked from commit efde1917c9)
2023-03-27 15:07:12 -07:00
Konstantin Seurer
2f12abb326 radv/sqtt: Skip dumping pipeline libraries
They don't have any shaders which can lead to crashes when dumping
them.

Fixes: 2e04aeb ("radv: capture RT pipelines from the SQTT layer")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21852>
(cherry picked from commit ecf29228d0)
2023-03-27 14:06:57 -07:00
Pierre-Eric Pelloux-Prayer
3b2a93418f Revert "driconf: add a workaround for plasmashell freezing"
This reverts commit 41eb491fb6.

The underlying issue was fixed by the previous commit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20887>
(cherry picked from commit 88989379b1)
2023-03-27 14:06:56 -07:00
Pierre-Eric Pelloux-Prayer
6d111ffba6 yegl/wayland: fix glthread deadlocks
We need to make sure that glthread is idle before using wl_*
functions or they might be used from 2 threads at the same
time.

Thanks to @deltib for the investigation of this issue.

Fixes: 58f90fd03f ("egl/wayland: fix glthread crashes")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7624
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8136
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20887>
(cherry picked from commit a98e4195f5)
2023-03-27 14:06:54 -07:00
Daniel Schürmann
2164258161 radv/rt: place any-hit scratch vars after intersection scratch vars
If both, any-hit and intersection shader, use scratch vars,
it could happen that they end up in the same location and
overwrite each other.
Found by inspection.

Fixes: c3d82a9622 ('radv: Add pass to lower anyhit shader into an intersection shader.')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21863>
(cherry picked from commit 481f78ab93)
2023-03-27 14:06:54 -07:00