Mike Blumenkrantz [Wed, 8 Sep 2021 18:19:11 +0000 (14:19 -0400)]
zink: add 8/16bit ubo handling
left this out of the original 8/16bit storage implementation somehow,
but it didn't matter since nothing was doing 8/16bit ubo reads
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12823>
Mike Blumenkrantz [Tue, 7 Sep 2021 22:05:02 +0000 (18:05 -0400)]
zink: clamp instance divisors to max value
better than exploding
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12756>
Mike Blumenkrantz [Tue, 31 Aug 2021 18:57:48 +0000 (14:57 -0400)]
zink: remove batch params from barrier functions
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770>
Mike Blumenkrantz [Tue, 31 Aug 2021 18:54:39 +0000 (14:54 -0400)]
zink: remove unused barrier function
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770>
Mike Blumenkrantz [Tue, 31 Aug 2021 18:54:07 +0000 (14:54 -0400)]
zink: remove batch params from resource copy functions
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770>
Mike Blumenkrantz [Tue, 31 Aug 2021 18:51:25 +0000 (14:51 -0400)]
zink: remove batch params from renderpass functions
this no longer makes sense to have
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770>
Mike Blumenkrantz [Tue, 31 Aug 2021 20:42:17 +0000 (16:42 -0400)]
zink: move resource unrefs to flush thread
unrefs here (almost always) mean destruction, which means eating the cost
of the atomics for the unrefs and then also the destructors
instead, handle this at the end of the next submit from this batch, since the
submit thread is never as busy as the driver thread
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12759>
Mike Blumenkrantz [Thu, 9 Sep 2021 01:03:49 +0000 (21:03 -0400)]
zink: ci updates
I think these should be more reliable now
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783>
Mike Blumenkrantz [Wed, 8 Sep 2021 16:42:17 +0000 (12:42 -0400)]
zink: document ZINK_DESCRIPTORS env var
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783>
Mike Blumenkrantz [Wed, 8 Sep 2021 16:37:08 +0000 (12:37 -0400)]
zink: add "nofallback" descriptor mode
this disables lazy fallback and forces caching always
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783>
Mike Blumenkrantz [Wed, 8 Sep 2021 16:19:54 +0000 (12:19 -0400)]
zink: fall back to lazy descriptors if too many cache misses in a row
in the cases where it's not useful to cache for one reason or another, stop
trying to force it and just go with the flow
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783>
Mike Blumenkrantz [Wed, 8 Sep 2021 16:14:17 +0000 (12:14 -0400)]
zink: split out lazy set updating
make this reusable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783>
Mike Blumenkrantz [Wed, 8 Sep 2021 16:13:38 +0000 (12:13 -0400)]
zink: reorganize cached descriptor updating a bit
do per-set updates in each part to stop passing around arrays
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12783>
Ella-0 [Thu, 2 Sep 2021 10:34:21 +0000 (10:34 +0000)]
ci/v3dv: Update fails with multiview failing with points
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524>
Ella-0 [Thu, 2 Sep 2021 10:30:52 +0000 (10:30 +0000)]
v3dv: Implement VK_EXT_vertex_attribute_divisor
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524>
Ella-0 [Thu, 2 Sep 2021 10:28:09 +0000 (10:28 +0000)]
v3dv: Expose correct point size granularity
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524>
Ella-0 [Thu, 2 Sep 2021 17:08:43 +0000 (17:08 +0000)]
v3d: Don't handle PIPE_SPRITE_COORD_UPPER_LEFT twice
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524>
Ella-0 [Thu, 2 Sep 2021 10:23:21 +0000 (10:23 +0000)]
v3d/compiler: Handle point_coord_upper_left
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12524>
Joshua Ashton [Fri, 10 Sep 2021 21:05:06 +0000 (22:05 +0100)]
radv: Fix DCC image store check
Doesn't seem to be causing any issues right now but could with modifiers potentially.
Matches what is in RadeonSI where the comment is also shamelessly stolen from.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12811>
Marek Olšák [Wed, 25 Aug 2021 19:47:20 +0000 (15:47 -0400)]
radeonsi: don't use NGG passthrough if culling is possible for better perf
Switching NGG passthrough on/off decreases performance because it causes
context rolls.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Sat, 21 Aug 2021 22:01:49 +0000 (18:01 -0400)]
radeonsi: add AMD_DEBUG=ib to print IBs
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Sat, 21 Aug 2021 18:21:24 +0000 (14:21 -0400)]
radeonsi: don't emit PA_SU_POLY_OFFSET_CLAMP if it has no effect
this is more efficient even
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Sat, 21 Aug 2021 18:19:32 +0000 (14:19 -0400)]
radeonsi: remove a few fields from si_state_rasterizer
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Sat, 21 Aug 2021 18:00:01 +0000 (14:00 -0400)]
radeonsi: enable shader-based prim culling with polygon mode
Polygon mode should have no effect on culling, so keep it enabled.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Thu, 19 Aug 2021 19:44:55 +0000 (15:44 -0400)]
winsys/amdgpu: include CS ioctl overhead in RADEON_NOOP
submit an empty IB instead of skipping the ioctl
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Wed, 18 Aug 2021 17:37:38 +0000 (13:37 -0400)]
radeonsi: skip setting some PGM_HI registers by switching to 32-bit addresses
Other registers benefit from consecutive register offsets for the smallest
command buffer size.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Wed, 18 Aug 2021 15:12:30 +0000 (11:12 -0400)]
radeonsi: strengthen the VGT_FLUSH condition in begin_new_gfx_cs
Cc: mesa-stable
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Wed, 18 Aug 2021 15:14:26 +0000 (11:14 -0400)]
radeonsi: reduce the frequency of switching GS fast launch on/off
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Wed, 11 Aug 2021 16:23:05 +0000 (12:23 -0400)]
winsys/amdgpu: precompute amdgpu_ib_max_submit_dwords
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Wed, 11 Aug 2021 17:31:19 +0000 (13:31 -0400)]
radeonsi: remove the primitive discard compute shader
It doesn't always work, it's only useful on gfx9 and older, and it's too
complicated.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4011
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Tue, 10 Aug 2021 23:39:04 +0000 (19:39 -0400)]
radeonsi: correct index_bias_varies usage
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Tue, 10 Aug 2021 09:09:41 +0000 (05:09 -0400)]
radeonsi: don't update shaders if only the vertex element count changes
Only check if the relevant fields changed.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Tue, 10 Aug 2021 09:08:23 +0000 (05:08 -0400)]
radeonsi: accurately check if instance divisors need a VS update
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Tue, 10 Aug 2021 08:55:08 +0000 (04:55 -0400)]
radeonsi: ignore the vertex element count in si_shader_selector_key_vs
It's always at least num_inputs, so just use num_inputs.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Marek Olšák [Tue, 10 Aug 2021 08:35:04 +0000 (04:35 -0400)]
radeonsi: don't set prefer_mono for fetched instance divisors
It's not necessary because the overhead is very low and the comment isn't
true anymore. (the divisions are fast now)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12812>
Icecream95 [Mon, 6 Sep 2021 08:10:56 +0000 (20:10 +1200)]
lima: Add a noop drm-shim
Hard-code Mali450 with six cores for now, matching the hardware I
have.
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12737>
Daniel Schürmann [Thu, 2 Sep 2021 13:42:56 +0000 (15:42 +0200)]
aco/ra: Fix potential out-of-bounds array accesses.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12748>
Timur Kristóf [Tue, 7 Sep 2021 11:41:22 +0000 (13:41 +0200)]
aco: Add some useful info to the README for debugging.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12748>
Michel Dänzer [Thu, 9 Sep 2021 10:26:39 +0000 (12:26 +0200)]
ci: Put all container related jobs in a single stage
GitLab 14.2 supports dependencies between jobs in the same stage.
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12790>
Tomeu Vizoso [Mon, 6 Sep 2021 07:02:11 +0000 (09:02 +0200)]
ci: Stop adding link to tracie dashboard
Besides the sed being broken for some trace names, now we have all
needed information in the artifacts so the dashboard isn't needed.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12675>
Tomeu Vizoso [Wed, 1 Sep 2021 14:08:10 +0000 (16:08 +0200)]
ci: Uprev piglit to
99be1b06ff36
Brings in these changes:
99be1b06ff36 framework/replay: Display the image differences if any
3074b9c72b3d glsl-predication-on-large-array: Test predication on values from large array
c97da22d35b4 cmake: Fix gbm test compiling
0cbccd68c3c1 piglit: Find our data directory when we're invoked through a symlink
4eb71fc10bbe arb_sso: add test that has explicit locations and array fields in ifc
fa9c82380273 glsl-1.30: test shadow var in a switch
aa7f042b0417 glsl-1.30: add tests for incorrect "compare to 0" optimizations
60138ef32ec1 add explicit tests for GetFragDataLocation/Index(gl_Frag*)
4a8806696b90 egl: add test for EGL_KHR_display_reference
d6b7053b4e52 glsl-1.30: test that switch expression is evaluated once
8023a3c945c3 arb_shader_storage_buffer_object: Require extension on the new test
8820cac60827 pbobench: Fix sometimes-uninitialized warning.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12675>
Guilherme Gallo [Fri, 10 Sep 2021 15:58:27 +0000 (12:58 -0300)]
gitlab-ci: Implement a simple timeout detection for LAVA jobs
* Retry twice if the job does not generates logs for 5 minutes.
* Only active the timeout detection when the job starts.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12808>
Guilherme Gallo [Sat, 4 Sep 2021 00:59:12 +0000 (21:59 -0300)]
gitlab-ci: Add sleep for every `scheduler.jobs.logs` call
Add a time.sleep call between proxy.scheduler.jobs.logs calls, since
they do not block. This will relieve some request pressure on LAVA
dispatchers.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12797>
Danylo Piliaiev [Fri, 16 Jul 2021 15:52:31 +0000 (18:52 +0300)]
turnip: support tracing of gmem/sysmem load/store/clears
Now we support per-tile tracing.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969>
Danylo Piliaiev [Fri, 16 Jul 2021 13:30:22 +0000 (16:30 +0300)]
u_trace: pass command stream through tracing functions
Allows writing timestamps into different command streams.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969>
Danylo Piliaiev [Mon, 7 Jun 2021 10:16:25 +0000 (13:16 +0300)]
turnip/perfetto: reusable command buffers support
The limitation is that the reusable command buffer should be created
when perfetto is already connected in order to write timestamps.
Otherwise such cmd buffer won't be traces.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969>
Danylo Piliaiev [Fri, 16 Jul 2021 12:01:20 +0000 (15:01 +0300)]
u_trace: helpers for tracing tiling GPUs and re-usable VK cmdbuffers
Re-usable command buffer could be resubmitted any number of times,
but tracepoints are written once. u_trace_clone_append allows
copying tracepoints and copying timestamps if GPU doesn't support
writing timestamps into indirect address.
The case of tiling GPUs is similar, command stream for draws is
resubmitted for each tile.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969>
Danylo Piliaiev [Mon, 24 May 2021 16:54:47 +0000 (19:54 +0300)]
turnip: implement basic perfetto support
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969>
Danylo Piliaiev [Tue, 25 May 2021 15:16:07 +0000 (18:16 +0300)]
util/u_trace: auto-generation of serialization funcs for tracepoints
Add ability to auto-generate:
- printing of args for "GPU_TRACE=1", still could be overriden with
tp_print.
- population of extra data for perfetto event.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969>
Danylo Piliaiev [Mon, 24 May 2021 09:11:46 +0000 (12:11 +0300)]
util/u_trace: make u_trace usable for other than gallium drivers
With little modifications u_trace could be usable for Vulkan drivers.
Beside removing dependencies on gallium, the other notable change is
the passing of opaque flush_data pointer via u_trace_flush. There
is data which becomes available only at this point which other drivers
may want to pass.
For example Vulkan drivers would want to pass at least submission id
(for perfetto) and a sync object to wait on in u_trace_read_ts.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10969>
Connor Abbott [Thu, 9 Sep 2021 12:16:08 +0000 (14:16 +0200)]
ir3: Add bar to beginning of HS with tess_use_shared
This matches the blob. In theory, this is necessary only because the
VS/HS workgroup can now span more than one wave and a patch may be
assigned to different waves in the VS and HS. However I've seen it fix
tests where the entire draw should fit in one wave, so there may some
other sort of waiting this does or the HW dispatch may be inefficient
sometimes.
Fixes
EQP-VK.tessellation.user_defined_io.per_patch.vertex_io_array_size_implicit.*
when run immediately after
dEQP-VK.tessellation.invariance.outer_triangle_set.quads_fractional_even_spacing
or when all of dEQP-VK.tessellation.* is run in sequence on a650.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12791>
Boris Brezillon [Mon, 6 Sep 2021 14:29:48 +0000 (16:29 +0200)]
panvk: Disable the BO cache
This makes it easier to debug memory leaks, and we probably want to
rely on vulkan caches anyway, so let's just disable the BO cache.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Mon, 6 Sep 2021 14:27:21 +0000 (16:27 +0200)]
panvk: Only set PAN_DBG_TRACE if PANVK_DEBUG_TRACE is set
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Mon, 6 Sep 2021 14:23:08 +0000 (16:23 +0200)]
panvk: Don't take a BO reference when binding memory to an image
Memory is never unbound, and vulkan mandates that the memory stays around
for the image lifetime, unless another chunk of memory is bound to this
image. Let's keep things simple and don't take a reference on the BO
we bind to an image, this way, the memory gets released as soon as
vkFreeMemory() is called.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Mon, 6 Sep 2021 14:18:45 +0000 (16:18 +0200)]
panvk: Initialize clear values to zero when load_op != OP_CLEAR
This is easier to detect when something goes wrong with this default
initialization in place.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Mon, 6 Sep 2021 14:16:51 +0000 (16:16 +0200)]
panvk: Fix a BO leak in panvk_pool_alloc_backing()
When picking a BO from a BO pool, we need to add it to the memory pool
otherwise it gets lost when the memory pool is reset/destroyed.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Mon, 6 Sep 2021 14:14:37 +0000 (16:14 +0200)]
panvk: Reset panvk_pool->transient_bo in panvk_pool_reset()
Fixes a use-after-free issue.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Mon, 6 Sep 2021 14:12:08 +0000 (16:12 +0200)]
panvk: Close the panfrost device in the panvk_physical_device_init() error path
Otherwise some resources stay around.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Mon, 6 Sep 2021 14:10:41 +0000 (16:10 +0200)]
panvk: Don't allocate an array of blend constants
Those are shared by all render targets.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Mon, 6 Sep 2021 13:35:17 +0000 (15:35 +0200)]
panvk: Clamp blend constants before copying them to the cmdbuf state
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Mon, 6 Sep 2021 10:16:41 +0000 (12:16 +0200)]
panvk: Narrow the allow-forward-pixel-kill condition
Setting it to info->fs.can_fpk is wrong. Let's mimic the gallium driver
here.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Mon, 6 Sep 2021 10:13:34 +0000 (12:13 +0200)]
panvk: Fix chan_size calculation in panvk_emit_blend()
Only the first channel was taken into account.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Tue, 7 Sep 2021 12:20:37 +0000 (14:20 +0200)]
panvk: Don't advertise min/max filter
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Fri, 3 Sep 2021 10:06:01 +0000 (12:06 +0200)]
panvk: We don't support linear filtering on integer formats
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Fri, 3 Sep 2021 15:00:53 +0000 (17:00 +0200)]
panvk: Only advertise MSAA-4
We'll see if we want to support MSAA 8 and 16 later. MSAA 2 is not
supported.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Mon, 30 Aug 2021 08:37:47 +0000 (10:37 +0200)]
panvk: Fix blend descriptor emission
Got the round_to_fb_precision wrong when rebasing the the per-gen XML
changes. Fix it now.
Fixes:
792a0ab0b146 ("panvk: Prepare per-gen split")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Boris Brezillon [Tue, 7 Sep 2021 11:18:26 +0000 (13:18 +0200)]
panvk: Don't use pan_is_bifrost()
Leftovers from the per-gen XML transition patch.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
Juan A. Suarez Romero [Wed, 8 Sep 2021 08:04:45 +0000 (10:04 +0200)]
broadcom/compiler: force a last thrsw for spilling
As we don't know if we are going to have spilling or not, emit always a
last thrsw at the end of the shader.
If later we don't have spillings and we don't need that last thrsw, we
remove it and switch back to the previous one.
This way we ensure all the spilling happens always before the last
thrsw.
v2 (Juan):
- Rework the code to force a last thrsw and remove later if no spilling
v3:
- Merge functionality inside vir_emit_last_thrsw (Iago)
- Add vir_restore_last_thrsw (Juan)
v4 (Iago):
- Fix/add new comments
- Rename variables/parameters
v5 (Iago):
- Fix comments
- Add assertion
Cc: mesa-stable
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4760
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12322>
Juan A. Suarez Romero [Wed, 8 Sep 2021 08:02:26 +0000 (10:02 +0200)]
broadcom: make vir_emit_last_thrsw() private
This function is only used in v3d_nir_to_vir(), so make it private.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12322>
Ilia Mirkin [Thu, 9 Sep 2021 01:39:56 +0000 (21:39 -0400)]
a4xx/computerator: add initial backend
This backend provides very basic a4xx support. It's enough to run
kernels with explicit stg/etc ops, but not with stgb/ldgb type access.
There is no perfcounter support hooked up yet either.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12784>
Ilia Mirkin [Thu, 9 Sep 2021 01:37:06 +0000 (21:37 -0400)]
a4xx: add some better documentation for compute registers
These were driven by seeing 0x1c (and other) values set by blob, as well
as comparing to equivalent a3xx documentation.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12784>
Sagar Ghuge [Tue, 31 Aug 2021 02:00:50 +0000 (19:00 -0700)]
anv: No need to lower to A64 messages for 64-bit atomics
With LSC support, we can do 64-bit atomics with A32/64 messages.
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12566>
Sagar Ghuge [Tue, 31 Aug 2021 01:59:51 +0000 (18:59 -0700)]
intel/compiler: Add support to handle 64-bit atomics with A32 messages
v1: (Jason)
- Fix parentheses
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12566>
Sagar Ghuge [Thu, 26 Aug 2021 17:19:59 +0000 (10:19 -0700)]
anv: Advertise support for shaderBufferFloat64AtomicMinMax
v1:
- Just check has_lsc (Jason)
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12566>
Sagar Ghuge [Thu, 26 Aug 2021 17:13:34 +0000 (10:13 -0700)]
intel/compiler: Add 64-bit A64 float logical opcode support
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12566>
Jason Ekstrand [Wed, 25 Aug 2021 20:00:51 +0000 (13:00 -0700)]
anv: Advertise support for shaderBufferFloat32AtomicAdd
Rework: (Sagar)
- Enable shaderBufferFloat32AtomicAdd for XeHPG
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12566>
Jason Ekstrand [Tue, 26 May 2020 20:28:56 +0000 (15:28 -0500)]
intel/fs: Add support for atomic_fadd
Rework:
- Enable float32 atomic add with LSC (Sagar)
- disassemble new opcode (Caio)
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12566>
Emma Anholt [Wed, 8 Sep 2021 22:14:47 +0000 (15:14 -0700)]
nir_to_tgsi: Allow SSA defs to include swizzles, abs, and neg.
This will let some copy prop happen automatically, avoiding MOVs to temps.
Most importantly, though, it means that virgl won't see (unused channel)
swizzles from channels beyond the bounds of sysvals, which trigger shader
compile failures on the host.
softpipe shader-db:
total instructions in shared programs: 2946336 -> 2934777 (-0.39%)
instructions in affected programs: 374676 -> 363117 (-3.09%)
total temps in shared programs: 565552 -> 564139 (-0.25%)
temps in affected programs: 18138 -> 16725 (-7.79%)
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12781>
Emma Anholt [Wed, 8 Sep 2021 00:18:46 +0000 (17:18 -0700)]
nir_to_tgsi: Switch ssa_temp[] to be a ureg_src.
After ntt_store_def(), all uses want it to be a ureg_src. This will let
us fold abs/neg/swizzles in.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12781>
Emma Anholt [Wed, 8 Sep 2021 00:16:58 +0000 (17:16 -0700)]
nir_to_tgsi: Clean up some unnecessary pointers-to-uregs.
This was used at one point to do ntt_store_def() or something I think.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12781>
Emma Anholt [Wed, 4 Aug 2021 22:48:45 +0000 (15:48 -0700)]
nir_to_tgsi: Add support for memory_barrier_tcs_patch.
glsl_to_tgsi translated both cases of ir_barrier to TGSI's BARRIER, so map
both of glsl_to_nir's ir_barrier outputs to the same.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12781>
Emma Anholt [Wed, 8 Sep 2021 22:17:23 +0000 (15:17 -0700)]
nir_to_tgsi: Don't forget to add sampler views with our samplers.
While softpipe and i915 didn't really care, virgl very much does.
tgsi_scan also insisted that the texture ops and the decls matched, which
led to deduplicating the switch statemnts.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12781>
Emma Anholt [Mon, 2 Aug 2021 23:34:37 +0000 (16:34 -0700)]
nir_to_tgsi: Fix indirect addressing of atomic counters.
It's not actually a given that the offset within the counter buffer is a
constant.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12781>
Bas Nieuwenhuizen [Sat, 4 Sep 2021 12:27:58 +0000 (14:27 +0200)]
nir: Avoid visiting instructions multiple times in nir_instr_free_and_dce.
Sadly need to poke a bit in the src internals to avoid using yet another
heap allocated datastructure.
Fixes:
52515485723 ("nir: Add a nir_instr_remove that recursively removes dead code.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5323
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12726>
Chia-I Wu [Fri, 3 Sep 2021 21:29:30 +0000 (14:29 -0700)]
venus: separate physical device init and filter
It is not an error when a physical device is filtered out. But it is an
error when a physical device fails to initialize.
Fixed
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.
v2: separate success and fail paths
Fixes:
7dfac808 ("venus: no supported device is not an error")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> (v1)
Reviewed-by: Ryan Neph <ryanneph@google.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12723>
Chia-I Wu [Fri, 3 Sep 2021 21:13:02 +0000 (14:13 -0700)]
venus: refactor vn_instance_enumerate_physical_devices
Move device enumeration to a new function.
v2: separate success and fail paths, rename functions
(suggested by Ryan)
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> (v1)
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12723>
Mike Blumenkrantz [Wed, 25 Aug 2021 16:54:46 +0000 (12:54 -0400)]
aux/trace: use private refcounts for samplerviews
this avoids having the driver bypass the samplerview wrapper and destroying
the samplerview prematurely, e.g., spec@sgis_generate_mipmap@gen-texsubimage
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12546>
Roland Scheidegger [Fri, 6 Aug 2021 22:22:25 +0000 (00:22 +0200)]
lavapipe: implement VK_EXT_depth_clip_enable
v2: fix pipeline creation, need a deep copy for rasterization state now
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12260>
Roland Scheidegger [Fri, 6 Aug 2021 22:20:59 +0000 (00:20 +0200)]
gallium: add rasterizer depth_clamp enable bit
This is required for d3d10+, which has depth_clamp always enabled
regardless of depth_clip (in contrast to OpenGL, where enabling
depth_clamp disables depth_clip). There doesn't seem to be a GL
extension for it, but it will be used for lavapipe to implement
VK_EXT_depth_clip_enable.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12260>
Mike Blumenkrantz [Tue, 31 Aug 2021 20:41:12 +0000 (16:41 -0400)]
mesa: skip fallback draw call if no primitives are being drawn
../src/mesa/main/draw.c: In function ‘_mesa_draw_gallium_fallback’:
../src/mesa/main/draw.c:1056:4: warning: ‘prim’ may be used uninitialized [-Wmaybe-uninitialized]
1056 | ctx->Driver.Draw(ctx, prim, num_prims, index_size ? &ib : NULL,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1057 | index_bounds_valid, info->primitive_restart,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1058 | info->restart_index, min_index, max_index,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1059 | info->instance_count, info->start_instance);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12766>
Juan A. Suarez Romero [Wed, 8 Sep 2021 11:29:04 +0000 (13:29 +0200)]
mesa: fix default texture buffer format
According to ARB_tbo spec, default format is LUMINANCE8, but according
to core spec, it is R8.
This fixes piglit's spec@arb_texture_buffer_object@get test with drivers
supporting ARB_tbo spec but OpenGL/ES < 3.1.
v2:
- Compare against compat profile (Ilia)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12774>
Pierre-Eric Pelloux-Prayer [Tue, 7 Sep 2021 11:29:39 +0000 (13:29 +0200)]
vbo/dlist: fix indentation in vbo_save_api.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646>
Pierre-Eric Pelloux-Prayer [Wed, 1 Sep 2021 09:28:49 +0000 (11:28 +0200)]
vbo/dlist: rework vertex_store management
Simplify the whole thing:
- keep a single function (grow_vertex_storage) that extends the array
- call it when the array is full (in ATTR_UNION) or at the beginning of
a primitive when the vertex count is known to avoid multiple reallocations.
- allocate save->vertex_store in vbo_save_NewList if needed
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646>
Pierre-Eric Pelloux-Prayer [Wed, 1 Sep 2021 08:29:32 +0000 (10:29 +0200)]
vbo/dlist: rework primitive store handling
Simplify the logic by simply growing the primitive array when needed and
remove remove the call to compile_vertex_list in _save_End if the
array is full (it'll be resized later if needed instead).
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646>
Pierre-Eric Pelloux-Prayer [Fri, 13 Aug 2021 15:39:30 +0000 (17:39 +0200)]
vbo/dlist: rework buffer sizes
Use 20Mb as the default bo size and use the same limit when
allocating the CPU buffers in realloc_storage.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646>
Pierre-Eric Pelloux-Prayer [Tue, 31 Aug 2021 08:10:14 +0000 (10:10 +0200)]
vbo/dlist: remove unused functions
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646>
Pierre-Eric Pelloux-Prayer [Fri, 13 Aug 2021 14:16:32 +0000 (16:16 +0200)]
vbo/dlist: add documentation
Add a bit of documentation to describe the logic of vbo_save_api.
while at it improve the packing of vbo_save_context.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646>
Pierre-Eric Pelloux-Prayer [Fri, 13 Aug 2021 13:39:17 +0000 (15:39 +0200)]
vbo/dlist: remove vbo_save_context::vert_count
The same property can be deduced directly from the vertex_store,
so remove this one to avoid sync problems between the two and
simplify the code.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646>
Pierre-Eric Pelloux-Prayer [Fri, 13 Aug 2021 10:17:35 +0000 (12:17 +0200)]
vbo/dlist: remove vbo_save_copied_vtx
The copy_vertices() function is rarely called and removing
this decreases vbo_save_context's size by 20kb.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646>
Pierre-Eric Pelloux-Prayer [Fri, 13 Aug 2021 15:11:51 +0000 (17:11 +0200)]
vbo/dlist: fix max_index_count value
We just need an upper bound anyway.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646>