Mauro Rossi [Mon, 10 Aug 2020 13:01:30 +0000 (15:01 +0200)]
android: panfrost: Rename encoder/ to lib/
Fixes the following building errors:
target C: libpanfrost_encoder <= external/mesa/src/panfrost/encoder/pan_attributes.c
...
clang: error: no such file or directory: 'external/mesa/src/panfrost/encoder/pan_attributes.c'
clang: error: no input files
target C: libpanfrost_encoder <= external/mesa/src/panfrost/encoder/pan_afbc.c
...
clang: error: no such file or directory: 'external/mesa/src/panfrost/encoder/pan_afbc.c'
clang: error: no input files
Fixes: 1c62b5528 ("panfrost: Rename encoder/ to lib/")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6261>
Rhys Perry [Thu, 6 Aug 2020 13:16:08 +0000 (14:16 +0100)]
aco: set constant_data_offset correctly in the case of merged shaders
setup_nir() is done for all shaders before any of them are selected, so
constant_data_offset could be incorrect for the first shader.
Fixes incorrect geometry in Mafia III and Max Payne 3.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2768
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6205>
Thong Thai [Sun, 9 Aug 2020 15:13:57 +0000 (11:13 -0400)]
radeon/vcn: fix jpeg decode for navi10
Fixes an issue where the JPEG decode would timeout when decoding certain JPEG files.
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6249>
Bas Nieuwenhuizen [Thu, 30 Jul 2020 10:21:01 +0000 (12:21 +0200)]
radv: Do not consider layouts fast-clearable on compute queue.
We cannot decompress from the compute queue. While I'm pretty sure
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL is only useful on the
graphics queue, I cannot find a VU that prevents the transition
from happening on another queue, so we need to be careful here.
This patch ensures we do the decompression on the barrier that changes
the queue ownership.
Another problem was that DCC images were considered fast-clearable
when not DCC compressed, which resulted in a mess with concurrent
queue ownership.
Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3387
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6252>
Bas Nieuwenhuizen [Sun, 9 Aug 2020 22:10:38 +0000 (00:10 +0200)]
radv: Add forcecompress debug flag.
Enables DCC/HTILE/CMASK/FMASK when supported, not just when we think
it is beneficial.
This is helpful to detect compression bugs with CTS.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6252>
Marcin Ślusarz [Wed, 10 Jun 2020 13:58:59 +0000 (15:58 +0200)]
intel/perf: export performance counters sorted by [group|set] and name
It's a lot easier to deal with them in RenderDoc when they are
in some meaningful order.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788>
Marcin Ślusarz [Thu, 9 Jul 2020 17:49:55 +0000 (19:49 +0200)]
intel/perf: split load_oa_metrics
Move oa_metrics_available out of load_oa_metrics and call
build_unique_counter_list outside.
This change is a preparation for the next patch. It should
not have any functional impact.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788>
Marcin Ślusarz [Fri, 10 Jul 2020 17:25:10 +0000 (19:25 +0200)]
intel/perf: fix performance counters availability after glFinish
Currently Linux kernel gathers performance counters at fixed
intervals (~5-10ms), so if application uses AMD_performance_monitor
extension and immediately after glFinish() asks GL driver for HW
performance counter values it might not get any data (values == 0).
Fix this by moving the "read counters from kernel" code from
"is query ready" to "get counter values" callback with a loop around
it. Unfortunately it means that the "read counters from kernel"
code can spin for up to 10ms.
Ideally kernel should gather performance counters whenever we ask
it for counter values, but for now we have deal with what we have.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788>
Marcin Ślusarz [Fri, 10 Jul 2020 14:24:31 +0000 (16:24 +0200)]
intel/perf: streamline error handling in read_oa_samples_until
No functional changes.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788>
Marcin Ślusarz [Thu, 9 Jul 2020 18:54:41 +0000 (20:54 +0200)]
intel/perf: fix how pipeline stats are stored
It matters only when counters are not ordered by offset.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788>
Marcin Ślusarz [Wed, 10 Jun 2020 13:29:53 +0000 (15:29 +0200)]
intel/perf: fix calculation of used counter space
It matters only when counters are not ordered by offset.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5788>
Samuel Pitoiset [Fri, 7 Aug 2020 15:18:41 +0000 (17:18 +0200)]
radv: report a better error message when QueueWaitIdle() failed
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6230>
Samuel Pitoiset [Fri, 7 Aug 2020 14:21:31 +0000 (16:21 +0200)]
radv: report errors back to the application via VK_EXT_debug_report
Help for debugging.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6230>
Samuel Pitoiset [Fri, 7 Aug 2020 14:05:46 +0000 (16:05 +0200)]
radv: rework the error function helpers a bit
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6230>
Samuel Pitoiset [Fri, 7 Aug 2020 13:23:03 +0000 (15:23 +0200)]
radv: report the spirv-nir logs back to the application
Via VK_EXT_debug_report to help debugging various SPIRV->NIR issues.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6223>
Bas Nieuwenhuizen [Fri, 7 Aug 2020 18:29:07 +0000 (20:29 +0200)]
radv: Fix assert that is too strict.
The added assert fails on MSAA images if we disable FMASK ....
Reordered things.
Fixes: c6aadbae715 "radv: Don't use both DCC and CMASK for single sample images."
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3385
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6232>
Louis Li [Tue, 31 Mar 2020 02:20:21 +0000 (10:20 +0800)]
radeon/radeon_vce: fix out of target bitrate in CBR mode (H.264)
StoneyRidge may not comply to required target bitrate
when generating H.264 stream in CBR mode.
Signed-off-by: Louis Li <Ching-shih.Li@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4384>
Gert Wollny [Sun, 5 Jul 2020 14:56:37 +0000 (16:56 +0200)]
r600: Enable compute shaders for NIR code path
There are still regessions compared to TGSI, but there are also many
fixes.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
Gert Wollny [Wed, 20 May 2020 22:03:34 +0000 (00:03 +0200)]
r600/sfn: Force a minimum of 4 GPRs, it seems to fix atomics
This fixes spec@arb_compute_shader@execution@atomic-counter on
HD 5450
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
Gert Wollny [Tue, 21 Jul 2020 09:57:52 +0000 (11:57 +0200)]
r600/sfn: handle querying SSBO size
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
Gert Wollny [Tue, 21 Jul 2020 10:00:00 +0000 (12:00 +0200)]
r600/sfn: Correct ssbo instruction handling
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
Gert Wollny [Tue, 21 Jul 2020 09:56:51 +0000 (11:56 +0200)]
r600/sfn: correct allocating and emitting of atomics
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
Gert Wollny [Tue, 21 Jul 2020 09:52:41 +0000 (11:52 +0200)]
r600/sfn: Add a mapping table for atomics
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
Gert Wollny [Tue, 21 Jul 2020 09:50:38 +0000 (11:50 +0200)]
r600/sfn: add r600 specific lowering pass for atomics and use it
v2: rebase to use global variable lists
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
Gert Wollny [Tue, 21 Jul 2020 09:43:08 +0000 (11:43 +0200)]
r600/sfn: Sort uniforms by binding and offset
This is required to get atomics right.
v2: rebase to use global variable lists
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
Gert Wollny [Tue, 21 Jul 2020 11:39:11 +0000 (13:39 +0200)]
r600: Set PIPE_CAP_NIR_ATOMICS_AS_DEREF to true
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
Gert Wollny [Sat, 27 Jun 2020 20:40:56 +0000 (22:40 +0200)]
gallium + mesa/st: Add PIPE_CAP_NIR_ATOMICS_AS_DEREF and use it
This cap is useful for drivers that support hardware atomics and need
special handling to resolve their addresses.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
Eric Engestrom [Thu, 9 Jan 2020 15:10:53 +0000 (15:10 +0000)]
meson: bump required glvnd version
https://github.com/KhronosGroup/EGL-Registry/pull/95 has moved
a couple of extensions defines and functions to the upstream `eglext.h`,
but when
9a74746bd1f3bd28d4c4 sync'ed these files we broke compilation
of apps that require these symbols on systems that don't have the
updated Khronos headers.
On non-GLVND builds, we still provide these headers, so everything's
fine, but on GLVND builds the Khronos headers are external so we need to
make sure we have a libglvnd version that's recent enough.
Fixes: 9a74746bd1f3bd28d4c4 ("EGL: sync headers with Khronos")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6069>
Eric Engestrom [Thu, 6 Aug 2020 14:05:51 +0000 (16:05 +0200)]
driconf: fix force_gl_vendor description
The option is not a toggle to "allow GPU vendor to be overridden", it
*is* the override.
Fixes: dca119f12c291d7665d7 ("mesa/gallium: add dric option to allow overriding GL vendor string")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6207>
Eric Engestrom [Fri, 3 Apr 2020 10:29:04 +0000 (12:29 +0200)]
egl/entrypoint-check: add check that GLVND and plain EGL have the same entrypoints
Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4448>
Eric Engestrom [Fri, 3 Apr 2020 10:23:27 +0000 (12:23 +0200)]
egl/entrypoint-check: split sort-check into a function
Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4448>
Felix Yan [Sat, 8 Aug 2020 05:35:35 +0000 (05:35 +0000)]
Correct a typo in threads_win32.h
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6238>
Eric Engestrom [Wed, 29 Jul 2020 11:27:51 +0000 (13:27 +0200)]
pick-ui: specify git commands in "resolve cherry pick" message
Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6134>
Joshua Ashton [Sat, 8 Aug 2020 06:24:56 +0000 (07:24 +0100)]
zink: Fix 32-bit compilation
`sizeof(void*) != sizeof(VkShaderModule)` on x86 hence this fails with `-Werror=int-conversion`
Fixes: 0f059d550bd "zink: split up creating zink_shader objects and VkShaderModule objects"
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6239>
Timothy Arceri [Thu, 6 Aug 2020 04:25:42 +0000 (14:25 +1000)]
i965: add support for force_gl_vendor
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3363
Reviewed-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6198>
Rob Clark [Fri, 7 Aug 2020 23:14:38 +0000 (16:14 -0700)]
freedreno/ir3: don't install ir3_compiler cmdline tool
It is mostly just useful to us.. and it is big since it links in nir and
most of the rest of gallium.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6234>
Rob Clark [Fri, 7 Aug 2020 23:04:22 +0000 (16:04 -0700)]
freedreno/registers: add some missing regs to build
Needed for installed version of crashdec/cffdump.
Fixes: 9c33c538981 ("freedreno/registers: install gzip'd register database")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6234>
Dylan Baker [Fri, 7 Aug 2020 16:14:03 +0000 (09:14 -0700)]
meson/freedreno: Fix lua requirement
Freedreno needs at least Lua 5.2, but the current code will report found
for 5.1, which doesn't actually work.
Fixes: caa107cb8db930bc59cd557a325a6a0bc4a86565
("freedreno/decode: move dependencies up a level")
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6229>
Marek Olšák [Thu, 30 Jul 2020 09:27:47 +0000 (05:27 -0400)]
radeonsi: various fixes for gfx10.3
The magic numbers fix sample shading.
The bypass flag is optional.
Fixes: a23802bcb9a - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>
Marek Olšák [Thu, 30 Jul 2020 12:32:15 +0000 (08:32 -0400)]
radeonsi: remove the NGG hack decreasing LDS usage to deal with overflows
The LDS size can't overflow anymore, so we can use the correct max LDS size.
Fixes: a23802bcb9a - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>
Marek Olšák [Thu, 30 Jul 2020 12:31:22 +0000 (08:31 -0400)]
radeonsi: add a common function for getting the size of gs_ngg_scratch
The next commit will use it.
Fixes: a23802bcb9a - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>
Marek Olšák [Thu, 30 Jul 2020 12:19:48 +0000 (08:19 -0400)]
radeonsi: don't count unusable vertices to the NGG LDS size
Now we get optimal LDS usage.
Fixes: a23802bcb9a - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>
Marek Olšák [Thu, 30 Jul 2020 12:19:48 +0000 (08:19 -0400)]
radeonsi: fix applying the NGG minimum vertex count requirement
The code applied the restriction too late, which could overflow LDS size,
which started happening more often after the minimum vertex count was
increased for Sienna.
Incorporate the clamping into the previous code for rounding up the counts.
Now the LDS size can never overflow, but it may use vector lanes less
efficiently (max_gsprims can be decreased more), which will be addressed
in the next commit.
Fixes: 4ecc39e1aa1 ("radeonsi/gfx10: NGG geometry shader PM4 and upload")
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>
Marek Olšák [Wed, 29 Jul 2020 23:04:38 +0000 (19:04 -0400)]
radeonsi: increase minimum NGG vertex count requirement per workgroup on gfx 10.3
Fixes: a23802bcb9a - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>
Marek Olšák [Thu, 30 Jul 2020 12:04:28 +0000 (08:04 -0400)]
radeonsi: use the same units for esgs_ring_size and ngg_emit_size
for consistency
Fixes: a23802bcb9a - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>
Marek Olšák [Thu, 30 Jul 2020 11:47:42 +0000 (07:47 -0400)]
radeonsi: use correct wave size in gfx10_ngg_calculate_subgroup_info
Fixes: 88efb63cafc ("radeonsi/gfx10: implement Wave32")
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>
Marek Olšák [Wed, 29 Jul 2020 23:06:44 +0000 (19:06 -0400)]
Revert "radeonsi: honor a user-specified pitch on gfx10.3"
This reverts commit
c4b5fd9ab096a0bb5106b93191b13c81cc32243b.
It breaks mipmapping. This is only meant to be used by OpenCL, which allows
setting a user pitch for linear images. In all other cases, don't support
a custom pitch.
Fixes: c4b5fd9ab096a0bb51 "radeonsi: honor a user-specified pitch on gfx10.3"
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>
Marek Olšák [Thu, 30 Jul 2020 01:43:04 +0000 (21:43 -0400)]
ac/gpu_info: set num_tiles_pipes on gfx10+ too
Based on PAL.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>
Marek Olšák [Wed, 5 Aug 2020 17:12:06 +0000 (13:12 -0400)]
radeonsi: enable ETC2 hw acceleration on Raven2
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6213>
Antonio Caggiano [Fri, 24 Jul 2020 14:50:15 +0000 (16:50 +0200)]
zink: pre-hash gfx-pipeline-state
Store a hash in `zink_gfx_pipeline_state` to keep track of state
changes and avoid to recompute it when the state has not changed.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6061>
Mike Blumenkrantz [Tue, 30 Jun 2020 17:01:09 +0000 (13:01 -0400)]
zink: rename zink_gfx_program::stages to 'modules'
we've been confusing 'stages' and 'shaders' over and over for a long time,
so maybe having a totally different name will help here
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970>
Mike Blumenkrantz [Tue, 30 Jun 2020 13:59:57 +0000 (09:59 -0400)]
zink: always compile shaders in pipeline order
in order to accurately perform slot/location mapping that's consistent across
stages, we need to go through the stages in order so that we can pass each successive
slot map allocation along to the next compiled stage
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970>
Mike Blumenkrantz [Tue, 30 Jun 2020 13:57:19 +0000 (09:57 -0400)]
zink: start using per-stage flags for new shaders, refcount shader modules
we don't want to recompile shaders if we don't have to, so we can set bitflags
upon receiving new shader states and then compile only the stages that have
changed while refcounting the unchanged stages
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970>
Mike Blumenkrantz [Tue, 30 Jun 2020 12:55:07 +0000 (08:55 -0400)]
zink: use ZINK_SHADER_COUNT instead of PIPE_SHADER_TYPES - 1 everywhere
this is just for convenience and consistency
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970>
Mike Blumenkrantz [Sat, 13 Jun 2020 16:54:36 +0000 (12:54 -0400)]
zink: split up creating zink_shader objects and VkShaderModule objects
the actual VkShaderModule is only needed when we're creating a program to
draw with, so this can be split off for "uncompiled" and "compiled" shader
objects which will facilitate implementing shader keys
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970>
Mike Blumenkrantz [Sat, 13 Jun 2020 19:53:29 +0000 (15:53 -0400)]
zink: refcount zink_gfx_program objects
now that we're tracking these by shader, we want to ensure that they live through
each render pass successfully if there's no flush regardless of the timing when the
shader objects are destroyed. this becomes useful when we split up shader create and compile
functionality in future patches, at which point program refcounts can be changed
during successive draw calls, potentially resulting in a program being destroyed at that
point when it shouldn't be
with this patch, each shader used by the program gets a reference, with the renderpass
batch itself becoming the owner of the program such that it will be deleted
when the draw state gets invalidated and a new program is created
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970>
Mike Blumenkrantz [Sat, 13 Jun 2020 15:39:00 +0000 (11:39 -0400)]
zink: adjust zink_shader struct to contain full streamout info
move remapped register_index -> slot into a separate value on the struct
in order to preserve the register_index value
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970>
Mike Blumenkrantz [Sat, 13 Jun 2020 14:45:22 +0000 (10:45 -0400)]
zink: move shader state methods for pipe_context into zink_program.c
just moving these so all the shader code can be in one place
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970>
Lionel Landwerlin [Wed, 4 Mar 2020 15:55:46 +0000 (17:55 +0200)]
intel/dump_gpu: add an option to capture a single frame
We use the driver identifier buffer to get the information about the
current frame.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>
Lionel Landwerlin [Wed, 4 Mar 2020 15:38:48 +0000 (17:38 +0200)]
intel/dump_gpu: fix --platform option
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>
Lionel Landwerlin [Wed, 4 Mar 2020 23:15:57 +0000 (01:15 +0200)]
anv: track the current frame and write it into the driver identifier BO
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>
Lionel Landwerlin [Sun, 13 Oct 2019 21:42:27 +0000 (00:42 +0300)]
intel/dump_gpu: only map in GTT buffers not previously mapped
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>
Lionel Landwerlin [Thu, 3 Oct 2019 21:55:43 +0000 (00:55 +0300)]
intel/dump_gpu: add an only-capture option
This option allows for smaller aub files to be generated by only
storing the BOs flagged with EXEC_OBJECT_CAPTURE.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>
Lionel Landwerlin [Thu, 3 Oct 2019 21:55:02 +0000 (00:55 +0300)]
intel/dump_gpu: set default device_override
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>
Lionel Landwerlin [Thu, 3 Oct 2019 08:05:45 +0000 (11:05 +0300)]
intel/dump_gpu: further track mapping of BOs
We can go further in tracking what BOs are written to by the driver by
tracking when a buffer in unmapped. A BO could be mmap, written, unmap
and never be written to again. In such case we can just write the BO's
content on the first exec buf after unmap and never write it again.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>
Lionel Landwerlin [Wed, 2 Oct 2019 23:13:32 +0000 (02:13 +0300)]
intel/dump_gpu: only write BOs mapped by the driver
Track what BOs are mapped by the driver and only write those. We can
safely assume that when not mapped there is no data to save.
v2: Don't forget to return the ret (Rafael)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>
Mike Blumenkrantz [Fri, 31 Jul 2020 13:32:23 +0000 (09:32 -0400)]
zink: set primitive restart cap
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5912>
Mike Blumenkrantz [Wed, 1 Jul 2020 21:45:18 +0000 (17:45 -0400)]
zink: use util_draw_vbo_without_prim_restart for unsupported prim modes
this fixes up primitive restart functionality for the primitive types that
vulkan doesn't support using primitive restart with
fixes #2873
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5912>
Mike Blumenkrantz [Mon, 20 Jul 2020 13:04:21 +0000 (09:04 -0400)]
zink: move 8bit index handling out of u_primconvert path
putting this through util_translate_prim_restart_ib reduces our reliance on
u_primconvert, which ideally we don't want to be using
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5912>
Mike Blumenkrantz [Wed, 1 Jul 2020 19:57:43 +0000 (15:57 -0400)]
zink: basic primitive restart support for strip/fan topologies
this conditionally handles rewriting the index buffer to use vk-compatible
restart indexes and then enables it in the pipeline for supported draw
modes
fixes #3174
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5912>
Bas Nieuwenhuizen [Thu, 6 Aug 2020 22:08:21 +0000 (00:08 +0200)]
radv: Add ETC2 support on RAVEN2.
I did a whole bunch of validation and it essentially works.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6215>
Samuel Pitoiset [Thu, 6 Aug 2020 15:50:33 +0000 (17:50 +0200)]
radv: allow to force-enable LLVM internally for a specific shader stage
For ACO debugging purposes, developers only.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6208>
Christian Gmeiner [Tue, 4 Aug 2020 20:44:21 +0000 (22:44 +0200)]
etnaviv: call nir_lower_bool_to_bitsize
Starting with commit
6f394343b1f ("nir/algebraic: i2f(f2i()) -> trunc()")
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_vertex
ends with an unsuppored flt instruction. Use nir_lower_bool_to_bitsize to
convert this flt to a flt32 which is supported. This fixes the introduced
regression.
Cc: 20.2 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6182>
Alyssa Rosenzweig [Wed, 5 Aug 2020 22:12:00 +0000 (18:12 -0400)]
panfrost: Drop compiler cmdstream deps
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 22:11:15 +0000 (18:11 -0400)]
panfrost: Treat texture dimension as first-class
Instead of hiding behind a cmdstream enum. The raw values have a very
simple interpretation as dimension.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 22:10:41 +0000 (18:10 -0400)]
panfrost: Inline max rt into compilers
Another dep.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 22:09:51 +0000 (18:09 -0400)]
pan/bi: Drop use of MALI_POSITIVE
Contributing to a dep on the main cmdstream. It's a fancy word for
subtract one...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 21:36:47 +0000 (17:36 -0400)]
panfrost: Add panloader/ to .gitignore
For out-of-tree trace infrastructure.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 21:20:25 +0000 (17:20 -0400)]
panfrost: Reduce bit dependency to disassembly only
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 21:25:27 +0000 (17:25 -0400)]
pan/bi: Separate disasm/compiler targets
Likewise.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 21:16:27 +0000 (17:16 -0400)]
pan/mdg: Separate disassembler and compiler targets
The compiler depends on the disassembler, which is okay. But the
disassembler now no longer depends on the compiler circularly, avoiding
the need to being in GLSL/NIR.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:25:52 +0000 (16:25 -0400)]
panfrost: Move pandecode into lib/
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:16:00 +0000 (16:16 -0400)]
panfrost: Rename encoder/ to lib/
We'll want both encoding and decoding here, as a generic hardware
interface library based on GenXML.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:20:17 +0000 (16:20 -0400)]
panfrost: Don't export exception_status
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:07:16 +0000 (16:07 -0400)]
panfrost: Remove panfrost-misc.h
Now unused.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:05:12 +0000 (16:05 -0400)]
panfrost: Inline panfrost-misc.h into panfrost-job.h
We only need a small subset of the defines here.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:03:09 +0000 (16:03 -0400)]
pan/decode: Remove shader replacement artefact
Did this ever work?
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:01:27 +0000 (16:01 -0400)]
panfrost: Move format stringify to decode.c
Let's simplify pandecode before moving it around. We don't need to share
this routine right now, and we'll be generating it soon.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Alyssa Rosenzweig [Wed, 5 Aug 2020 19:45:52 +0000 (15:45 -0400)]
panfrost: Remove blend prettyprinters
Unused and mostly wrong too.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
Lionel Landwerlin [Thu, 6 Aug 2020 08:13:06 +0000 (11:13 +0300)]
anv: fix incorrect realloc failure handling
We don't want to leak in case of failure.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reported-by: Ivan Briano <ivan.briano@intel.com>
Fixes: 246261f0addf ("anv: prepare the driver for delayed submissions")
Fixes: 34f32a6d6648 ("anv: implement VK_KHR_timeline_semaphore")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6200>
Rhys Perry [Thu, 6 Aug 2020 22:21:47 +0000 (23:21 +0100)]
aco: fix C++11/C++14 compilation
static_assert without a message is only available since C++17.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: d1f992f3c2d ('aco: rework barriers and replace can_reorder')
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3374
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6216>
Danylo Piliaiev [Wed, 5 Aug 2020 15:07:06 +0000 (18:07 +0300)]
st/mesa: Treat vertex outputs absent in outputMapping as zero in mesa_to_tgsi
After updating vertex outputs being written based on optimized NIR, they may
go out of sync with outputs in mesa IR. Which is translated to TGSI and used
together with NIR if draw doesn't have llvm.
It's much easier to treat such outputs as zero because there is no pass to
entirely get rid of them.
Similar to
eeab9c93db84e5759145891e8fdde66a5cdcf917 but now for outputs.
Fixes: d684fb37bfbc47d098158cb03c0672119a4469fe
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3365
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6187>
Dylan Baker [Thu, 6 Aug 2020 16:34:42 +0000 (09:34 -0700)]
Bump development version and clear new_features
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Jason Ekstrand [Wed, 22 Jul 2020 20:23:46 +0000 (15:23 -0500)]
anv: Advertise shaderIntegerFunctions2
We advertised the extension string but never the feature bit. Doh!
Fixes: c57338b92471 "anv: Enable SPV_INTEL_shader_integer_functions2..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6033>
Icenowy Zheng [Wed, 5 Aug 2020 20:48:05 +0000 (04:48 +0800)]
panfrost: signal syncobj if nothing is going to be flushed
When nothing is going to be flushed, the kernel will get no job that
signals the syncobj.
Signal it by ourselves, otherwise it will never get signaled.
Closes: #3371
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6190>
Bas Nieuwenhuizen [Wed, 5 Aug 2020 22:51:38 +0000 (00:51 +0200)]
radv: Don't use both DCC and CMASK for single sample images.
Fixes: c67ef7695a2 "radv: Use ac_surface to allocate aux surfaces."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6194>
Jose Fonseca [Tue, 4 Aug 2020 13:16:37 +0000 (14:16 +0100)]
appveyor: Use Python3.
This implied upgrading to the Visual Studio 2019 image, not for VS
itself, but for the newer Python 3.8.5 version it contains, to avoid
UnicodeDecodeError inside modulefinder module when attempting to decode
our UTF-8 encoded Python scripts with cp1252 encoding.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6184>
Jose Fonseca [Wed, 5 Aug 2020 09:01:24 +0000 (10:01 +0100)]
appveyor: Upgrade pip.
To avoid all those warnings.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6184>
Vinson Lee [Thu, 6 Aug 2020 05:44:12 +0000 (22:44 -0700)]
util: Fix SCons build.
Fixes: 848e7b947d0d ("util: Move stack debug functions to src/util")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6199>
Eric Anholt [Fri, 31 Jul 2020 16:54:09 +0000 (09:54 -0700)]
freedreno: Add more asserts for DST_OFF/NUM_UNIT in indirect const uploads.
These are just empirical alignment numbers from looking at dEQP traces of
the blob driver (a330, a418, a540, a618, a630), with one exception noted
in the comments.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990>