Eric Anholt [Wed, 19 Aug 2020 17:17:17 +0000 (10:17 -0700)]
ci/deqp-runner: Drop unused "count" variable
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6392>
Eric Anholt [Wed, 19 Aug 2020 17:15:12 +0000 (10:15 -0700)]
ci/deqp-runner: Drop stale comment from deqp-runner.sh.
We don't rerun to detect flakes ourselves any more since the runner does
it internally.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6392>
Jesse Natalie [Wed, 19 Aug 2020 21:34:11 +0000 (14:34 -0700)]
nir: Use 'unsigned' instead of enum types in nir_variable::data
MSVC treats enums as signed, so storing values that use the topmost
bit of the explicitly sized field loads as a negative value instead.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6393>
Jason Ekstrand [Wed, 19 Aug 2020 23:21:33 +0000 (18:21 -0500)]
nir: Add an LOD parameter to image_*_size
The OpenCL image_width/height/depth functions have variants which can
take an LOD parameter. More importantly, LLVM-SPIRV-Translator always
generates OpImageQuerySizeLod even if the LOD is guaranteed to be zero.
Given that over half the hardware out there has an LOD field for image
size queries (based on a rudimentary scan through their NIR -> whatever
code), we may as well just add the source to the NIR intrinsic. If this
is ever a problem for anyone, the lowering is pretty trivial.
I've also added asserts to everyone's drivers that should alert them if
they ever see an LOD other than zero. This will never happen with GL or
Vulkan so there's no need for panic.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6396>
Arcady Goldmints-Orlov [Mon, 10 Aug 2020 03:17:01 +0000 (22:17 -0500)]
broadcom/compiler: Enable PER_QUAD for UBO and SSBO loads.
Helper invocations need to be able to read from UBOs since those values
can be used for flow control, but writes from helper invocations need to
be dropped.
Fixes CTS tests:
dEQP-VK.glsl.derivate.*.uniform_loop.*
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6356>
Arcady Goldmints-Orlov [Sat, 25 Jul 2020 15:39:31 +0000 (10:39 -0500)]
broadcom/compiler: Add a constant folding pass after nir_lower_io
The nir_lower_io pass produces a bunch of constant arithmetic, and
assumes that constant folding will simplify it away.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6356>
Arcady Goldmints-Orlov [Sat, 25 Jul 2020 20:20:02 +0000 (15:20 -0500)]
broadcom/compiler: support nir_intrinsic_load_sample_id
This adds support for the intrinsic as well as the vir_SAMPID
instruction that corresponds to it in vir.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6356>
Karol Herbst [Sat, 15 Aug 2020 19:49:05 +0000 (21:49 +0200)]
clover/spirv: pass list of supported extensions to the translator
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
Pierre Moreau [Sun, 10 May 2020 21:21:56 +0000 (23:21 +0200)]
clover/nir: Register callback for translation messages (v2)
This allows us to add SPIR-V to NIR translation failure messages to the
program’s compilation log, which can then be queried by the user.
v2: Replace the if-statement in `debug_function()` with an assert.
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Serge Martin <edb@sigluy.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
Pierre Moreau [Mon, 18 May 2020 16:08:37 +0000 (18:08 +0200)]
clover/llvm: Use the highest supported SPIR-V version (v4)
v2:
a) Move `supported_spirv_verssions()` to `spirv::` (Francisco Jerez)
b) Introduce a `SPV_MAKE_VERSION` macro to avoid making mistakes and
making it more readable than its uint representation.
v3: Replaced an if-statement with a `std::min()` in
`spirv::get_spirv_translator_options()` (Karol Herbst)
v4: Turn `SPV_MAKE_VERSION()` into a function (Francisco Jerez)
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
Pierre Moreau [Tue, 5 May 2020 11:44:12 +0000 (13:44 +0200)]
meson: Raise minimum version for SPIR-V OpenCL deps (v4)
SPIRV-LLVM-Translator had API-breaking changes during version 0.2.1.
Since the new API was being used, a higher version has to be requested.
While at it and since SPIRV-LLVM-Translator added a new API to request a
specific SPIR-V version as well as allowed SPIR-V extensions, increase
the version number to the first including those new features.
v2: Require an LLVM version which is compatible with the
SPIRV-LLVM-Translator that was found; that requirement was
previously implicit and would be ensured when that library was
built. Making it explicit will help in cases where multiple versions
of LLVM might be installed.
v3: fix use of undefined _minimum_llvmspirvlib_version_array
v4 (Karol): fix creating the minimum requested version
Simplifing the code
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Serge Martin <edb@sigluy.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
Pierre Moreau [Tue, 5 May 2020 11:14:26 +0000 (13:14 +0200)]
clover/spirv: Print linked SPIR-V module if asked
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Serge Martin <edb@sigluy.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
Pierre Moreau [Tue, 5 May 2020 11:16:55 +0000 (13:16 +0200)]
clover/spirv: Remove unused tuple header
Fixes: 21473865050 ("clover/spirv: Add functions for parsing arguments, linking programs, etc.")
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Serge Martin <edb@sigluy.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
Karol Herbst [Sat, 15 Aug 2020 11:19:52 +0000 (13:19 +0200)]
clover/spirv: rework handling of spirv extensions
What extensions we support depends on spirv_to_nir but it doesn't give us a
list. So hardcode one and add extensions we know we support and hit in the
wild.
v2: move into spirv lib
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
Alyssa Rosenzweig [Thu, 20 Aug 2020 17:36:46 +0000 (13:36 -0400)]
panfrost: Fix alignment on Bifrost
This was real "fun" to debug...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 373a204bdd7 ("panfrost: Pass alignments explicitly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6410>
Connor Abbott [Thu, 2 Jul 2020 09:34:54 +0000 (11:34 +0200)]
tu: Enable VK_KHR_multiview
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
Connor Abbott [Thu, 2 Jul 2020 09:33:42 +0000 (11:33 +0200)]
tu: Implement multiview pipeline state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
Connor Abbott [Mon, 13 Jul 2020 17:27:53 +0000 (19:27 +0200)]
tu: Add multiview lowering pass
For now this only handles an a630 quirk where PC_MULTIVIEW_MASK doesn't
exist. However in the future it will also handle multi-position output.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
Connor Abbott [Thu, 2 Jul 2020 09:12:13 +0000 (11:12 +0200)]
tu: Implement multiview query interactions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
Connor Abbott [Thu, 2 Jul 2020 09:07:34 +0000 (11:07 +0200)]
tu: Improve timestamp queries
As the original comment says, we can't really give the user what they
want if there's a timestamp inside a GMEM renderpass, but we can give
them a better approximation of it. At least sysmem renderpasses will now
have an accurate timestamp.
Also, don't emit the WFI if it's not necessary, based on the stage
flags.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
Connor Abbott [Thu, 2 Jul 2020 09:25:54 +0000 (11:25 +0200)]
tu: Implement multiview clear/resolve interactions
Loads, stores, clears, and resolves now happen per-view. Since we only
support multiview with sysmem rendering, we only implement this for
sysmem clears and resolves.
There aren't any tests that mix multiview and MSAA, so no coverage of
the resolve path.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
Connor Abbott [Thu, 2 Jul 2020 09:16:50 +0000 (11:16 +0200)]
tu: Parse multiview render pass info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
Connor Abbott [Thu, 2 Jul 2020 08:46:27 +0000 (10:46 +0200)]
tu: Translate VkRenderPassMultiviewCreateInfo to VkRenderPassCreateInfo2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
Connor Abbott [Wed, 1 Jul 2020 14:46:22 +0000 (16:46 +0200)]
ir3: Add support for gl_ViewIndex in VS & FS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
Connor Abbott [Tue, 30 Jun 2020 11:04:50 +0000 (13:04 +0200)]
freedreno/a6xx: Add multiview registers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
Rob Clark [Thu, 20 Aug 2020 18:14:36 +0000 (11:14 -0700)]
freedreno/a6xx: disable LRZ when color channels are masked
From the PoV of early-z tests, having masked color channels is basically
like blend, ie. we do actually care about the fragments (or at least
parts of them) from previous draws.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6409>
Rob Clark [Thu, 20 Aug 2020 18:13:32 +0000 (11:13 -0700)]
freedreno/cffdump: add arg to filter by process name
Usueful when you have a cmdstream trace which consists of multiple
different processes.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6409>
Eric Anholt [Thu, 23 Jul 2020 21:32:13 +0000 (14:32 -0700)]
nir: Shrink store intrinsic num_components to the size used by the writemask.
This cuts a bunch of vector setup for undef components in the i965 vec4
backend. Noticed while looking into codegen regressions in nir-to-tgsi.
brw results:
total instructions in shared programs:
3893221 ->
3881461 (-0.30%)
total cycles in shared programs:
113792154 ->
113810288 (0.02%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6054>
Eric Anholt [Thu, 23 Jul 2020 21:24:15 +0000 (14:24 -0700)]
nir: Expand opt_undef to handle undef channels in a store intrinsic.
Instead of only handling all-undef stores, shrink the writemask to just
the defined channels. Cleans up a bunch of writemasks on prog_to_nir
output in particular.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6054>
Eric Anholt [Thu, 23 Jul 2020 20:39:56 +0000 (13:39 -0700)]
nir/opt_undef: Handle a couple more normal store intrinsics.
They've got the value in the same slot as the others, and the same undef
behavior should be fine.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6054>
Eric Anholt [Wed, 19 Aug 2020 16:16:15 +0000 (09:16 -0700)]
radv: Move nir_opt_shrink_vectors() into the opt loop.
Upcoming changes to opt_undef will result in this pass doing more work and
generating vector MOVs that need re-scalarizing (which is inside of the
main opt loop).
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6054>
Alyssa Rosenzweig [Mon, 17 Aug 2020 18:49:52 +0000 (14:49 -0400)]
panfrost: Reduce attribute buffer allocations
With vertex ID / instance ID in use, vs->attribute_count will be
expanded appropriately. Without them in use, everything is 1:1 (or 1:2
in the worst case of NPOT everything).
Down to 3 slabs + 64184 bytes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Mon, 17 Aug 2020 18:46:56 +0000 (14:46 -0400)]
panfrost: Don't reserve for NPOT w/o instancing
It's impossible. Down to 5 slabs + 45368.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Mon, 17 Aug 2020 18:42:41 +0000 (14:42 -0400)]
panfrost: Don't overallocate attributes
We only need vertex ID / instance ID if the shader actually requests it.
Cuts -bideas's beginning from (7 slab + 63352 bytes) to (7 slabs +
32568).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Mon, 17 Aug 2020 18:37:44 +0000 (14:37 -0400)]
panfrost: Fix attribute buffer underallocation
Breaks on the pathological where everything is NPOT.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: e646c861fc6 ("panfrost: Use packs for vertex attribute buffers")
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Mon, 17 Aug 2020 18:27:57 +0000 (14:27 -0400)]
panfrost: Pass alignments explicitly
In most cases, GPU data structures need only be self-aligned; the
worst-case 128 byte alignment is wasteful. By passing explicit
alignments, we can reduce memory usage, avoid extra allocations, and
improve descriptor cache locality.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Tue, 18 Aug 2020 12:41:37 +0000 (08:41 -0400)]
panfrost: Free batch->dependencies
On glmark2-es2 -bterrain:
594.05KB leaked over 9282 calls from:
panfrost_batch_update_bo_access
at ../src/gallium/drivers/panfrost/pan_job.c:462
in /home/alyssa/rockchip_dri.so
panfrost_batch_add_bo
at ../src/gallium/drivers/panfrost/pan_job.c:560
panfrost_batch_add_bo
at ../src/gallium/drivers/panfrost/pan_job.c:519
in /home/alyssa/rockchip_dri.so
panfrost_batch_add_resource_bos
at ../src/gallium/drivers/panfrost/pan_job.c:569
panfrost_batch_add_fbo_bos
at ../src/gallium/drivers/panfrost/pan_job.c:588
in /home/alyssa/rockchip_dri.so
panfrost_create_batch
at ../src/gallium/drivers/panfrost/pan_job.c:126
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Tue, 18 Aug 2020 12:31:42 +0000 (08:31 -0400)]
panfrost: Use memctx for sysvals
8.74KB leaked over 52 calls from:
0xffffbb5b9fc3
in ??
_mesa_hash_table_init
at ../src/util/hash_table.c:163
in /home/alyssa/rockchip_dri.so
_mesa_hash_table_create
at ../src/util/hash_table.c:186
_mesa_hash_table_u64_create
at ../src/util/hash_table.c:701
in /home/alyssa/rockchip_dri.so
panfrost_nir_assign_sysvals
at ../src/panfrost/util/pan_sysval.c:130
in /home/alyssa/rockchip_dri.so
midgard_compile_shader_nir
at ../src/panfrost/midgard/midgard_compile.c:2905
in /home/alyssa/rockchip_dri.so
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Tue, 18 Aug 2020 12:26:40 +0000 (08:26 -0400)]
pan/mdg: Free previous liveness
Before we drop the reference.
160 calls with 0B peak consumption from:
0xffffbd9d2fc3
in ??
pan_compute_liveness
at ../src/panfrost/util/pan_liveness.c:127
in /home/alyssa/rockchip_dri.so
mir_compute_liveness
at ../src/panfrost/midgard/midgard_liveness.c:55
in /home/alyssa/rockchip_dri.so
midgard_opt_dead_code_eliminate
at ../src/panfrost/midgard/midgard_opt_dce.c:118
in /home/alyssa/rockchip_dri.so
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Tue, 18 Aug 2020 12:23:13 +0000 (08:23 -0400)]
panfrost: Free hash_to_temp map
No need to put it on the context, we can keep it local in mir_squeeze
and drop when we're done.
15.77KB leaked over 85 calls from:
0xffffaed3bfc3
in ??
_mesa_hash_table_rehash
at ../src/util/hash_table.c:368
in /home/alyssa/rockchip_dri.so
hash_table_insert
at ../src/util/hash_table.c:403
in /home/alyssa/rockchip_dri.so
find_or_allocate_temp
at ../src/panfrost/midgard/mir_squeeze.c:48
in /home/alyssa/rockchip_dri.so
find_or_allocate_temp
at ../src/panfrost/midgard/mir_squeeze.c:35
in /home/alyssa/rockchip_dri.so
mir_squeeze_index
at ../src/panfrost/midgard/mir_squeeze.c:76
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Tue, 18 Aug 2020 12:10:25 +0000 (08:10 -0400)]
panfrost: Free NIR of blit shaders
After we compile from NIR to a native binary, we can throw away the NIR.
17.47KB leaked over 104 calls from:
0xffff87dcafc3
in ??
_mesa_hash_table_init
at ../src/util/hash_table.c:163
in /home/alyssa/rockchip_dri.so
_mesa_hash_table_create
at ../src/util/hash_table.c:186
nir_lower_vars_to_ssa_impl
at ../src/compiler/nir/nir_lower_vars_to_ssa.c:717
in /home/alyssa/rockchip_dri.so
nir_lower_vars_to_ssa
at ../src/compiler/nir/nir_lower_vars_to_ssa.c:817
optimise_nir
at ../src/panfrost/midgard/midgard_compile.c:504
in /home/alyssa/rockchip_dri.so
midgard_compile_shader_nir
at ../src/panfrost/midgard/midgard_compile.c:2895
in /home/alyssa/rockchip_dri.so
panfrost_build_blit_shader
at ../src/panfrost/lib/pan_blit.c:103
in /home/alyssa/rockchip_dri.so
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Tue, 18 Aug 2020 12:07:15 +0000 (08:07 -0400)]
panfrost: Free cloned NIR shader
Fixes heaptrack leak:
19.37KB leaked over 63 calls from:
0xffff92bbefc3
in ??
nir_alu_instr_create
at ../src/compiler/nir/nir.c:442
in /home/alyssa/rockchip_dri.so
clone_alu
at ../src/compiler/nir/nir_clone.c:277
in /home/alyssa/rockchip_dri.so
clone_instr
at ../src/compiler/nir/nir_clone.c:495
in /home/alyssa/rockchip_dri.so
clone_block
at ../src/compiler/nir/nir_clone.c:544
clone_cf_list
at ../src/compiler/nir/nir_clone.c:594
clone_function_impl
at ../src/compiler/nir/nir_clone.c:672
in /home/alyssa/rockchip_dri.so
nir_shader_clone
at ../src/compiler/nir/nir_clone.c:744
in /home/alyssa/rockchip_dri.so
panfrost_shader_compile
at ../src/gallium/drivers/panfrost/pan_assemble.c:154
in /home/alyssa/rockchip_dri.so
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Mon, 17 Aug 2020 23:57:54 +0000 (19:57 -0400)]
panfrost: Fix blend leak for render targets 5-8
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 375d4c2c74d ("panfrost: Extend blending to MRT")
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Mon, 17 Aug 2020 23:52:20 +0000 (19:52 -0400)]
panfrost: Keep finalized blend state constant
It's probably fine, but the writes to an uninitialized struct make me
nervous. Let's do the obvious thing instead.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Mon, 17 Aug 2020 23:43:24 +0000 (19:43 -0400)]
panfrost: Drop depth-only case in blend finalize
Since last commit, we don't call this function at all if there's no
matching colour buffer (it wouldn't make sense to!)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Mon, 17 Aug 2020 23:41:48 +0000 (19:41 -0400)]
panfrost: Explicitly handle nr_cbufs=0 case
Avoids some indirection around colour buffer count.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Mon, 17 Aug 2020 23:32:59 +0000 (19:32 -0400)]
panfrost: Drop implicit blend pooling
We dropped blend shader pools a long time ago for various reasons, but
the indirection required remained. Oops.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Mon, 17 Aug 2020 17:14:54 +0000 (13:14 -0400)]
panfrost: Share tiler_heap across batches/contexts
There's only one tiler, so this is safe. (The blob does the same
optimization.) This avoids allocating multiple heaps for multiple
batches, which wastes memory and CPU time.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Mon, 17 Aug 2020 17:48:26 +0000 (13:48 -0400)]
pan/decode: Don't try to dereference heap mapping
It might not be mapped from our perspective, we shouldn't crash on that
just for a validation that isn't actually correct.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Mon, 17 Aug 2020 16:30:49 +0000 (12:30 -0400)]
panfrost: Avoid minimum stack allocations
If stack isn't used, don't allocate it - simple as that.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Mon, 17 Aug 2020 14:31:02 +0000 (10:31 -0400)]
panfrost: Introduce invisible pool
Whereas the main batch->pool is CPU read/write, the new
batch->invisible_pool is not. This enables GPU-internal structures that
the CPU must allocate from a pool dynamically but does not read,
corresponding to the BO_INVISIBLE create flag.
The use case is speeding up varying allocation by skipping the
CPU-side mmap/munmap.
We simultaneously half the pool's minimal allocation to avoid negatively
affecting memory usage.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Alyssa Rosenzweig [Fri, 14 Aug 2020 23:08:57 +0000 (19:08 -0400)]
panfrost: Pre-allocate memory for pool
Seeing random BO creates in the middle of command stream generation is
annoying, let's preallocate memory so CPU profiling is less random.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
Kenneth Graunke [Tue, 18 Aug 2020 20:56:22 +0000 (13:56 -0700)]
iris: Fix headerless sampler messages in compute shaders with preemption
We were failing to set the "Headerless Message for Preemptable Contexts"
bit in SAMPLER_MODE in the compute context. Other drivers use a single
hardware context, so setting it on the render engine was sufficient to
flip it in both pipelines. But iris uses a separate hardware context
for compute, so we were only getting these set for the render context.
Thanks to Jason Ekstrand for catching this bug.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6380>
Samuel Pitoiset [Thu, 20 Aug 2020 07:41:46 +0000 (09:41 +0200)]
aco: fix file leak in ra_fail()
Fixes: c2b1978aa47 ("aco: rework the way various compilation/validation errors are reported")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6399>
Jason Ekstrand [Thu, 20 Aug 2020 13:46:43 +0000 (08:46 -0500)]
nir/opt_large_constants: Fix a type/deref_type typo
Fixes: df9596353a60 "nir/large_constants: Handle incomplete derefs"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6403>
Marcin Ślusarz [Mon, 17 Aug 2020 09:55:29 +0000 (11:55 +0200)]
gitlab: ask for more detailed info about GPU
PCIID is only printed by lspci/lshw on demand.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6345>
Rhys Perry [Fri, 14 Aug 2020 16:40:13 +0000 (17:40 +0100)]
radv: fix null memcpy and zero-sized malloc
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6206>
Rhys Perry [Thu, 6 Aug 2020 13:39:04 +0000 (14:39 +0100)]
radv: align pipeline cache entry and header sizes
Fixes UBSan error:
../src/amd/vulkan/radv_pipeline_cache.c:603:42: runtime error: member access within misaligned address 0x00000152ebcc for type 'struct cache_entry', which requires 8 byte alignment
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6206>
Rhys Perry [Wed, 5 Aug 2020 20:03:22 +0000 (21:03 +0100)]
radv: don't pass null to _mesa_sha1_update
This could then pass NULL to memcpy. Fixes UBSan error:
../src/util/sha1/sha1.c:140:8: runtime error: null pointer passed as argument 2, which is declared to never be null
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6206>
Rhys Perry [Thu, 6 Aug 2020 13:17:31 +0000 (14:17 +0100)]
nir: fix memory leak in nir_cf_list_clone
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6206>
Rhys Perry [Wed, 5 Aug 2020 20:03:31 +0000 (21:03 +0100)]
nir: fix potential left shift of a negative value
Fixes UBSan error:
src/compiler/nir/nir_constant_expressions.c:36573:32: runtime error: left shift of negative value -1
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6206>
Rhys Perry [Thu, 6 Aug 2020 13:53:36 +0000 (14:53 +0100)]
util: add a alignof() macro
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6206>
Rhys Perry [Tue, 18 Aug 2020 12:23:59 +0000 (13:23 +0100)]
gitlab: ask inxi output to be in code blocks
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6365>
Samuel Pitoiset [Fri, 14 Aug 2020 11:59:16 +0000 (13:59 +0200)]
radv,aco: report ACO errors/warnings back via VK_EXT_debug_report
To help developers.
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/6318>
Samuel Pitoiset [Fri, 14 Aug 2020 08:42:27 +0000 (10:42 +0200)]
aco: rework the way various compilation/validation errors are reported
The upcoming change will allow to report all ACO errors (or warnings)
directly to the app via VK_EXT_debug_report. This is similar to what
we already do for reporting various SPIRV->NIR errors.
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/6318>
Samuel Pitoiset [Tue, 18 Aug 2020 06:14:06 +0000 (08:14 +0200)]
aco: rename DEBUG_VALIDATE to DEBUG_VALIDATE_IR
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/6318>
Tapani Pälli [Tue, 18 Aug 2020 12:16:37 +0000 (15:16 +0300)]
anv: null check for buffer before reading size
v2: move assignment under existing check (Nanley)
Fixes: b9a05447a19 ("anv: dynamic vertex input binding stride and size support")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6369>
Eric Anholt [Thu, 13 Aug 2020 20:23:35 +0000 (13:23 -0700)]
util: Explicitly call the unpack functions from inside bptc pack/unpack.
We were calling the table-based unpack functions from inside the pack and
unpack table's methods, so if anything included these pack functions (such
as a call to a table-based pack function), you'd pull in all of unpack as
well.
By calling them explicitly, we save some overhead in these functions
(switch statement, address math on the zero x,y arguments) anyway.
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6307>
Eric Anholt [Thu, 13 Aug 2020 20:10:04 +0000 (13:10 -0700)]
util: Expose rgba unpack/fetch functions as external functions as well.
Like we just did for pack functions for freedreno, it will be useful to be
able to pick out a specific rgba unpack function instead of going through
the table.
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6307>
Nanley Chery [Mon, 27 Jul 2020 17:05:07 +0000 (10:05 -0700)]
iris: Drop buffer support in resource_from_handle
The callers don't seem to pass targets of PIPE_BUFFER. Stop nesting an
if-else block by dropping support for this target.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6311>
Nanley Chery [Tue, 21 Jul 2020 16:01:46 +0000 (09:01 -0700)]
iris: Add and use iris_resource_configure_main
Reduce duplication of ISL surface creation code for main surfaces. This
is similar to iris_resource_configure_aux.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6311>
Nanley Chery [Wed, 15 Jul 2020 21:46:25 +0000 (14:46 -0700)]
iris: Move size/offset calculations out of configure_aux
Not all callers want the result of the offset and size calculations.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6311>
Nanley Chery [Thu, 16 Jul 2020 00:42:26 +0000 (17:42 -0700)]
iris: Drop old comment on clear color BO allocation
Iris hasn't used a clear color BO on gen9 since commit
1cd13ccee7b.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6311>
Nanley Chery [Wed, 15 Jul 2020 19:02:40 +0000 (12:02 -0700)]
iris: Drop unused resource allocation optimization
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6311>
Nanley Chery [Wed, 15 Jul 2020 18:21:39 +0000 (11:21 -0700)]
iris: Drop iris_resource_alloc_separate_aux
When this function was called, the res->mod_info->aux_usage parameter
was ISL_AUX_USAGE_NONE. As a result, no aux buffer was ever allocated.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6311>
Eric Engestrom [Tue, 18 Aug 2020 09:48:54 +0000 (11:48 +0200)]
egl: drop another indentation level in _eglFindDisplay() by inverting an if
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6361>
Eric Engestrom [Tue, 18 Aug 2020 09:45:34 +0000 (11:45 +0200)]
egl: drop an indentation level in _eglFindDisplay() by replacing break/if with a goto
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6361>
Eric Engestrom [Tue, 18 Aug 2020 22:47:16 +0000 (00:47 +0200)]
gitlab-ci: fix quoting of variables passed down to bare-metal runners
Eric Anholt identified the issue when merging one of my MRs: the
variable contained words in '`' backticks, which caused them to be
executed by the bare metal runner's shell.
Quote the value printed using bash's shell expansion feature to make
sure anything in the future will be properly quoted.
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6389>
Eric Engestrom [Wed, 19 Aug 2020 14:02:44 +0000 (16:02 +0200)]
gitlab-ci: fix testing whether a variable with a given name is set or not
The previous code considered unset variables the same as set-but-empty;
sometimes setting a variable as something empty is meaningful, so let's
pass them through properly.
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6389>
Eric Engestrom [Wed, 19 Aug 2020 21:11:19 +0000 (23:11 +0200)]
docs: update calendar and link releases notes for 20.1.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6394>
Eric Engestrom [Wed, 19 Aug 2020 20:55:49 +0000 (22:55 +0200)]
docs: add release notes for 20.1.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6394>
Alejandro Piñeiro [Sat, 25 Jul 2020 22:52:17 +0000 (00:52 +0200)]
v3d/compiler: add v3dv_prog_data_size helper
Main use case is to help to implement Vulkan PipelineCache, as we are
serializing/deserializing the prog_data too.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6078>
Jason Ekstrand [Tue, 28 Jul 2020 23:01:19 +0000 (18:01 -0500)]
compiler/types: Allow interfaces in get_explicit_type_for_size_align
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6210>
Jason Ekstrand [Thu, 16 Jul 2020 01:12:33 +0000 (20:12 -0500)]
nir/large_constants: Handle incomplete derefs
This pass works entirely with variables, all we have to do is ignore any
derefs we see which we can't chase back to the variable. The one
interesting case we have to handle is if we have a complex use of a
deref_var. In that case, we have to flag it non-constant.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6210>
Jason Ekstrand [Thu, 16 Jul 2020 00:13:35 +0000 (19:13 -0500)]
nir/find_array_copies: Handle cast derefs
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6210>
Jason Ekstrand [Thu, 11 Jun 2020 22:32:11 +0000 (17:32 -0500)]
nir/builder: Add a nir_iand_imm helper
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6210>
Jason Ekstrand [Fri, 31 Jul 2020 15:36:35 +0000 (10:36 -0500)]
nir: Initialize nir_ssa_def::live_index
Previously, this was left uninitialized. Let's initialize it to an
obviously bogus value so we notice if anyone ever tries to use stale
liveness data.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6210>
Jason Ekstrand [Wed, 19 Aug 2020 17:15:23 +0000 (12:15 -0500)]
clover/nir: Use the correct address mode for shared
Shared memory needs to have 64-bit pointers but we want 32-bit offsets
most of the time. This is exactly what 32bit_offset_as_64bit is for.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
Jason Ekstrand [Wed, 19 Aug 2020 16:32:32 +0000 (11:32 -0500)]
clover/nir: Stop computing the global address format twice
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
Jason Ekstrand [Wed, 19 Aug 2020 16:30:19 +0000 (11:30 -0500)]
clover/nir: Stop setting ubo_addr_format
We unconditionally set constant_as_global = true so we should never get
UBO access out of spirv_to_nir.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
Karol Herbst [Tue, 18 Aug 2020 12:29:24 +0000 (14:29 +0200)]
nv50/ir/nir: support load_work_dim
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
Karol Herbst [Wed, 20 May 2020 15:40:28 +0000 (17:40 +0200)]
nvc0: handle nr being 0 in nvc0_set_global_bindings
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
Karol Herbst [Sat, 7 Mar 2020 15:17:48 +0000 (16:17 +0100)]
nv50/ir/nir: fix global_atomic_comp_swap
Fixes: 20d0ae464c4a ("nv50/ir: implement global atomics and handle it for nir")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
Karol Herbst [Thu, 5 Mar 2020 22:00:27 +0000 (23:00 +0100)]
clover/nir: support int64 atomics if the device supports it
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
Karol Herbst [Sat, 14 Dec 2019 18:21:11 +0000 (19:21 +0100)]
nv50/ir/nir: assert on unknown alu ops
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
Karol Herbst [Sun, 22 Apr 2018 00:01:18 +0000 (02:01 +0200)]
nve4: fix uploading unaligned sized input buffers
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
Karol Herbst [Sat, 15 Aug 2020 11:33:29 +0000 (13:33 +0200)]
clover/nir: Call vars_to_explicit_types for shared memory
This is required for shared memory buffers declared with an explicit
size inside the kernel.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
Jesse Natalie [Thu, 28 May 2020 17:24:34 +0000 (10:24 -0700)]
nir/glsl: Add glsl_get_cl_type_size_align helper
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
Eric Anholt [Fri, 14 Aug 2020 18:52:57 +0000 (11:52 -0700)]
freedreno/ir3: Fix assertion failures dumping CS high full regs.
The *2 here would bump into the *2 in regset, causing assertion failures
dumping CS programs. Just set the mergedregs flag on a6xx, and don't
duplicate the mergedregs logic. If you're dealing with new HW where we
don't know if mergedregs is set, you may need to tweak the flag during
disasm setup for the stats to make sense.
Fixes: f7bd3456d79a ("freedreno: deduplicate a3xx+ disasm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6323>
Eric Anholt [Mon, 17 Aug 2020 17:58:06 +0000 (10:58 -0700)]
freedreno/cffdec: When .mergedregs is set, don't count half regs.
This matches what ir3.c does in the mergedregs case: just count max full
reg used. This flag is unset so far, but will be soon and keeps our
output comparable between blob and freedreno.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6323>