Commit graph

191147 commits

Author SHA1 Message Date
Erik Faye-Lund
aa59841b64 docs: renderpass -> render pass
This is how it's written in the Vulkan spec, let's follow that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
a98b2f7ee6 docs: gpu -> GPU
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
3090041a21 docs: cpu -> CPU
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
e888049e11 docs: ssbo/ubo -> SSBO/UBO
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
14c6c07124 docs: Nvidia -> NVIDIA
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
4342f92c5a docs: google -> Google
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
d1469294c2 docs: utrace -> trace
This is u_trace, not utrace. But it's clear from context that a "trace
marker" here means an u_trace marker, so let's just remove the needless
"u"-prefix.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
60f78b2d00 docs: remove apostrophe from uppercased
According to the Merriam-Webster Dictionary, this is the correct way
to spell this word.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
cf29440b2c docs: sommelier -> Sommelier
This is a proper noun, and should be upper cased here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
3f58be056d docs: nabled -> enabled
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
1b317b4a72 docs: url -> URL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
c1cb32ffec docs: eg. -> e.g.
This is how we spell it elsewhere.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
9967df63df docs: unify spelling of front/back-facing
We spell these with a dash elsewhere in the docs, let's be consistent.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
e2d94263d5 docs: mooth -> smooth
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:27 +00:00
Erik Faye-Lund
d8f589b57a docs: hw -> HW
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:26 +00:00
Erik Faye-Lund
897e9d806f docs: tgsi -> TGSI
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:26 +00:00
Erik Faye-Lund
498b2af1c7 docs: Anv -> ANV
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:26 +00:00
Erik Faye-Lund
e7b194834d docs: zink -> Zink
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:26 +00:00
Erik Faye-Lund
f7ed909761 docs: edgeflag -> edge flag
This is how we usually spell it, and also how the OpenGL specification
spells it. Let's be consistent.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29879>
2024-06-25 10:51:26 +00:00
Marek Olšák
932e8c7768 ac/nir/cdna: don't use image_descriptor intrinsics if the src is a descriptor
Fixes: 30af861bff - radeonsi: restructure (rewrite) the compute blit shader

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29852>
2024-06-25 10:09:08 +00:00
Marek Olšák
8023e89d11 ac/nir/cdna: ignore image_descriptor intrinsics
Fixes: 30af861bff - radeonsi: restructure (rewrite) the compute blit shader

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29852>
2024-06-25 10:09:08 +00:00
Marek Olšák
fec0a9fcdf ac/nir/cdna: allow 16-bit coordinates
This can occur with the new compute blit shader.

Fixes: 30af861bff - radeonsi: restructure (rewrite) the compute blit shader

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29852>
2024-06-25 10:09:07 +00:00
Samuel Pitoiset
ee2400acf1 ac/parse_ib: dump PKT3_DISPATCH_{TASKMESH_GFX,TASKMESH_DIRECT_ACE}
Useful for inspecting command buffers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29821>
2024-06-25 09:20:48 +00:00
Yiwei Zhang
c4b30b604f venus: support VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 8
The aliased WSI image creation path is very much like the AHB case. It's
also the same with the deferred ANB binding path to support
VK_EXT_swapchain_maintenance1. Drop the cap as mesa currently only
supports up to spec version 8 because the later versions haven't been
upstreamed to the Vulkan registry yet.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29864>
2024-06-25 09:08:12 +00:00
Yiwei Zhang
9420e90dfb venus: refactor to add vn_android_image_from_anb_internal
This changes splits the anb image creation and anb memory import out to
be prepared for later aliased anb image bind.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29864>
2024-06-25 09:08:11 +00:00
Yiwei Zhang
f2c1931010 venus: refactor vn_android_image_from_anb
Drop redundant codes. Add sufficient error logs on the wsi image
creation path.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29864>
2024-06-25 09:08:11 +00:00
Samuel Pitoiset
4db32ac7ef radv/amdgpu: use the non-IB path for dumping CS with external IBs
Only the first CS chunk was dumped, but this allows to dump CS that
are post the DGC execute IB when on compute queue.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29832>
2024-06-25 07:24:50 +00:00
Daniel Lundqvist
3274af99bf radeonsi: Fix unused variable when LLVM is not used for AMD.
use_aco is only used when define AMD_LLVM_AVAILABLE is set. Inline
it into its only user.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29862>
2024-06-25 03:45:16 +00:00
Kenneth Graunke
5cb15a6c67 intel/brw: Make bld.ADD(x, 0) emit no instructions and return x directly
There are a lot of places where we add 0 to an offset.  Avoiding
generating this can save us algebraic + copy_propagation later.

Cuts compile time in Borderlands 3 by -0.590631% +/- 0.170108% (n=25).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29849>
2024-06-24 19:12:21 -07:00
Kenneth Graunke
068865ce81 intel/brw: Make an alu2 builder helper
Instead of replicating the whole thing in macros, just make an alu2()
function and use that in the wrappers.  It ought to get inlined anyway.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29849>
2024-06-24 19:12:19 -07:00
Kenneth Graunke
c18de3f048 intel/brw: Delay liveness calculations in saturate propagation
Wait and see if we actually have a candidate for saturate propagation
before requesting liveness info.  Saves the calculation in the case
where we have nothing to do.

Cuts compile time in Borderlands 3 by -0.304754% +/- 0.194162% (n=25).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29849>
2024-06-24 19:12:00 -07:00
Karol Herbst
47b1241251 rusticl/queue: run rustfmt
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29880>
2024-06-25 01:39:46 +00:00
Karol Herbst
9d458b7fc1 rusticl/queue: gracefully stop the worker thread
Ohterwise we might get caught up in memory corruptions I still have no
explanation for.

Fixes spontanous crashes with radeonsi and the OpenCL CTS.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29880>
2024-06-25 01:39:46 +00:00
Timothy Arceri
539aaad6a3 glsl: remove unused symbol table functionality
Added in a8f52647b0 and c17c790387 but not used since b04ef3c08a
over 10 years ago.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29868>
2024-06-25 00:18:42 +00:00
Dave Airlie
6ebc94250c gallivm: split out generating LLVM Mattrs
This will be reused in the orc jit

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29869>
2024-06-25 09:35:28 +10:00
Dave Airlie
76e2ceb8f8 gallivm: export target init code for orc-jit to reuse
It doesn't need the wrapper since it already has a singleton

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29869>
2024-06-25 09:35:28 +10:00
Dave Airlie
1f4268b53e gallivm: make lp_bld_coro.h c++ include safe.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29869>
2024-06-25 09:35:28 +10:00
Dave Airlie
63d2bb103a gallivm: split some code out from init module.
In order to introduce orc some code should be split out where
it can be reused.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29869>
2024-06-25 09:35:28 +10:00
Dave Airlie
05dd12b9a5 gallivm: move ppc denorm disable to inline
This just puts it out of the way

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29869>
2024-06-25 09:35:28 +10:00
Rhys Perry
17f2ebe8d2 aco: use 1.5x vgprs for gfx1151 and gfx12
From LLVM.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29839>
2024-06-24 18:39:40 +00:00
Paulo Zanoni
41a95d0b13 anv/sparse: use ANV_SPARSE_BLOCK_SIZE instead of tile_size when possible
When I wrote sparse resources support for Anv we didn't have TileYs
support so I made non-opaque binds work even for non-standard block
shapes, which meant the block size could be either 64k or 4k. Since
then we merged TileYs support and changed our sparse resources
implementation to treat all the non-standard block shape cases as
"everything is the miptail", which means non-opaque binds are not
possible. So here we adjust the code to more explicitly represent
that.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29337>
2024-06-24 17:54:30 +00:00
Paulo Zanoni
8271e12b8e anv/sparse: unify and rework tile size calculation
There are 3 different places in our code where we calculate the tile
size and until recently the 3 implementations were different and with
slight bugs. Unify everything and also change the calculation to use
tile_info->phys_extent_B.

While doing this we move the isl_surf_get_tile_info() calls from
anv_sparse_calc_block_shape() to its callers so we total amount of
times we call it doesn't change.

v2: Adjust the patch now that tile_info is not part of isl_surf
anymore.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29337>
2024-06-24 17:54:30 +00:00
Paulo Zanoni
2ac35116d1 anv/sparse: remove obsolete linear tiling code path
The code that tries to create a "pretend block shape" for linear
tiling surfaces was necessary back when we were going to support
sparse residency (non-opaque binds) for non-standard block shapes
(since there was uncertainty about TileYs support). That hasn't been
the case since before we merged sparse resources upstream, so remove
the code and leave an assertion instead, just in case.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29337>
2024-06-24 17:54:30 +00:00
Paulo Zanoni
2f65acfbb8 anv/sparse: fix TR-TT page table bo size and flags
Since commit 18d8c3ca33 we were allocating a little more than what
we were actually using (2621440 bytes instead of 2097152, aka 0x280000
instead of 0x200000), and we were not properly marking the BO as
internal. No applications should be misbehaving because of this.

Fixes: 18d8c3ca33 ("anv: Add missing ANV_BO_ALLOC_INTERNAL")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29337>
2024-06-24 17:54:30 +00:00
Paulo Zanoni
23e91fdd64 anv/sparse: dump info about opaque binds when DEBUG_SPARSE
I've found myself adding this piece of code to our codebase when
debugging some Zink sparse failures recently, so let's upstream it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29337>
2024-06-24 17:54:30 +00:00
Paulo Zanoni
49504ab857 intel/isl: pass struct isl_tile_info to choose_image_alignment_el()
Pass struct isl_tile_info to isl_choose_image_alignment_el() and its
subfunctions. We already compute isl_tile_info at isl_surf_init_s(),
don't make the subfunctions compute it again, just reuse the results.
Other subfunctions of isl_surf_init_s() also take the tile info as an
argument instead of recomputing it.

v2: Rebase after the gen20 version was added.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> (v2)
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29337>
2024-06-24 17:54:30 +00:00
Paulo Zanoni
6a6d449a1d anv/sparse: fix reporting of VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT
This calculation was wrong for both compressed formats and
multi-sampled images. As a result, we misreported the image as having
a single miptail.

No Vulkan or GL CTS tests were tripping on this bug. I found this
while looking for tile size calculations after fixing a similar bug
elsewhere in the code.

The calculation should now match what we have in
anv_sparse_bind_image_memory(), which is widely tested.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29337>
2024-06-24 17:54:30 +00:00
Paulo Zanoni
789b53c523 anv/sparse: fix the image property sizes for multi-sampled images
We have to take the number of samples into account when calculating
the tile size. If we don't do this, multi-sampled images may end up
falling in the "goto out_everything_is_miptail" case, while in reality
multi-sampled images don't even have miptails.

Also assert that the value is one of the only two values we expect
this to be. This assert would have been useful to catch this issue,
since with multi-sampled images we were getting values like 16k or 32k
depending on the number of samples.

This helps move forward progress in some Zink tests, but does not
make them fully pass yet, as those tests are full of sub-cases and
this only helps some of them:
  KHR-GL46.sparse_texture2_tests.UncommittedRegionsAccess
  KHR-GL46.sparse_texture2_tests.SparseTexture2Commitment
  KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup

Fixes: 7ef3d652b2 ("anv/sparse: enable MSAA for Sparse when applicable")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29337>
2024-06-24 17:54:30 +00:00
Paulo Zanoni
5c18ccd2d3 anv/sparse: reject 1D sparse residency images
The Vulkan spec splits sparse resources in two different features:
sparse binding and sparse residency.

Sparse binding is much simpler. It requires the resources to be fully
bound before being used and it treats them as a black box. We're
required to support sparse binding for all the formats that are
supported by non-sparse, but that's easy beacause this feature is
simpler.

Now sparse residency is the one where we're allowed to partially bind
resources, and the one that comes with more complicated features such
as block shapes and non-opaque binding of images. This feature is
subdivided into:
  - sparseResidencyBuffer
  - sparseResidencyImage2D
  - sparseResidencyImage3D
  - sparseResidency{2,4,8,16}Samples (which refers to 2D images)

Notice that there's no sparseResidencyImage1D. And if you read the
specs it's clear that sparse residency is meant for non-1D images.
Still, supporting it didn't require any extra effort in Anv so we just
did it.

That's until we started running GL CTS tests on Zink. There's a CTS
test that checks for the standard block shapes. It creates 1D images
and expects the block shapes for them to be the standard 2D block
shapes. While we could very well just patch
anv_sparse_calc_image_format_properties() to return the standard 2D
block shapes for 1D images, that's just wrong (block shapes for 1D
images are just line segments, not rectangles!) so let's just reject
this all until maybe one day Vulkan defines sparseResidencyImage1D and
we get GL_ARB_sparse_texture3 to match it, or somebody decides to
change the GL CTS test.

Testcase: KHR-GL46.sparse_texture2_tests.StandardPageSizesTestCase
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29337>
2024-06-24 17:54:30 +00:00
Zack Middleton
21d3eacd23 gles1: fix glBufferSubData()
InternalBufferSubDataCopyMESA is required for
PIPE_CAP_ALLOW_GLTHREAD_BUFFER_SUBDATA_OPT.

Signed-off-by: Zack Middleton <zack@cloemail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29795>
2024-06-24 17:08:12 +00:00