Emma Anholt [Wed, 3 Aug 2022 23:33:28 +0000 (16:33 -0700)]
tu: Only emit as many VPC interp/repl regs as will be referenced.
Saves a bit of CP overhead on pipeline switch. Improves zink drawoverhead
-test 7 (shader program change) throughput by 1.10825% +/- 0.131485%
(n=10).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17932>
Emma Anholt [Wed, 3 Aug 2022 23:08:46 +0000 (16:08 -0700)]
tu: Only emit as many bindless regs as we have seen descriptor sets.
Cuts 12 dwords of CS per draw in vk-5-normal's main renderpass.
zink drawoverhead -test 9 (1 texture change) throughput +0.898636% +/-
0.212647% (n=30).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17932>
José Roberto de Souza [Tue, 9 Aug 2022 20:37:13 +0000 (13:37 -0700)]
anv: Group all context operations during device creation
Move all the setup of context to one function making it easier
to read it.
There is no behavior changes here.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18110>
José Roberto de Souza [Wed, 10 Aug 2022 17:15:54 +0000 (10:15 -0700)]
anv: Nuke anv_execbuf_init()
We can do designated initialization to initialize needed values
and set the rest to zero.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18110>
José Roberto de Souza [Wed, 10 Aug 2022 19:02:31 +0000 (12:02 -0700)]
anv: Do not copy garbage to batch_bo
batch_size is the aligned value so it is >= than the actual number
of bytes in anv_batch.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18110>
José Roberto de Souza [Tue, 16 Aug 2022 20:57:55 +0000 (13:57 -0700)]
anv: Only wait for queue sync if execbuf was properly executed
In case execbuf failed it would block execution until the maximum
timeout if DEBUG_SYNC is enabled.
While at it also removing the shadowing of result that would cause
the function result to not have its values updated in case
vk_sync_wait() returns a error.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18110>
Yonggang Luo [Wed, 27 Jul 2022 08:30:55 +0000 (16:30 +0800)]
mapi: Improve comment about _glapi_tls_Dispatch and _glapi_tls_Context
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>
Yonggang Luo [Sat, 25 Jun 2022 05:34:37 +0000 (13:34 +0800)]
docs: Remove document about USE_ELF_TLS
Revise dispatch document
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>
Yonggang Luo [Wed, 27 Jul 2022 08:48:47 +0000 (16:48 +0800)]
mapi: Access _glapi_tls_Dispatch directly without need of macro
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>
Yonggang Luo [Wed, 27 Jul 2022 08:11:42 +0000 (16:11 +0800)]
mapi: Move shared stub into u_current.c
These stub are:
_glapi_Dispatch
_glapi_Context
_glapi_destroy_multithread
_glapi_check_multithread
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>
Yonggang Luo [Wed, 27 Jul 2022 07:54:59 +0000 (15:54 +0800)]
mapi: Move shared _glapi_set_context and _glapi_set_dispatch into u_current.c
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>
Yonggang Luo [Wed, 27 Jul 2022 06:50:59 +0000 (14:50 +0800)]
mapi: Remove reference to unused _gl_DispatchTSD
The last usage of _gl_DispatchTSD is at commit:
df98423f24b ("mapi: Prefix functions in u_current.h by u_current.")
Wow it's 12 years ago
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>
Yonggang Luo [Wed, 27 Jul 2022 08:03:27 +0000 (16:03 +0800)]
mapi: Remove usage of _glapi_check_multithread and _glapi_destroy_multithread
They are empty stub functions now so have no need call to them
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>
Yonggang Luo [Wed, 27 Jul 2022 06:24:12 +0000 (14:24 +0800)]
mapi: Remove unused ENTRY_CURRENT_TABLE_GET
The last commit that use ENTRY_CURRENT_TABLE_GET is:
62a68481fa9 ("mapi: Remove usage of USE_ELF_TLS")
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>
Chia-I Wu [Fri, 19 Aug 2022 18:38:16 +0000 (11:38 -0700)]
turnip: trim down bo size of tu_descriptor_pool
Dynamic descriptors does not take up bo space.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18152>
Chia-I Wu [Fri, 19 Aug 2022 18:38:16 +0000 (11:38 -0700)]
turnip: trim down host size of tu_descriptor_pool
There is no tu_bo array in tu_descriptor_set since
bea6290ca09 ("turnip:
device global bo list").
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18152>
Chia-I Wu [Fri, 19 Aug 2022 19:39:28 +0000 (12:39 -0700)]
turnip: pCreateInfo->pPoolSizes[i] is wordy
pool_size is shorter.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18152>
Connor Abbott [Tue, 16 Aug 2022 12:38:59 +0000 (14:38 +0200)]
ir3/spill: Fix extracting from a vector at the end of a block
If this happens then "after" is NULL, so we can't use it to get the
block, and the instruction is never moved at the end so we have to
create the split instructions before creating the collect to make sure
they are in the right order.
This happens when reloading a complex vector value that has been
coalesced at the end of a basic block, which apparently hasn't happened
until a gfxbench5 shader on zink hit this case. This fixes it.
Closes: #7054
Fixes:
613eaac7b53 ("ir3: Initial support for spilling non-shared registers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18082>
Yonggang Luo [Mon, 20 Jun 2022 10:35:06 +0000 (18:35 +0800)]
util: Use literal instead call to list_inithead in u_queue.c
This is a more convenient way to struct list_head variable.
And removed the need to call list_inithead in global_init
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18092>
marek [Fri, 19 Aug 2022 22:33:56 +0000 (18:33 -0400)]
radeonsi/ci: make the running script easy to use
Changes:
- No path parameters are needed to run all tests.
- All test results are stored next to cloned repos instead of /tmp.
This is a personal preference, though not necessary.
The new setup guide is going to be:
- mesa, piglit, deqp, and glcts directories must be next to each other.
- Add `PATH=$HOME/?/mesa/src/gallium/drivers/radeonsi/ci:$PATH` into
`.bashrc`. Replace `?` with the proper path.
- Install Rust, which will include its package manager Cargo:
https://www.rust-lang.org/tools/install
- The installer will add the Cargo environment into `.bashrc`, which will
add cargo into `PATH`.
- Restart bash to get the new `PATH`.
- Run: `cargo install deqp-runner`
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
The parameters setting the various paths won't be explained to keep
the guide short.
The path parameters and env vars can be removed if everybody stops using
them after this.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18155>
Caio Oliveira [Tue, 16 Aug 2022 21:48:38 +0000 (14:48 -0700)]
intel/compiler: Print more details when fs_visitor::validate() fails
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18150>
Eric Engestrom [Mon, 22 Aug 2022 08:57:20 +0000 (09:57 +0100)]
wsi/x11: fix memleak in wsi_x11_connection_create()
Fixes:
bbdf7e45b15f6345c5e5 ("wsi/x11: Hook up KHR_incremental_present")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18177>
Alyssa Rosenzweig [Fri, 19 Aug 2022 17:58:19 +0000 (13:58 -0400)]
gallium: Remove util_make_fragment_tex_shader_xrbias
Unused.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17918>
Alyssa Rosenzweig [Fri, 5 Aug 2022 22:19:57 +0000 (18:19 -0400)]
gallium: Inline away util_make_fragment_tex_shader interp_mode
Everything sets it to linear.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17918>
Alyssa Rosenzweig [Fri, 5 Aug 2022 22:11:07 +0000 (18:11 -0400)]
gallium: Inline away util_make_fragment_tex_shader_writemask
Nothing actually uses writemasks, get rid of them.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17918>
Danylo Piliaiev [Thu, 18 Aug 2022 09:47:04 +0000 (12:47 +0300)]
tu: Enable bufferDeviceAddressCaptureReplay
Now that we are able to set iova from userspace we could support
the replay feature of BDA.
In order to prevent address clashing between ordinary allocations
and replayable ones we allocate:
- ordinary allocations - from the lowest address;
- replayable allocations - from the highest address.
Passes: dEQP-VK.binding_model.buffer_device_address.*replay*
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15676>
Danylo Piliaiev [Thu, 18 Aug 2022 09:15:35 +0000 (12:15 +0300)]
tu: Switch to userspace iova allocations if kernel supports it
With MSM_INFO_SET_IOVA it's now possible for userspace to manually
set iova instead of relying on kernel.
In preparation to support bufferDeviceAddressCaptureReplay.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15676>
Yonggang Luo [Tue, 9 Aug 2022 14:43:23 +0000 (22:43 +0800)]
Revert "ci: disable unit tests"
As we disabled the glsl tests by meson options always, so
we reverts commit
4dd8c143a9b76b340da868f7b5186e268073fc27.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6897
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>
Yonggang Luo [Tue, 9 Aug 2022 14:31:19 +0000 (22:31 +0800)]
ci: disable glcpp tests for now
these are too flaky to continue running for now
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>
Yonggang Luo [Tue, 9 Aug 2022 14:29:13 +0000 (22:29 +0800)]
meson: add enable-glcpp-tests option
these are too intermittent to be left enabled on CI for now
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>
Yonggang Luo [Sun, 7 Aug 2022 14:05:38 +0000 (22:05 +0800)]
meson: Use different STRACEDIR folder for intel_devinfo_override_test
Fixes
--- stderr ---
strace: Can't fopen 'meson-logs/strace/intel_device_info_override_test_120_/log.10613': No such file or directory
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>
Yonggang Luo [Mon, 22 Aug 2022 12:07:21 +0000 (20:07 +0800)]
anv: Fixes struct anv_device::info is not initialized with struct anv_physical_device
Refactoring the function anv_device_set_physical out, so that it's can be called in unittests
Fixes:
356a60bd6c5 ("anv: Do not duplicate intel_device_info memory in each logical device")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7092
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: José Roberto de Souza jose.souza@intel.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>
Samuel Pitoiset [Fri, 19 Aug 2022 10:41:39 +0000 (12:41 +0200)]
radv: move lowering the view index to radv_pipeline_link_shaders()
This is a link step because it needs to know if the previous stage is
a mesh shader.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Samuel Pitoiset [Fri, 19 Aug 2022 09:44:04 +0000 (11:44 +0200)]
radv: move lowering patch vertices to radv_pipeline_link_tcs()
This also moves merging the tess info.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Samuel Pitoiset [Fri, 19 Aug 2022 09:40:51 +0000 (11:40 +0200)]
radv: move assigning driver locations to the new linking helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Samuel Pitoiset [Fri, 19 Aug 2022 08:36:18 +0000 (10:36 +0200)]
radv: rework linking shaders in NIR
Replace these ugly loops with something much cleaner and easier to
maintain.
There shouldn't be any functional changes.
No fossils-db changes (tested on NAVI21, VEGA10 and POLARIS10).
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Samuel Pitoiset [Fri, 19 Aug 2022 08:36:03 +0000 (10:36 +0200)]
radv: add radv_remove_point_size() linking helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Samuel Pitoiset [Thu, 18 Aug 2022 14:39:08 +0000 (16:39 +0200)]
radv: remove useless parameter from radv_link_shaders()
It can be accessed from the pipeline key instead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Samuel Pitoiset [Thu, 18 Aug 2022 12:54:15 +0000 (14:54 +0200)]
radv: use NIR_PASS with radv_export_implicit_primitive_id
For consistency.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Samuel Pitoiset [Thu, 18 Aug 2022 08:01:54 +0000 (10:01 +0200)]
radv: remove unused parameter in radv_lower_io_to_mem()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Samuel Pitoiset [Thu, 18 Aug 2022 07:32:55 +0000 (09:32 +0200)]
radv: move dumping NIR shaders to the previous similar loop
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Samuel Pitoiset [Thu, 18 Aug 2022 07:31:19 +0000 (09:31 +0200)]
radv: move lowering FS intrinsics to radv_postprocess_nir()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Samuel Pitoiset [Thu, 18 Aug 2022 07:16:43 +0000 (09:16 +0200)]
radv: add a radv_postprocess_nir() helper
This looks cleaner.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Samuel Pitoiset [Thu, 18 Aug 2022 07:13:02 +0000 (09:13 +0200)]
radv: copy the whole radv_shader_info struct for merged stages
We do something similar for shader args and this allows to remove this
ugly hack when postprocessing NIR shaders.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Samuel Pitoiset [Wed, 17 Aug 2022 14:57:33 +0000 (16:57 +0200)]
radv: copy linked I/O info for merged stages in radv_fill_shader_info
To copy info to merged stage at the same place.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Samuel Pitoiset [Wed, 17 Aug 2022 10:17:45 +0000 (12:17 +0200)]
radv: remove useless check when creating the noop FS
If the pipeline type is graphics, VK_PIPELINE_CREATE_LIBRARY_KHR
shouldn't never be set, so this was redundant.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18138>
Alyssa Rosenzweig [Fri, 19 Aug 2022 21:16:42 +0000 (17:16 -0400)]
r600/sfn: Don't use broken idiv lowering
NIR has two implementations of lower_idiv, keyed on the imprecise_32bit_lowering
flag. This flag is misleading: the results when setting this flag "imprecise",
they're completely wrong for some values. Non-constant highp integer division is
rare enough this shouldn't noticeably harm performance of real applications.
Address r600 portion of #6555.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18154>
Pavel Ondračka [Sun, 21 Aug 2022 08:37:47 +0000 (10:37 +0200)]
r300: Set more shadow sampler lowering in precompiles.
This extends the commit
17cea74b8cd3b1a56d923edeb40772b3e8b18ab2
also for rectangular textures. They are otherwise lowered to MOV
dst temp[0].0000 and deadcode elimitation goes crazy.
Fixes shader-db with tesseract shaders from https://gitlab.freedesktop.org/mesa/mesa/-/issues/6771
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18168>
Konrad Kleine [Thu, 13 Jan 2022 15:46:09 +0000 (15:46 +0000)]
Update docs/drivers/llvmpipe.rst
to include a link to the LLVM Snapshots for Fedora.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14537>
Juan A. Suarez Romero [Thu, 18 Aug 2022 08:03:39 +0000 (10:03 +0200)]
vc4: store tex sampler in proper register
When unpacking the texture sample result ensure it is moved to the
proper expected dest register.
This fixes incorrect texturing in Chromium using PixiJS framework.
CC: mesa-stable
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18122>
Erico Nunes [Mon, 22 Aug 2022 08:03:41 +0000 (10:03 +0200)]
ci: enable lima farm
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18178>
Konstantin Seurer [Sat, 20 Aug 2022 18:39:23 +0000 (20:39 +0200)]
lavapipe: Set ss_dirty in emit_state
Set ss_dirty to false when updating the samplers.
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18161>
Eric Engestrom [Sun, 21 Aug 2022 11:58:05 +0000 (12:58 +0100)]
meson: drop duplicate `lib` in lib name
The default lib prefix is `lib`, so adding `lib` to the lib name just
results in `liblibbroadcom_v3d.a` for instance.
Those are internal, build-temporary static libraries that end up being
linked into the real user-visible libraries, so it doesn't really
matter, but we might as well just clean up their names anyway.
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18171>
Simon Ser [Thu, 28 Jul 2022 12:54:56 +0000 (14:54 +0200)]
vulkan/wsi/x11: detect Xwayland via the XWAYLAND extension
This is more robust than checking for XRandR output names.
Signed-off-by: Simon Ser <contact@emersion.fr>
References: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/954
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17790>
Vinson Lee [Mon, 20 Sep 2021 05:49:37 +0000 (22:49 -0700)]
bin/perf-annotate-jit.py: Update to Python 3.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12926>
Mike Blumenkrantz [Wed, 17 Aug 2022 17:41:45 +0000 (13:41 -0400)]
st_pbo/compute: pre-clamp loaded geometry based on coord components
if only some of these components will be used, clamp the rest to enable
better shader optimizing
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18118>
Mike Blumenkrantz [Wed, 17 Aug 2022 17:34:51 +0000 (13:34 -0400)]
st_pbo/compute: pre-clamp shader geometry to 16bit
no point doing this in the shader
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18118>
Mike Blumenkrantz [Wed, 17 Aug 2022 15:50:22 +0000 (11:50 -0400)]
st_pbo/compute: fix 1D coord dimension by pre-trimming vectors
cc: mesa-stable
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18118>
Mike Blumenkrantz [Wed, 17 Aug 2022 21:27:00 +0000 (17:27 -0400)]
st_pbo/compute: fix 1D_ARRAY offsets
these come in as yoffset, but the constant data must use 0 since the sampler
view is created with the offset
cc: mesa-stable
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18118>
Mike Blumenkrantz [Fri, 12 Aug 2022 16:37:22 +0000 (12:37 -0400)]
st_pbo/compute: handle download failures with fallback
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18118>
Alyssa Rosenzweig [Mon, 1 Aug 2022 22:57:55 +0000 (18:57 -0400)]
panfrost: Assert that blend shaders are nontrivial
Even if the driver doesn't *use* trivial blend shaders, building and compiling
blend shaders is expensive. We shouldn't be building blend shaders that should
never be used.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
Alyssa Rosenzweig [Mon, 1 Aug 2022 22:57:53 +0000 (18:57 -0400)]
panfrost: Include mask in replace blend shader name
Helpful to disambiguate blend shaders with different colour masks used for the
same format/replace operation.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
Alyssa Rosenzweig [Mon, 1 Aug 2022 22:57:52 +0000 (18:57 -0400)]
panfrost: Simplify blitter blend shader creation
We don't need blending in the blitter. That means blend shaders are only needed
on Midgard. Simplify accordingly.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
Alyssa Rosenzweig [Fri, 19 Aug 2022 19:14:03 +0000 (15:14 -0400)]
panfrost: Invert no_colour to enabled
This way, blend info that's left zeroed out defaults to disabled. Fixes an
assertion failure in KHR-GLES31.core.draw_buffers_indexed.color_masks due to
the blend CSO max_rt being set unreliably. This is also probably clearer.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
Alyssa Rosenzweig [Mon, 1 Aug 2022 22:57:49 +0000 (18:57 -0400)]
panfrost: Don't compile empty blend shaders
This is silly. They'll be masked out later, but it's still pointless, and adds
noise when grepping BIFROST_MESA_DEBUG=shaders,internal for "pan_blend" when
debugging why an app is using blend shaders.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
Alyssa Rosenzweig [Mon, 1 Aug 2022 22:57:46 +0000 (18:57 -0400)]
panfrost: Avoid blend shader when not blending
On Midgard, we need a "blend" shader even if blending is disabled, if the format
isn't blendable. This is inefficient. Bifrost solves this by decoupling the
format conversion from the blending, allowing opaque (unblended) output to any
format without a blend shader or fragment key.
Unfortunately, our blend code is from the Midgard era -- I wrote an early
version of nir_lower_blend when I was still in high school! -- so we've been
using blend shaders for opaque output even on Bifrost. Whoops!
In SuperTuxKart, reduces blend shader calls by 30%, translating to a 15%
reduction in i-cache misses.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
Alyssa Rosenzweig [Fri, 5 Aug 2022 21:34:04 +0000 (17:34 -0400)]
panfrost: Promote blend shader outputs 8->16-bit
..on Bifrost and later, where the conversion hardware makes this reasonable.
This saves us from inserting a pile of conversions in the compiler to lower away
the 8-bit input/output. This also generates substantially better code.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
Alyssa Rosenzweig [Fri, 5 Aug 2022 21:29:36 +0000 (17:29 -0400)]
panfrost: Don't saturate in Bifrost blend shaders
It's unnecessary since the hardware already does the conversion for us.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
Alyssa Rosenzweig [Fri, 5 Aug 2022 21:09:41 +0000 (17:09 -0400)]
panfrost: Set blit output variable types correctly
The type of the output variable will propagate through the store_output
intrinsic's src_type field to the BLEND instruction's register format field. On
Valhall, the register format for a BLEND comes from the instruction -- the
register format specified in the conversion descriptor (used on Bifrost) is
ignored. That means it has to match.
Previously, we always used a blend shader for integer rendering. Since blend
shaders ignore the register format of the BLEND instruction, that masked this
issue. That also means we don't need to backport this.
Will prevent a regression from the following commit.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
Alyssa Rosenzweig [Fri, 19 Aug 2022 21:49:33 +0000 (17:49 -0400)]
panfrost: Handle untyped_color_outputs on Bifrost
For untyped_color_outputs, we need to ignore the type of the colour output in
the shader and instead use the type from the format. We have all the information
to do this at blend descriptor pack time, but not at shader compile time. This
means we need a (somewhat expensive) fixup in this edge case to ingest
NIR-to-TGSI. This will prevent a regression from the rest of the series.
Although the register_format field is also present on Valhall blend descriptors,
it is ignored so we don't need the fixup there.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
Alyssa Rosenzweig [Fri, 19 Aug 2022 18:56:18 +0000 (14:56 -0400)]
pan/bi: Handle info.fs.untyped_color_outputs on Valhall
Colour outputs in TGSI are untyped so we have to ignore the register format on
the store_output. Luckily, Valhall gives us the auto32 escape hatch to deal with
it, and Bifrost doesn't care anyway. This will avoid regressions from native int
output without corrupting the compiler for GLSL and SPIR-V shaders that are
well-typed.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
Alyssa Rosenzweig [Fri, 19 Aug 2022 22:30:01 +0000 (18:30 -0400)]
pan/bi: Don't allow ATEST to take a temporary
Clause scheduler edition of
db2bdc1dc37 ("pan/bi: Require ATEST coverage mask
input in R60"). ATEST wants to read r60, which can't work if its input isn't
even in a register.
When per-sample shading isn't in use, prevents regressions in:
KHR-GLES31.core.sample_variables.mask.*
These tests previously passed because per-sample shading was forced. It's
not clear whether the bug addressed in this patch is possible to hit "in the
wild", i.e. without the optimizations in this series that allow us to use
per-pixel shading in more cases.
No shader-db changes.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
Alyssa Rosenzweig [Fri, 19 Aug 2022 23:22:14 +0000 (19:22 -0400)]
pan/bi: Don't reorder image loads across stores
Fixes flaking in
dEQP-GLES31.functional.image_load_store.cube.qualifiers.volatile_r32i due to
image reads being moved past a BARRIER.
To make this more robust/optimal, we probably need scheduling information
(coherent/volatile/etc) added to instructions like ACO does. That's left for a
future extension, for now I just want the test to stop flaking.
Fixes:
569e5dc7450 ("pan/bi: Schedule for pressure pre-RA")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
Alyssa Rosenzweig [Thu, 18 Aug 2022 00:28:01 +0000 (20:28 -0400)]
asahi: Fix warning building for macOS 12.0
Unnecessary rename that breaks forward compatibility... but Apple says
this is just NULL. Do the simpler thing. Note that the argument is a
mach_port_t, which is a natural_t == uint32_t in userspace... even
though it's a pointer in the kernel. Although Apple's docs claim that
kIOMasterPortDefault is NULL, it's really just 0.
../src/asahi/lib/agx_device.c:290:35: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
IOServiceGetMatchingService(kIOMasterPortDefault, matching);
^~~~~~~~~~~~~~~~~~~~
kIOMainPortDefault
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18121>
Danylo Piliaiev [Fri, 19 Aug 2022 18:21:43 +0000 (21:21 +0300)]
tu: Assert that if draw state is enabled it has valid iova
GPU faults at draw state loading completely could completely bring
down the board. (Happened on HDK888)
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18149>
Pavel Ondračka [Mon, 11 Jul 2022 11:11:53 +0000 (13:11 +0200)]
r300: merge MOVs with MULs or ADDs in merge channels
Shader-db stats with RV530:
total instructions in shared programs: 166499 -> 164362 (-1.28%)
instructions in affected programs: 80056 -> 77919 (-2.67%)
total temps in shared programs: 21658 -> 21565 (-0.43%)
temps in affected programs: 1780 -> 1687 (-5.22%)
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
Pavel Ondračka [Tue, 12 Jul 2022 14:04:22 +0000 (16:04 +0200)]
r300: merge MOVs into ADD using the 0 swizzle
Shader-db stats with RV530:
total instructions in shared programs: 169509 -> 166013 (-2.06%)
instructions in affected programs: 99126 -> 95630 (-3.53%)
total presub in shared programs: 10975 -> 10758 (-1.98%)
presub in affected programs: 744 -> 527 (-29.17%)
total temps in shared programs: 21722 -> 21649 (-0.34%)
temps in affected programs: 1350 -> 1277 (-5.41%)
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
Pavel Ondračka [Tue, 12 Jul 2022 14:03:35 +0000 (16:03 +0200)]
r300: don't merge w channel in fragment shaders
Skip the merge if one of the instructions writes just w channel
and we are compiling a fragment shader. We can pair-schedule it together
later anyway and it will also give the scheduler a bit more flexibility.
Shader-db stats with RV530:
total instructions in shared programs: 169522 -> 169509 (<.01%)
instructions in affected programs: 14170 -> 14157 (-0.09%)
total temps in shared programs: 21712 -> 21722 (0.05%)
temps in affected programs: 324 -> 334 (3.09%)
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
Pavel Ondračka [Tue, 12 Jul 2022 13:15:20 +0000 (15:15 +0200)]
r300: generalize the merge_movs pass
To allow a simple extension with more merging combinations in the
later commits.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
Pavel Ondračka [Fri, 17 Jun 2022 19:09:32 +0000 (21:09 +0200)]
r300: run dataflow optimizations in separate loops
Constant folding first, than copy propagate simple movs, after that
we run the merge movs pass and finally peephole. The important part
is to do the copy propagate for the whole program before running merge
movs.
We no longer check the return from merge_movs so convert it to void.
Shader-db changes with RV530:
total instructions in shared programs: 155361 -> 154787 (-0.37%)
instructions in affected programs: 67920 -> 67346 (-0.85%)
total temps in shared programs: 20836 -> 20773 (-0.30%)
temps in affected programs: 711 -> 648 (-8.86%)
total presub in shared programs: 8226 -> 8202 (-0.29%)
presub in affected programs: 223 -> 199 (-10.76%)
total temps in shared programs: 20836 -> 20773 (-0.30%)
temps in affected programs: 711 -> 648 (-8.86%)
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
Pavel Ondračka [Wed, 22 Jun 2022 16:30:06 +0000 (18:30 +0200)]
r300: check for identical saturate mode when merging MOVs
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
Pavel Ondračka [Tue, 12 Jul 2022 08:17:13 +0000 (10:17 +0200)]
r300: fix negate mask computation when merging movs
The main problem here is we can have a negate bit set for an unused
channel, so we can't just OR together the negates when channel merging.
Right now the bug is hidden because how we run the pass order, but
that will change in a later commit. Add some helpers for merging of the
negates, they will be also used more in a later commits. As a bonus
construct the new source separatelly and only rewrite the original
instructions after checking that the final swizzle is valid.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
Pavel Ondračka [Thu, 14 Jul 2022 16:35:56 +0000 (18:35 +0200)]
r300: allow constant swizzles with inline constant
This will prevent a regression in the number of inlined constants in
a later commit. Constructs like 4.000000 (0x48).w110 works just fine.
There is a small behavioral change. We would previously allow positive
and negative same-value contants to be produced, e.g.,
4.000000 (0x48).w-w__ and this would be later split into some extra
movs in the dataflow swizzle pass. We now explicitly check that the
final swizzle is valid while inlining. So there is a minor decrease
in inlined constants and in the total instructions.
total lits in shared programs: 4328 -> 4194 (-3.10%)
lits in affected programs: 554 -> 420 (-24.19%)
total instructions in shared programs: 155488 -> 155361 (-0.08%)
instructions in affected programs: 5707 -> 5580 (-2.23%)
Additonally, a fix for pair translation is needed since the constant
inlining can now produce swizzles like this: 4.000000 (0x48).w-0-0-_
so we have to teach pair translation to also ignore the sign for zero
swizzle.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17560>
Jesse Natalie [Thu, 18 Aug 2022 15:01:23 +0000 (08:01 -0700)]
microsoft/clc: Handle a null clc logger
Fixes:
55b3980e ("microsoft/compiler: Add dxil_logger type and parameter to nir_to_dxil")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7076
Reviewed-by: Michael Tang <tangm@microsoft.com>
Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18127>
Riteo [Tue, 16 Aug 2022 09:41:59 +0000 (11:41 +0200)]
vulkan/device_select_wayland: fix a memory leak with DRM device handling
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18076>
Konstantin Seurer [Fri, 19 Aug 2022 13:50:10 +0000 (15:50 +0200)]
radv/ci: Remove host build related fails
!17028 removed acceleration structure host build support.
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18142>
Timur Kristóf [Wed, 13 Apr 2022 17:29:30 +0000 (19:29 +0200)]
aco: Improve SCC nocompare optimization when SCC is clobbered.
When SCC is clobbered between s_cmp and its operand's writer,
the current optimization that eliminates s_cmp won't kick in.
However, when s_cmp is the only user of its operand temporary,
it is possible to "pull down" the instruction that wrote the operand.
Fossil DB stats on Navi 21:
Totals from 63302 (46.92% of 134906) affected shaders:
CodeSize:
176689272 ->
176418332 (-0.15%)
Instrs:
33552237 ->
33484502 (-0.20%)
Latency:
205847485 ->
205816205 (-0.02%); split: -0.02%, +0.00%
InvThroughput:
34321285 ->
34319908 (-0.00%); split: -0.00%, +0.00%
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/16266>
Timur Kristóf [Wed, 23 Mar 2022 17:45:36 +0000 (18:45 +0100)]
aco: Support s_cselect_b64 in SCC no-compare optimization.
This was simply left out by accident when I wrote this.
Fossil DB stats on Navi 21:
Totals from 70165 (52.01% of 134906) affected shaders:
CodeSize:
246375656 ->
245814396 (-0.23%)
Instrs:
46519773 ->
46379458 (-0.30%)
Latency:
385159303 ->
385089261 (-0.02%); split: -0.02%, +0.00%
InvThroughput:
66490172 ->
66487867 (-0.00%); split: -0.00%, +0.00%
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/16266>
Timur Kristóf [Sat, 6 Aug 2022 09:58:50 +0000 (11:58 +0200)]
aco/optimizer_postRA: Don't try to optimize dead instructions.
Also delete them when they are already dead in process_instruction().
No Fossil DB changes.
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/16266>
David Heidelberg [Thu, 11 Aug 2022 13:59:05 +0000 (15:59 +0200)]
ci: implement stress testing jobs in ci_run_n_monitor.py
Can be triggered by `--stress`.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18014>
David Heidelberg [Fri, 12 Aug 2022 13:03:06 +0000 (15:03 +0200)]
ci: GraphQL was already implemented in ci_run_n_monitor.py
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18014>
David Heidelberg [Fri, 19 Aug 2022 22:55:16 +0000 (00:55 +0200)]
ci: traces: update freedreno and broadcom to brotli compressed traces
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18156>
Mike Blumenkrantz [Thu, 11 Aug 2022 13:10:08 +0000 (09:10 -0400)]
zink: add gfx pipeline lookup shortcut
if the final hash was the same as the last-used hash for this program,
it should be safe to reuse the last pipeline object in the presence of
dynamic vertex input since the number of permutations is low
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18135>
Mike Blumenkrantz [Thu, 11 Aug 2022 19:48:11 +0000 (15:48 -0400)]
zink: track which stages in gfx programs are using inlined uniforms
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18135>
Mike Blumenkrantz [Tue, 9 Aug 2022 18:12:37 +0000 (14:12 -0400)]
zink: split resource tracking into two sets for buffer/texture
this will make the hash lookups slightly faster to cut down overhead
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18135>
Mike Blumenkrantz [Tue, 9 Aug 2022 18:10:32 +0000 (14:10 -0400)]
zink: make batch internal api static again
hooray
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18135>
Mike Blumenkrantz [Tue, 9 Aug 2022 17:40:55 +0000 (13:40 -0400)]
zink: merge all the batch state sets onto the struct
less memory fragmentation
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18135>
Mike Blumenkrantz [Tue, 9 Aug 2022 16:02:48 +0000 (12:02 -0400)]
zink: use PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND
this eliminates the bespoke handling I wrote to do the same thing a while ago
cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18135>
Mike Blumenkrantz [Tue, 9 Aug 2022 11:55:20 +0000 (07:55 -0400)]
zink: add is_buffer param to zink_batch_resource_usage_set
this allows constants to be specified, reducing register pressure during
descriptor binds
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18135>
Mike Blumenkrantz [Tue, 9 Aug 2022 11:44:10 +0000 (07:44 -0400)]
zink: move zink_batch_resource_usage_set to be static inline
this has to go in zink_resource.h to avoid infinite include dependency
conflicts
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18135>