Eric Engestrom [Fri, 21 Jul 2023 12:55:57 +0000 (13:55 +0100)]
docs: add sha256sum for 23.1.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24281>
Eric Engestrom [Fri, 21 Jul 2023 12:42:31 +0000 (13:42 +0100)]
docs: add release notes for 23.1.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24281>
David Rosca [Wed, 19 Jul 2023 10:10:21 +0000 (12:10 +0200)]
gallium/auxiliary/vl: Fix RGB->YCbCr full range matrix
Also rename it to bt_709_rev_full as there already
is bt_709 which is used for YCbCr->RGB.
Fixes:
8a21efce3a2 ("frontends/va: Add postproc support for converting to full range")
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24238>
Sathishkumar S [Thu, 20 Jul 2023 04:51:22 +0000 (10:21 +0530)]
radeonsi/vcn: num bs_bufs must be proportional to num jpeg engines
using limited number of bs buffers constraints the simultaneous
use of all available jpeg engines especially when count is lesser than
that of the available engines. make sure the number of buffers
available are more than or equal to the number of jpeg engines on the asic.
Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24240>
Sathishkumar S [Thu, 20 Jul 2023 04:51:07 +0000 (10:21 +0530)]
radeonsi/vcn: support variable number of bs_bufs
add support to use variable number of bitstream buffers for decode
v2: remove the always true if condition (CI report)
Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24240>
Samuel Pitoiset [Thu, 20 Jul 2023 12:40:28 +0000 (14:40 +0200)]
radv: bind the pre-compiled PS epilog to the cmdbuf state
For PS epilogs we have two paths, the first one is to pre-compile PS
epilogs at pipeline creation time, while the second one is to compile
PS epilogs on-demand when some dynamic states are used.
Binding the pre-compiled PS epilog to the cmdbuf state allows us to
remove one more pipeline dependency when recording cmdbufs (for shader
objects).
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24254>
Samuel Pitoiset [Thu, 20 Jul 2023 07:18:53 +0000 (09:18 +0200)]
radv: pass a shaders array for computing ia_multi_vgt_param
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24251>
Samuel Pitoiset [Thu, 20 Jul 2023 07:18:32 +0000 (09:18 +0200)]
radv: remove unused param in radv_pipeline_emit_vgt_gs_out()
Also rename the function.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24251>
Samuel Pitoiset [Thu, 20 Jul 2023 07:18:05 +0000 (09:18 +0200)]
radv: stop using a pipeline for emitting VGT_VERTEX_REUSE_BLOCK_CNTL
Passing a TES is enough.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24251>
Alyssa Rosenzweig [Thu, 20 Jul 2023 12:21:30 +0000 (08:21 -0400)]
nir: Remove register arrays
Nothing produces them any more, so remove them from NIR. This massively reduces
the size of nir_src, which should improve performance all over.
nir_src size reduced from 56 bytes -> 40 bytes (pahole results on arm64, x86_64
should be similar.)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24253>
Alyssa Rosenzweig [Thu, 20 Jul 2023 12:14:09 +0000 (08:14 -0400)]
nir: Rename lower_locals_to_reg_intrinsics back
The short name is freed up.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24253>
Alyssa Rosenzweig [Thu, 20 Jul 2023 12:13:22 +0000 (08:13 -0400)]
nir: Remove nir_lower_locals_to_regs
No more users, all switched to the intrinsic version.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24253>
Alyssa Rosenzweig [Thu, 20 Jul 2023 12:24:40 +0000 (08:24 -0400)]
panfrost: Remove unused helpers
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24253>
Alyssa Rosenzweig [Thu, 20 Jul 2023 12:22:58 +0000 (08:22 -0400)]
intel/fs: Don't read reg.base_offset
It's not set in the new intrinsics path.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24253>
Rohan Garg [Thu, 13 Jul 2023 11:12:24 +0000 (13:12 +0200)]
anv: drop CFE state validation checks
anv no longer needs to track if the CFE state is valid since we ensure
that the state is valid at pipeline creation time.
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23934>
Rohan Garg [Thu, 29 Jun 2023 12:24:55 +0000 (14:24 +0200)]
anv,iris: program the maximum number of threads on compute queue init
Fixes:
90a39cac87 ("intel/blorp: Emit compute program based on BLORP_BATCH_USE_COMPUTE")
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23934>
Christian Gmeiner [Tue, 11 Jul 2023 13:46:55 +0000 (15:46 +0200)]
etnaviv: nir: lower nir_texop_txs
Non of the GPU models know at this time have hardware support to
retrieve the dimensions of a level of a texture. Do almost the
same as the binary blob and store the needed values as uniforms.
Passes dEQP-GLES3.functional.shaders.texture_functions.texturesize.*
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24217>
Christian Gmeiner [Tue, 11 Jul 2023 13:41:36 +0000 (15:41 +0200)]
etnaviv: nir: support intrinsic used for txs lowering
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24217>
Christian Gmeiner [Tue, 11 Jul 2023 13:36:34 +0000 (15:36 +0200)]
nir: add enta specific intrinsic used for txs lowering
Non of the know etnaviv GPUs support this feature in hardware
and the binary blob provides sizes via uniforms too.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24217>
Christian Gmeiner [Tue, 11 Jul 2023 11:21:26 +0000 (13:21 +0200)]
etnaviv: move nir texture lowerings into one pass
This is just a prep commit to keep all texture related
lowerings in one c file.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24217>
Marcin Ślusarz [Thu, 20 Jul 2023 17:49:46 +0000 (19:49 +0200)]
anv: merge cases leading to the same code
Added in:
688968e8880 ("anv: add support for direct descriptor in allocation/writes")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24260>
Marcin Ślusarz [Thu, 20 Jul 2023 17:45:57 +0000 (19:45 +0200)]
anv: drop unused function
Added in:
02cecffe2bb ("anv: add a pass to partially lower resource_intel")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24260>
Marcin Ślusarz [Thu, 20 Jul 2023 17:42:12 +0000 (19:42 +0200)]
intel/compiler: remove redundant code
has_lsc is checked few lines above, so this code doesn't matter.
Added in:
a358b97c586 ("intel/fs: optimize uniform SSBO & shared loads")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24260>
Hyunjun Ko [Wed, 12 Jul 2023 05:00:54 +0000 (14:00 +0900)]
anv: use ycbcr_info for P010 format
Since !24096 landed, we can just use ycbcr_info to get information
of an image of the P010 format.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24265>
M Henning [Wed, 19 Jul 2023 02:52:12 +0000 (22:52 -0400)]
nouveau: Delete the nouveau_compiler tool
It's TGSI only.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24175>
M Henning [Mon, 17 Jul 2023 02:01:08 +0000 (22:01 -0400)]
nouveau: Drop BuildUtil::Location
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24175>
M Henning [Mon, 17 Jul 2023 01:56:13 +0000 (21:56 -0400)]
nouveau: Drop BuildUtil::DataArray
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24175>
M Henning [Mon, 17 Jul 2023 01:52:57 +0000 (21:52 -0400)]
nouveau: Drop ConverterCommon::Subroutine
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24175>
M Henning [Mon, 17 Jul 2023 01:26:48 +0000 (21:26 -0400)]
nouveau: Drop tgsi support from nv50_ir_prog_info
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24175>
M Henning [Sun, 16 Jul 2023 22:18:45 +0000 (18:18 -0400)]
nouveau: Delete nv50_ir_from_tgsi.cpp
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24175>
M Henning [Mon, 17 Jul 2023 00:56:59 +0000 (20:56 -0400)]
nv50: Keep nir directly in nv50_program
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24175>
M Henning [Sun, 16 Jul 2023 23:17:46 +0000 (19:17 -0400)]
nvc0: Keep nir directly in nvc0_program
instead of under pipe_shader_state.
This makes it obvious that we never produce tgsi shaders since
c3cbe610 "nouveau: Delete the NV50_PROG_USE_TGSI env var."
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24175>
Mike Blumenkrantz [Mon, 17 Jul 2023 13:16:43 +0000 (09:16 -0400)]
zink: emit SpvCapabilitySampleMaskPostDepthCoverage with SpvExecutionModePostDepthCoverage
can't have one without the other
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24183>
Mike Blumenkrantz [Thu, 13 Jul 2023 14:33:58 +0000 (10:33 -0400)]
zink: be even dumber about buffer refs when replacing storage
these extra checks can cause issues when multiple contexts and transfer
ops are involved
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24141>
Karol Herbst [Thu, 20 Jul 2023 13:38:13 +0000 (15:38 +0200)]
nvc0: fix num_gprs for Volta+
Overallocating by 2 gprs for ugprs is a wild guess by me. It does make
sense though as each subgroup shares 64 ugprs and that's 2 per thread.
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24261>
Karol Herbst [Tue, 11 Jul 2023 14:59:41 +0000 (16:59 +0200)]
llvmpipe: enable system SVM
The API bits are already implemented in clover and rusticl and by
definition a CPU driver implements SVM.
This should allow anybody to work on proper SyCL/CHIP-SPV support for
rusticl running llvmpipe.
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24092>
Karol Herbst [Tue, 11 Jul 2023 15:53:49 +0000 (17:53 +0200)]
rusticl/mesa: make svm_migrate optional
It's just a hint and drivers might want to ignore implementing it for now.
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24092>
Nanley Chery [Thu, 4 May 2023 20:36:55 +0000 (13:36 -0700)]
intel/isl: Add a score for DG2_RC_CCS
This enables the DG2 render compression modifier in anv. When I tested
this against vkcube, I observed that the full resolve which happened at
the end of every frame was converted to a partial resolve, allowing the
framebuffer to retain compression.
According to Caleb Callaway's testing, enabling this modifier positively
impacts the FPS of the following game benchmarks:
- Strange Brigade.vk-g6 +12.78%
- Strange Brigade.dx12vk-g6 + 9.33%
- Shadow of the Tomb Raider.vk-g6-lx + 2.37%
- Dota 2 (replay Jul 2020).vk-g6 + 2.28%
Thanks to Felix Degrood for pointing out that Strange Brigade would
benefit from this optimization.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>
Nanley Chery [Thu, 4 May 2023 20:36:21 +0000 (13:36 -0700)]
intel/isl: Move the Tile4 modifier score case down
Group modifiers by platform first, then the score. I find it easier to
read this way.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>
Nanley Chery [Wed, 21 Jun 2023 15:12:16 +0000 (11:12 -0400)]
intel: Describe modifier compression with booleans
Replace the aux_usage field with two booleans: one for render
compression and one for media compression.
This more accurately describes how CCS_E is used on gfx12. On those
platforms, the FCV feature may be enabled or disabled, but ISL's
modifier table has been using the FCV aux-usage for every gfx12 render
compression modifier. Instead, set the newly-added render compression
boolean to true.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>
Nanley Chery [Thu, 13 Jul 2023 14:08:42 +0000 (10:08 -0400)]
iris: Swap stencil and modifier aux assignment order
Makes the next patch clearer.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>
Nanley Chery [Thu, 6 Jul 2023 20:20:00 +0000 (16:20 -0400)]
hasvk: Delete modifier with aux code
Modifiers with compression are not supported.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>
Nanley Chery [Thu, 6 Jul 2023 20:19:33 +0000 (16:19 -0400)]
crocus: Delete modifier with aux code
Modifiers with compression are not supported.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>
Nanley Chery [Wed, 21 Jun 2023 15:09:41 +0000 (11:09 -0400)]
iris: Reduce accesses of mod_info->aux_usage
This field will be replaced in an upcoming patch.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>
Nanley Chery [Wed, 21 Jun 2023 16:53:08 +0000 (12:53 -0400)]
anv: Reduce accesses of isl_mod_info->aux_usage
This field will be replaced in an upcoming patch.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>
Nanley Chery [Thu, 4 May 2023 21:10:18 +0000 (14:10 -0700)]
anv: Handle explicit surface layout of DG2_RC_CCS
We're going to enable the DG2 modifier. Account for the reduced plane
count that exists with it.
Also add an assert to make it clearer that the aux in use is CCS.
Otherwise, it may not be obvious because of the generic compression
names being used here.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>
Nanley Chery [Wed, 21 Jun 2023 17:59:50 +0000 (13:59 -0400)]
intel: Add and use isl_drm_modifier_get_plane_count
We're going to enable the DG2_RC_CCS modifier in anv. Add and use this
function to prepare for the new plane count that comes with that
modifier.
iris is left alone for now because it supports more modifiers than
isl_drm_modifier_get_score is aware of.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>
Nanley Chery [Thu, 20 Jul 2023 13:40:04 +0000 (09:40 -0400)]
anv: Don't support ASTC images with modifiers
Before this change, anv_get_image_format_features2 reported support for
ASTC formats with any modifier (even those not supported by anv). But,
we didn't intend to support that compressed image format with modifiers.
With this change, the format feature function reports no support for
modifiers on ASTC-formatted images.
This prevents the next patch from causing assertion failures due to
unsupported modifiers.
Fixes:
355f3188438 ("anv: Allow transfer-only linear ASTC images")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>
Nanley Chery [Tue, 11 Jul 2023 16:01:26 +0000 (12:01 -0400)]
iris: Remap DRM_FORMAT_MOD_INVALID more often during import
We'd eventually like to use an ISL helper that doesn't support
DRM_FORMAT_MOD_INVALID. Prepare for this by replacing the invalid value
with the modifier associated with the BO's tiling in more cases.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>
Rohan Garg [Fri, 30 Jun 2023 09:33:58 +0000 (11:33 +0200)]
anv: use the correct GFX_VERx10 macro for WA
Fixes:
60b0d2c2cbea ("add required invalidate/flush for Wa_14014427904")
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23937>
Rohan Garg [Fri, 30 Jun 2023 09:30:50 +0000 (11:30 +0200)]
anv: use the WA infrastructure where possible when generating state
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23937>
Marek Olšák [Fri, 14 Jul 2023 21:12:57 +0000 (17:12 -0400)]
radeonsi: fix a CDNA regression breaking compute
reported internally
Fixes:
315231b5a519bdc14 - radeonsi: eliminate redundant compute SH register changes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24169>
Christian Gmeiner [Wed, 19 Jul 2023 11:55:13 +0000 (13:55 +0200)]
nir/print: print instr pass_flags
From time to time it can be helpful to "see" the pass_flags.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24234>
Yiwei Zhang [Wed, 19 Jul 2023 23:10:22 +0000 (23:10 +0000)]
turnip: flush cache for dstBuffer in vkCmdCopyQueryPoolResults
There can be other writes to the dstBuffer gated by proper barriers
beforehand.
TEST=dEQP-VK.pipeline.*.timestamp.* with Venus on Turnip
Fixes:
487aa807bd1b ("tu: Rewrite flushing to use barriers")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24245>
Alyssa Rosenzweig [Wed, 12 Jul 2023 15:06:00 +0000 (11:06 -0400)]
ir2: Switch to nir_legacy
Addresses a2xx portion of #9051.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24118>
Alyssa Rosenzweig [Thu, 20 Jul 2023 14:52:42 +0000 (10:52 -0400)]
asahi: Advertise Z16_UNORM
This works (on the downstream kernel, anyway).
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 28 Jun 2023 20:38:48 +0000 (16:38 -0400)]
asahi: Execute preambles for background programs
This will be useful when spilling render targets.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Thu, 15 Jun 2023 11:03:32 +0000 (07:03 -0400)]
asahi: Offset clear colour uniform by 4
Frees up u0_u1 for a bindless base address which will make render target
spilling easier to implement.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 28 Jun 2023 21:07:18 +0000 (17:07 -0400)]
asahi: Ignore spilled render targets for background load
Nothing to reload.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 28 Jun 2023 20:45:54 +0000 (16:45 -0400)]
asahi: Permit meta shaders to use preambles
Preambles are occassionally useful with background programs.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 28 Jun 2023 20:26:42 +0000 (16:26 -0400)]
asahi: Lower multisample image stores
These will be used for spilling multisampled render targets.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Tue, 18 Jul 2023 01:39:14 +0000 (21:39 -0400)]
asahi: Lower tilebuffer access for spilled RTs
Conceptually similar, we just don't have the tilebuffer available this time.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 14 Jun 2023 21:48:14 +0000 (17:48 -0400)]
asahi: Extract some tilebuffer lowering code
In prep for spilling. No functional change.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Fri, 23 Jun 2023 18:23:59 +0000 (14:23 -0400)]
asahi: Ignore spilled render targets with partial renders
Partial renders exist to the spill the tilebuffer to memory, there's nothing to
do if it's already spilled (and would just waste memory bandwidth and create a
feedback loop).
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 14 Jun 2023 21:42:01 +0000 (17:42 -0400)]
asahi: Ignore spilled render targets in EOT shaders
Regardless whether we implement Apple-style eMRT or something simpler, the EOT
shader isn't involved here.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 14 Jun 2023 21:53:38 +0000 (17:53 -0400)]
asahi: Do not support masking with spilled RTs
Extra complexity for this interaction, not worth it until we have an actual use
case IMHO.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Thu, 15 Jun 2023 11:05:39 +0000 (07:05 -0400)]
asahi: Add agx_tilebuffer_spills query
We can skip various work in the driver if we're not spilling render targets.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 14 Jun 2023 21:37:04 +0000 (17:37 -0400)]
asahi: Introduce concept of spilled render targets
To accommodate framebuffers which exceed tilebuffer limits, we'll need to spill
render targets to main memory. In effect, we need to emulate an immediate-mode
renderer for some render targets. This decision is made on a per-render target
basis. In our tilebuffer layout calculation, rather than asserting that all
render targets fit, introduce a notion of spilling.
This doesn't actually implement spilling -- it just pushes the assert failure
down to the users. But it's progress.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Fri, 23 Jun 2023 18:23:30 +0000 (14:23 -0400)]
asahi: Extract sampler_view_for_surface
We'll reuse this logic for the spilled RT case.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 28 Jun 2023 21:19:21 +0000 (17:19 -0400)]
agx: Plumb in coverage mask
This is internally used by the hardware when writing to the tilebuffer. We need
to use it externally to spill multisample render targets.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Thu, 15 Jun 2023 12:48:31 +0000 (08:48 -0400)]
agx: Require tag writes with side effects
Otherwise the fragment shader might be skipped entirely. (Possibly this is the
wrong approach to this though...)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Thu, 8 Jun 2023 15:11:22 +0000 (11:11 -0400)]
agx: Add simple image fencing pass
Minimum needed to pass CTS.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Thu, 8 Jun 2023 14:07:31 +0000 (10:07 -0400)]
agx: Implement fence_*_to_tex_agx intrinsics
We need these fencing intrinsics because our image caches aren't coherent with
memory. Furthermore, we need some sync intrinsics for imageblocks (which are
spicy images). These are a stub of what the final fragment shader interlock
implementation will look like, or what a real Metal-grade imageblock
implementation needs, but this is good enough for handling the sync requirements
with spilled render targets.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 7 Jun 2023 20:53:11 +0000 (16:53 -0400)]
agx: Don't emit silly barriers
Trust in the scoped_barrier.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 7 Jun 2023 18:21:19 +0000 (14:21 -0400)]
agx: Emit global memory barriers for images
This is part of image atomics, since those go through the regular memory path.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 7 Jun 2023 14:57:00 +0000 (10:57 -0400)]
agx: Implement image_load
Texture loads can be reordered freely but image loads can't be (since there
could be writes). Implement image_load natively to avoid subtle problems with
CSE and scheduling.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Thu, 8 Jun 2023 16:15:01 +0000 (12:15 -0400)]
agx: Extract texture write mask handling
image_load will share the logic.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 7 Jun 2023 15:04:40 +0000 (11:04 -0400)]
agx: Add image_load opcode
This is equivalent to texture_load but cannot be reordered, since it might be
writeable.
It also sets bit 43. This needs more investigation, but it fixes
KHR-GLES31.core.shader_image_load_store.basic-glsl-misc-fs. Some sort of cache
control bit.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 7 Jun 2023 20:14:13 +0000 (16:14 -0400)]
asahi,agx: Fix txf sampler
Bizarrely, the clamps/wrap modes are respected so we need to set them
appropriately for correct out-of-bounds behaviour (returning all zero). That in
turn means we can't use whatever sampler is already there, instead we need to
allocate a dedicated sampler just for txf. Good news is we have an extra sampler
state register available for the purpose.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Tue, 6 Jun 2023 23:26:02 +0000 (19:26 -0400)]
agx: Lower buffer images
Similar to buffer reads, we need to implement buffer images as 2D images with
fixed width and some lowering code.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Tue, 6 Jun 2023 23:25:18 +0000 (19:25 -0400)]
agx: Lower image atomics
Lower image atomics to texel address loads, and lower texel address loads to
arithmetic and descriptor reads. This implements image atomics.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Thu, 25 May 2023 21:33:39 +0000 (17:33 -0400)]
agx: Extract texture_descriptor_ptr_for_* helpers
For implementing image_texel_address, when there's no point in creating an
internal texture instruction just to lower immediately.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Tue, 6 Jun 2023 22:58:40 +0000 (18:58 -0400)]
agx: Extract coords_for_buffer_texture helper
The mapping of 1D -> 2D coordinates for indexing into buffer textures (lowered
to fixed-width 2D images) will be shared between both texture load and image
store code paths, so pull it out.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Tue, 6 Jun 2023 22:54:44 +0000 (18:54 -0400)]
agx: Add interleave opcode
We'll use it for texture atomics.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Tue, 30 May 2023 00:34:50 +0000 (20:34 -0400)]
agx: Handle early_fragment_tests
Simply doing nothing fixes
dEQP-GLES31.functional.image_load_store.early_fragment_tests.*. However, we need
to actually insert the sample_mask instruction to make sure the shader runs at
all (I think), doing that fixes:
KHR-GLES31.core.shader_image_load_store.basic-glsl-earlyFragTests
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Mon, 29 May 2023 23:30:16 +0000 (19:30 -0400)]
agx: Implement image barriers
Or cache flushes or whatever these actually are. Probably could be optimized
once we understand what the 4 individual instructions are actually doing. Fixes
dEQP-GLES31.functional.image_load_store.2d.qualifiers.*.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Tue, 30 May 2023 02:51:29 +0000 (22:51 -0400)]
agx: Wait for outstanding stores before barriers
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 31 May 2023 00:16:07 +0000 (20:16 -0400)]
agx: Handle frag side effects without render targets
We still need to insert our lowering code, though this case could probably be
optimized somehow. Fixes a massive number of KHR-GLES3 and KHR-GLES31 tests,
including
KHR-GLES31.core.shader_atomic_counters.advanced-usage-many-draw-calls2 and lots
of PBO tests.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Fri, 19 May 2023 17:08:13 +0000 (13:08 -0400)]
agx: Translate image_store from NIR
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Sat, 20 May 2023 17:44:37 +0000 (13:44 -0400)]
agx: Translate texture bindless handles
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Sat, 20 May 2023 17:46:50 +0000 (13:46 -0400)]
agx: Pack bindless textures
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Thu, 25 May 2023 18:22:40 +0000 (14:22 -0400)]
agx: Handle bindless properly for txs lowering
When I wrote this pass I mostly guessed what our bindless handles would look
like. Now that we know we can do it right.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Sat, 20 May 2023 17:36:10 +0000 (13:36 -0400)]
agx: Model texture bindless base
Extra source we need to implement bindless.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Fri, 19 May 2023 17:07:52 +0000 (13:07 -0400)]
agx: Add image write instruction
Model and pack what's in the hardware for this.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Fri, 19 May 2023 17:06:41 +0000 (13:06 -0400)]
agx: Generalize texture/PBE packing
For the generic image write instruction we'll want the full forms of these
fields.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Thu, 25 May 2023 20:51:20 +0000 (16:51 -0400)]
agx: Lower image size to txs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Thu, 25 May 2023 19:01:22 +0000 (15:01 -0400)]
agx: Legalize image LODs to be 16-bit
Required by the hardware. Do it in NIR so we can optimize the conversion.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Tue, 27 Jun 2023 22:33:57 +0000 (18:33 -0400)]
asahi: Use nir_lower_robust_access
This makes images robust as required by the OpenGL ES spec.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 28 Jun 2023 19:43:22 +0000 (15:43 -0400)]
asahi: Extend PBE packing for image support
We need to support arrayed images and sRGB images, which are hardware. For
atomics, we need to pack the augmented software data structure. Finally, we need
to support buffer images. Like their texture counterparts, these get lowered to
2D images.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
Alyssa Rosenzweig [Wed, 28 Jun 2023 19:39:57 +0000 (15:39 -0400)]
asahi: Augment PBE descriptor for software access
For implementing image atomics (and multisample image writes), we need
information about the image layout in the shader. It's a lot nicer to determine
the image layouts on the CPU (where we have ail) and stash the results in the
PBE descriptor, where we have a convenient hole to do so, rather than trying to
do all the layout calculations on the GPU on the fly. Add a data structure that
the driver will fill out and the image atomic lowering will consider as part of
the hardware.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>