Thomas H.P. Andersen [Sat, 8 Jan 2022 17:36:20 +0000 (18:36 +0100)]
llvmpipe: drop unused function
Fixes a clang warning about unused static inlined functions.
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18800>
Thomas H.P. Andersen [Sat, 8 Jan 2022 17:35:48 +0000 (18:35 +0100)]
llvmpipe: mark function unused
build_masks is only used if neither PIPE_ARCH_SSE or
_ARCH_PWR8 && UTIL_ARCH_LITTLE_ENDIAN.
Adding a #if around build_masks feels a bit fragile so
I opted for just marking it unused.
Fixes a clang warning about unused static inlined functions.
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18800>
Thomas H.P. Andersen [Sat, 8 Jan 2022 17:29:29 +0000 (18:29 +0100)]
spirv: mark function unused
It is unused, but seems relevant to keep around.
Fixes a clang warning about unused static inlined functions.
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18800>
Chia-I Wu [Sat, 24 Sep 2022 07:18:54 +0000 (00:18 -0700)]
venus: fix VkImageFormatListCreateInfo for AHB
In vn_physical_device_fix_image_format_info,
local_info->list.viewFormatCount is unintialized when has_format_list is
false. We need to check has_format_list first.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18792>
Konstantin Seurer [Sat, 17 Sep 2022 19:26:12 +0000 (21:26 +0200)]
radv/rtpso: Use the common traversal helper
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18650>
Konstantin Seurer [Sat, 17 Sep 2022 17:24:26 +0000 (19:24 +0200)]
radv/rq: Use the common traversal helper
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18650>
Konstantin Seurer [Sat, 24 Sep 2022 12:28:19 +0000 (14:28 +0200)]
radv: Add a common traversal build helper
Adds a helper for building the ray traversal loop to radv_rt_common.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18650>
Vinson Lee [Sun, 18 Sep 2022 23:04:22 +0000 (16:04 -0700)]
radv: Fix file descriptor leak.
Fix defect reported by Coverity Scan.
Resource leak (RESOURCE_LEAK)
leaked_storage: Variable file going out of scope leaks the storage it points to.
Fixes:
57498067540 ("radv: Add Radeon Raytracing Analyzer trace dumping utilities")
Suggested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18660>
Bas Nieuwenhuizen [Wed, 21 Sep 2022 19:00:05 +0000 (21:00 +0200)]
radv: Properly initialize all memory in RRA dumps.
Helps debugging when making RADV BVH format changes.
changes:
1. Change bool to uint32_t because padding was uninitialized
2. Named bitfields, because unnamed bitfields were never initialized.
3. Use calloc where possible.
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18734>
Bas Nieuwenhuizen [Fri, 23 Sep 2022 15:31:40 +0000 (17:31 +0200)]
radv: Use deterministic order for dumping acceleration stuctures.
To provide deterministic RRA dumps.
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18734>
Bas Nieuwenhuizen [Tue, 20 Sep 2022 23:37:04 +0000 (01:37 +0200)]
radv: Use GLSL matrices for instance transforms in BVH.
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18692>
Bas Nieuwenhuizen [Thu, 15 Sep 2022 00:06:57 +0000 (02:06 +0200)]
radv: Use proper matrices for instance nodes.
Converts both wto and otw matrices to be full row-major 4x3 matrices.
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18692>
Bas Nieuwenhuizen [Wed, 14 Sep 2022 23:30:02 +0000 (01:30 +0200)]
radv: Remove aabb bounds from instance nodes.
I need space ...
Furthermore, this only gets used during the build, and we can eat
the cost of generating the AABB a second time there.
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18692>
Bas Nieuwenhuizen [Mon, 19 Sep 2022 21:56:59 +0000 (23:56 +0200)]
radv: Translate the BVH copy shader to glsl from nir_builder.
Much easier to change.
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18692>
Bas Nieuwenhuizen [Tue, 20 Sep 2022 22:55:35 +0000 (00:55 +0200)]
radv: Hardcode root node id.
Optimizes code a tiny bit, and avoid the hack of encoding the root
node id in the low bits of the BLAS address in an instance node.
This is needed to adjust serialization/deserialization as the
instance address there has to be the base address, so this avoids
some wrapping/unwrapping.
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18692>
Georg Lehmann [Mon, 19 Sep 2022 18:41:07 +0000 (20:41 +0200)]
radv: Fix GLSL BDA struct alignment and use pointer arithmetic SIZEOF.
Use pointer arithmetic from GL_EXT_buffer_reference2 to replace explicit
struct sizes. For that to work we also need to fix BDA alignment by setting
it to the smallest possible value (default is 16).
We could also replace the INDEX macro with a[b] operators, but that's actually
a change in behavior because a[b] always uses 64bit arithmetic.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18765>
Jordan Justen [Tue, 20 Sep 2022 22:22:44 +0000 (18:22 -0400)]
intel/l3: Use L3 full-way allocation setting for gfx12.5 (DG2, MTL)
For now we use an empty set of L3 config settings on DG2 & MTL, which
will cause the L3 programming to set L3FullWayAllocationEnable.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18770>
Sil Vilerino [Fri, 23 Sep 2022 13:04:44 +0000 (09:04 -0400)]
d3d12: Fix usage of %ld with PRIu64 instead for cross-platform build
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18777>
Mike Blumenkrantz [Wed, 14 Sep 2022 14:15:15 +0000 (10:15 -0400)]
zink: PIPE_CAP_SHAREABLE_SHADERS
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18689>
Mike Blumenkrantz [Tue, 20 Sep 2022 18:28:07 +0000 (14:28 -0400)]
zink: use screen param for zink_shader_free()
the context is no longer used
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18689>
Mike Blumenkrantz [Tue, 20 Sep 2022 18:27:27 +0000 (14:27 -0400)]
zink: use program's context for cache deletion
this forces deletion of the program from its owner context under lock
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18689>
Mike Blumenkrantz [Tue, 20 Sep 2022 18:23:14 +0000 (14:23 -0400)]
zink: add locking for program caches
these are context-based, so destroying them from another context needs locks
locks are not currently able to be contended
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18689>
Mike Blumenkrantz [Tue, 20 Sep 2022 18:20:37 +0000 (14:20 -0400)]
zink: don't try to delete programs from the cache if stages have been modified
this is guaranteed to fail anyway
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18689>
Mike Blumenkrantz [Tue, 20 Sep 2022 18:19:12 +0000 (14:19 -0400)]
zink: use screen params for program reference functions
these never used the context anyway
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18689>
Mike Blumenkrantz [Tue, 20 Sep 2022 18:17:31 +0000 (14:17 -0400)]
zink: track the owner context for gfx programs
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18689>
Mike Blumenkrantz [Mon, 19 Sep 2022 22:14:06 +0000 (18:14 -0400)]
zink: track a mask of gfx stages remaining in gfx programs
this provides a hint to improve program deletion
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18689>
Joshua Ashton [Fri, 23 Sep 2022 13:47:46 +0000 (13:47 +0000)]
freedreno: Disable 8bpp_ubwc on a6xx gen2
Fixes text corruption in VSCode on a680.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18779>
Ruijing Dong [Wed, 21 Sep 2022 21:20:00 +0000 (17:20 -0400)]
radeon/vcn: process invalid frame rate in encoding
Just in case app sending zeros in frame rate,
which could cause zero division, it will be treated
as fixed value, 30fps.
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18737>
Pierre-Eric Pelloux-Prayer [Thu, 22 Sep 2022 12:42:08 +0000 (14:42 +0200)]
radeonsi/gfx11: don't set VERTS_PER_SUBGRP to 0
It seems slower.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Fixes:
25a66477d02 ("radeonsi/gfx11: register changes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18758>
Pierre-Eric Pelloux-Prayer [Wed, 21 Sep 2022 09:41:08 +0000 (11:41 +0200)]
winsys/amdgpu: init 'r' before using it
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Fixes:
471c82d21ef ("winsys/amdgpu: flatten huge if and reorder code in amdgpu_cs_submit_ib")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18758>
Tapani Pälli [Tue, 20 Sep 2022 05:23:12 +0000 (08:23 +0300)]
iris: implement Wa_14016118574
After each 3DPRIMITIVE, we need to send a dummy post sync op if point or
line list was used or if had only 1 or 2 vertices per primitive.
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/18746>
Tapani Pälli [Tue, 20 Sep 2022 05:17:03 +0000 (08:17 +0300)]
anv: implement Wa_14016118574
After each 3DPRIMITIVE, we need to send a dummy post sync op if point or
line list was used or if had only 1 or 2 vertices per primitive.
v2: add missing _3DPRIM_POINTLIST_BF (Lionel)
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/18746>
Erik Faye-Lund [Wed, 14 Sep 2022 08:19:29 +0000 (10:19 +0200)]
zink: correct emulation of luminance-alpha formats
util_format_luminance_to_red returns a red-alpha format, not a red-green
format, which is what we need in Vulkan. So let's also call
emulate_red_alpha so we can finish up with a valid format.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18596>
Erik Faye-Lund [Wed, 14 Sep 2022 09:31:32 +0000 (11:31 +0200)]
zink: fix luminance/luminance-alpha emulation
We need to check the pipe_resource's format, not the texture-view
format. We're trying to overcome differences in the physical memory
layout, not the interpretation of the view.
But since we're now looking at the resource-format, we also need to take
the view-swizzle into account, because the state tracker likes to do
blits between LA and RA formats.
This had little effect in practice for luminance formats, but for
luminance-alpha formats things went kinda sideways. But luckily,
we don't actually use those formats yet, triggering state-tracker
emulation instead.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18596>
Erik Faye-Lund [Wed, 14 Sep 2022 12:03:51 +0000 (14:03 +0200)]
zink: refactor swizzle-clamping code
It's going to be a lot easier to work on this if we can use loops
instead of open-coding. So let's move the swizzles into arrays, process
them, and then stick it back into their place at the end.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18596>
Erik Faye-Lund [Wed, 14 Sep 2022 09:51:38 +0000 (11:51 +0200)]
zink: fixup indent
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18596>
Erik Faye-Lund [Wed, 14 Sep 2022 08:57:44 +0000 (10:57 +0200)]
zink: fix luminance clears
We should clear the red and green channels for luminance alpha formats,
and leave the other channels alone.
It doesn't really matter much what we're filling them in with, and the
rest of the code is kinda confused, and either does 0 or 1 a bit
randomly. Randonly pick 1.0 for the alpha and 0 for the rest.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18596>
Erik Faye-Lund [Wed, 14 Sep 2022 08:36:21 +0000 (10:36 +0200)]
zink: emulate latc formats with rgtc
util_format_luminance_to_red returns PIPE_FORMAT_NONE for LATC formats,
because there's no red-alpha variant of it, only red-green.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18596>
Erik Faye-Lund [Sun, 18 Sep 2022 09:36:55 +0000 (11:36 +0200)]
docs: add an amber article
This gives a brief introduction to the Amber branch, and where to
find documentation for it.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18648>
Samuel Pitoiset [Fri, 10 Jun 2022 15:22:41 +0000 (17:22 +0200)]
radv/ci: add piglit testing with Zink on NAVI10
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18315>
Samuel Pitoiset [Fri, 23 Sep 2022 07:17:01 +0000 (09:17 +0200)]
zink/ci: update list of flakes for Piglit with RADV on NAVI10
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18315>
Samuel Pitoiset [Thu, 22 Sep 2022 16:23:03 +0000 (18:23 +0200)]
zink/ci: update list of expected failures with RADV on NAVI10
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18315>
Samuel Pitoiset [Fri, 23 Sep 2022 06:37:46 +0000 (08:37 +0200)]
zink/ci: skip GLX tests with RADV
Can't work with GBM.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18315>
Samuel Pitoiset [Thu, 22 Sep 2022 16:57:48 +0000 (18:57 +0200)]
zink/ci: skip arb_shader_clock with RADV
They are too random.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18315>
Samuel Pitoiset [Mon, 22 Aug 2022 20:31:41 +0000 (22:31 +0200)]
zink/ci: skip ext_external_objects from Piglit with RADV
This subset randomly hangs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18315>
Lionel Landwerlin [Wed, 20 Jul 2022 14:01:21 +0000 (17:01 +0300)]
intel/nir/rt: fixup alignment of memcpy iterations
Not sure if fixes anything because it's always 16 at least, but this
is more correct.
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/17396>
Lionel Landwerlin [Wed, 20 Jul 2022 13:53:14 +0000 (16:53 +0300)]
intel/fs: fixup a64 messages
And run algebraic when either int64 for float64 are not supported so
those don't end up in the generated code.
Cc: mesa-stable
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/17396>
Lionel Landwerlin [Tue, 19 Jul 2022 19:09:17 +0000 (22:09 +0300)]
intel/nir/rt: store ray query state in scratch
Initially I tried to store ray query state in the RT scratch space but
got the offset wrong. In the end putting this in the scratch surface
makes more sense, especially for non RT stages.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
c78be5da300ae3 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
Lionel Landwerlin [Tue, 19 Jul 2022 19:04:35 +0000 (22:04 +0300)]
intel/nir/rt: change scratch check validation
It's very unfortunate that we have the RT scratch being conflated with
the usual scratch. In our implementation those are 2 different buffers.
The usual scratch access are done through the scratch surface state
(delivered through thread payload), while RT scratch (which outlives
thread dispatch with shader calls) is its own buffer.
So checking the NIR scratch size makes no sense as we can have normal
scratch accesses completely unrelated to RT scratch accesses.
This change switches the validation by looking at whether the scratch
base pointer intrinsic is being used (which is what we use/abuse to
implement RT scratch).
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
c78be5da300ae3 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
Lionel Landwerlin [Tue, 19 Jul 2022 18:50:44 +0000 (21:50 +0300)]
intel/nir/rt: fix ray query proceed level
Initially the level is world (top level), then it's whatever level the
potential hit is.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
c78be5da300ae3 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
Lionel Landwerlin [Wed, 20 Jul 2022 14:03:22 +0000 (17:03 +0300)]
intel/nir/rt: remove ray query mem hit writes at initialization
This will not even be read by HW.
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/17396>
Lionel Landwerlin [Tue, 19 Jul 2022 18:47:45 +0000 (21:47 +0300)]
intel/nir/rt: spill/fill the entire ray query data
We need the traversal stack to saved/restored along with mem hits.
Total spill/fill is 256bytes.
We can potentially optimize this but we have to be very careful about
what state the query is in.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
c78be5da300ae3 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
Lionel Landwerlin [Thu, 7 Jul 2022 10:31:46 +0000 (13:31 +0300)]
intel/nir/rt: fixup generate hit
This function copies the potential hit from its memory location to the
committed hit location. A couple of fields got their bit offset wrong.
Fixes some CTS tests in dEQP-VK.ray_query.*
v2: Copy primitive/instance leaf pointers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
046571479028 ("intel/nir/rt: add more helpers for ray queries")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
Xin LI [Fri, 23 Sep 2022 06:05:53 +0000 (23:05 -0700)]
meson: Improve detection of qsort_r().
Instead of trying to guess the interface style by solely checking
the OS name, check if a fake test program can be built and linked.
This will give more accurate result when FreeBSD and other systems
moved to the interface based on GNU qsort_r().
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18527>
Gert Wollny [Fri, 16 Sep 2022 14:32:33 +0000 (16:32 +0200)]
r600: Make NIR the default shader IR
By default sb is disabled, to enable it one can
set
R600_DEBUG=nirsb
TGSI can be enabled by using
R600_DEBUG=use_tgsi
In this case "sb" will be enabled, but one can use
the TGSI backend without sb by setting
R600_DEBUG=use_tgsi,sb
Closes: #6858
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18753>
Gert Wollny [Fri, 16 Sep 2022 14:43:12 +0000 (16:43 +0200)]
r600: Add slot to ALU disassambly
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18753>
Dave Airlie [Mon, 19 Sep 2022 20:40:21 +0000 (06:40 +1000)]
lavapipe: use slow clear path if conditional rendering.
the ->clear path checks render condition which isn't necessary.
Fixes dEQP-VK.conditional_rendering.draw.condition_host_memory_expect_noop_rp_clear.draw*
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18686>
Samuel Pitoiset [Wed, 21 Sep 2022 11:35:42 +0000 (13:35 +0200)]
radv: rework and rename radv_make_buffer_descriptor()
Pass the VA directly and rename to radv_make_texel_buffer_descriptor().
This helper will be re-used for future work.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18750>
Samuel Pitoiset [Wed, 21 Sep 2022 11:32:27 +0000 (13:32 +0200)]
radv: remove unnecessary radv_buffer_view::vk_format
It's not really useful.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18750>
Samuel Pitoiset [Tue, 20 Sep 2022 14:03:53 +0000 (16:03 +0200)]
radv: pass a VkSampler to write_sampler_descriptor()
For future work, and remove useless radv_device parameter.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18750>
Iago Toral Quiroga [Thu, 22 Sep 2022 06:41:50 +0000 (08:41 +0200)]
broadcom/compiler: don't apply robust buffer access to shared variables
This feature is only concerned with buffers bound through a descriptor
set. We are still keeping the code for this (disabled by default) since
it may be useful for debugging some scenarios.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18744>
Iago Toral Quiroga [Thu, 22 Sep 2022 07:20:46 +0000 (09:20 +0200)]
broadcom/compiler: handle shared stores with robust buffer access
For some reason we supported all shared intrinsics but this one.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18744>
Iago Toral Quiroga [Thu, 22 Sep 2022 07:18:18 +0000 (09:18 +0200)]
broadcom/compiler: fix robust buffer access
Our implemention was bogus, it was only putting a cap on the offset
based on the aligned buffer size and this doesn't ensure the access
to the buffer happens within its valid range.
I think the only reason we have been passing the tests is that we
align all buffers sizes to 256B and the tests create buffers with a
size that is smaller than that (like 64B). When get the size of the
buffer from the shader, we get the actual bound range (so 64B in this
case) and by capping to that we don't ensure the access will stay
within that range, but we ensure it will stay within the underlying
memory bound to the buffer (256B), and this is fine by the spec,
however, I think if the actual buffer range was the same as the
underlying allocation we would fail the tests.
A valid behavior for robust buffer access on an out-of-bounds access
is to return any valid bytes within the buffer, so we can just
make that offset 0.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18744>
Paul Gofman [Tue, 28 Jun 2022 01:39:04 +0000 (20:39 -0500)]
vbo/dlist: keep buffers used in loopback_vertex_list() mapped.
When display list loopback path is hit the major performance
drop during glCallList() happens due to constantly mapping and
unmapping the buffer.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17285>
Marek Olšák [Wed, 21 Sep 2022 20:12:25 +0000 (16:12 -0400)]
gallium/u_threaded: add an option for unsychronized create_fence_fd
And enable it for radeonsi. This may be needed by Android.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18731>
Mike Blumenkrantz [Thu, 22 Sep 2022 19:33:48 +0000 (15:33 -0400)]
zink: handle culldistance xfb outputs like clipdistance
fixes:
spec@ext_transform_feedback@builtin-varyings gl_culldistance
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18724>
Mike Blumenkrantz [Wed, 21 Sep 2022 14:49:33 +0000 (10:49 -0400)]
glsl: fix gl_CullDistance xfb linking
this matches the behavior for gl_ClipDistance
ref #7152
Fixes:
0c8492cd3b2 ("glsl: fix location for array subscript")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18724>
Caio Oliveira [Wed, 21 Sep 2022 20:43:56 +0000 (13:43 -0700)]
spirv: Make a helper function to check glslang/shaderc
When deciding on workarounds that apply to GLSLang we should also check
for ShaderC (when using glslang). Add a helper to do that and reuse in
the three places we check for it.
This patch will now consider shaderc for wa_glslang_cs_barrier workaround.
Suggested by Timur Kristóf.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>
Caio Oliveira [Mon, 19 Sep 2022 22:19:36 +0000 (15:19 -0700)]
spirv: Call vtn_emit_ret_store() only when handling return branch
No need to call it at the end of every block, since we already
know and identified the blocks terminating with returns.
Suggested by Jason Ekstrand.
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>
Caio Oliveira [Mon, 19 Sep 2022 20:50:55 +0000 (13:50 -0700)]
spirv: Add workaround to ignore OpReturn after OpEmitMeshTasksEXT
Fixes:
7d1bcf1f55b ("spirv, nir: Handle EmitMeshTasksEXT opcode.")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>
Timur Kristóf [Tue, 6 Sep 2022 14:12:02 +0000 (16:12 +0200)]
spirv: Treat EmitMeshTasksEXT as a terminating instruction.
glslang had a bug and didn't actually emit it as a terminating
instruction, therefore this went unnoticed thus far. See
https://github.com/KhronosGroup/glslang/issues/3020.
Modified by Caio Oliveira to emit the corresponding NIR intrinsic
right before the halt.
Fixes:
7d1bcf1f55b ("spirv, nir: Handle EmitMeshTasksEXT opcode.")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>
Caio Oliveira [Mon, 19 Sep 2022 20:35:13 +0000 (13:35 -0700)]
spirv: Pass vtn_block into vtn_emit_branch()
This will be used later to handle branches instructions that have
parameters in them, e.g. SpvOpEmitMeshTasksEXT. No behavior change in
this commit.
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>
Caio Oliveira [Wed, 21 Sep 2022 14:43:52 +0000 (07:43 -0700)]
nir/lower_task_shader: Don't fail adding a launch when last instruction is a jump
Fixes:
8aff8d3dd42 ("nir: Add common task shader lowering to make the backend's job easier.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>
Mihai Preda [Tue, 6 Sep 2022 16:00:30 +0000 (19:00 +0300)]
gallivm: LLVM opaque pointers: use lp_build_array_get_ptr2() in lp_bld_nir_soa.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18721>
Mihai Preda [Tue, 6 Sep 2022 15:57:42 +0000 (18:57 +0300)]
gallivm: LLVM opaque pointers: add lp_build_array_get[_ptr]2 in lp_bld_struct.c
i.e. variants taking an explicit LLVM type
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18721>
Mihai Preda [Wed, 31 Aug 2022 12:38:52 +0000 (15:38 +0300)]
gallivm: LLVM opaque pointer fixes in lp_bld_sample.c
load_mip()
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18721>
Mihai Preda [Wed, 14 Sep 2022 10:01:49 +0000 (13:01 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in store_aos()
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>
Mihai Preda [Wed, 21 Sep 2022 11:00:02 +0000 (14:00 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in draw_tcs_llvm_emit_store_output()
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>
Mihai Preda [Wed, 21 Sep 2022 10:26:00 +0000 (13:26 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in draw_tcs_llvm_emit_fetch_output()
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>
Mihai Preda [Wed, 21 Sep 2022 10:08:59 +0000 (13:08 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in draw_tcs_llvm_emit_fetch_input()
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>
Mihai Preda [Wed, 21 Sep 2022 09:59:37 +0000 (12:59 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in draw_gs_llvm_epilogue()
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>
Mihai Preda [Wed, 21 Sep 2022 09:43:47 +0000 (12:43 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in draw_gs_llvm_end_primitive()
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>
Mihai Preda [Wed, 14 Sep 2022 11:55:59 +0000 (14:55 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in draw_gs_llvm_fetch_input()
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>
Mihai Preda [Wed, 14 Sep 2022 10:30:51 +0000 (13:30 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in generate_clipmask()
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>
Mihai Preda [Wed, 14 Sep 2022 10:14:04 +0000 (13:14 +0300)]
gallium/draw: fix LLVM opaque pointer warnings in store_clip()
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18720>
Lionel Landwerlin [Thu, 22 Sep 2022 05:13:22 +0000 (08:13 +0300)]
anv: add missing wokraround for texture cache invalidate
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18743>
Connor Abbott [Thu, 22 Sep 2022 15:32:53 +0000 (17:32 +0200)]
ir3/analyze_ubo_ranges: Account for reserved consts
We weren't accounting for the reserved consts when calculating how much
we can upload. This led to assertion failures later if we pushed too
much.
Fixes:
d3b7681df28 ("tu: ir3: Emit push constants directly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18757>
Connor Abbott [Thu, 22 Sep 2022 13:19:09 +0000 (15:19 +0200)]
tu: Set textures_used for input attachments correctly
We were accidentally multiplying by 2 twice. Noticed by inspection.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18757>
Connor Abbott [Thu, 22 Sep 2022 13:07:21 +0000 (15:07 +0200)]
tu: Fix maxPerStageDescriptorUpdateAfterBindInputAttachments
We need this to be the same as maxPerStageDescriptorInputAttachments.
Fixes:
d9fcf5de55a ("turnip: Enable nonuniform descriptor indexing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18757>
Sil Vilerino [Thu, 22 Sep 2022 17:41:20 +0000 (13:41 -0400)]
d3d12: Fix texture array DPB encode path
Mark D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAG_USED_AS_REFERENCE_PICTURE when applicable
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18763>
Sil Vilerino [Thu, 22 Sep 2022 17:34:28 +0000 (13:34 -0400)]
d3d12: Add debug verbosity for output reconstructed picture
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18763>
Sil Vilerino [Thu, 22 Sep 2022 17:07:59 +0000 (13:07 -0400)]
d3d12: Fix out of bounds index check for texture array DPB
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18763>
Sil Vilerino [Thu, 22 Sep 2022 11:58:48 +0000 (07:58 -0400)]
d3d12: Relax slice caps requirements for video encode
The check in d3d12_has_video_encode_support was returning no encode support unless
the driver supported D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_UNIFORM_PARTITIONING_SUBREGIONS_PER_FRAME
when it should also return support when the driver reports only full frame support
(ie. D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_FULL_FRAME)
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18763>
Mike Blumenkrantz [Thu, 1 Sep 2022 14:23:35 +0000 (10:23 -0400)]
zink: delete some descriptor caching cruft
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>
Mike Blumenkrantz [Thu, 1 Sep 2022 14:22:51 +0000 (10:22 -0400)]
zink: delete more sw conditional render handling
I forgot to delete this when I deleted the draw path handling
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>
Mike Blumenkrantz [Thu, 1 Sep 2022 13:37:06 +0000 (09:37 -0400)]
zink: remove batch usage from sampler states
this was useless
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>
Mike Blumenkrantz [Thu, 1 Sep 2022 13:34:41 +0000 (09:34 -0400)]
zink: remove batch tracking/usage from view types
instead of incurring all the overhead of tracking lifetimes for these,
it makes more sense to just let them delete whenever and then store
the vk object onto its parent image/buffer to be deleted when that gets
freed, as the parent object's lifetime will always be >= the view's lifetime
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>
Mike Blumenkrantz [Thu, 1 Sep 2022 13:15:30 +0000 (09:15 -0400)]
zink: split out bind_sampler_states hook for drivers without EXT_non_seamless_cube_map
this incurs some overhead and is seldom used, so avoid having it in the codepath
at all if it won't be used
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>
Mike Blumenkrantz [Thu, 1 Sep 2022 13:15:06 +0000 (09:15 -0400)]
zink bump batch state limit a bit
this should yield better throughput
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>
Mike Blumenkrantz [Wed, 31 Aug 2022 19:38:29 +0000 (15:38 -0400)]
zink: rework batch tracking for resources
this uses a revised version of radeonsi's buffer list array to track
resources for lifetime/usage management, massively improving performance
by avoiding hash table lookups
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>