Samuel Pitoiset [Fri, 18 Nov 2022 08:50:40 +0000 (09:50 +0100)]
radv: re-emit dynamic depth clamp enable if depth clip enable changed
The depth clamp mode depends on depth clip enable/disable.
Fixes:
e48c0fbd8f7 ("radv: add support for dynamic depth clamp enable")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19843>
Lionel Landwerlin [Wed, 23 Nov 2022 10:02:41 +0000 (12:02 +0200)]
anv: use the anv_state_pool address helper more
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19983>
Iago Toral Quiroga [Thu, 24 Nov 2022 12:47:40 +0000 (13:47 +0100)]
v3dv: allocate copy query pipelines lazily
Instead of creating all 8 pipeline combinations when we initialize
the device we create the pipelines when we need to use them. This
is probably better because applications are likely to always use
the same flags for the copy command, which means that only one
pipeline may be required.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19981>
Samuel Pitoiset [Thu, 24 Nov 2022 07:20:39 +0000 (08:20 +0100)]
radv: fix memleak with link time optimizations and GPL
Do not clone the NIR when the driver retains NIR shaders because it
exits early, otherwise stage->nir will never be freed.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7768
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19973>
Erik Faye-Lund [Tue, 15 Nov 2022 15:04:29 +0000 (16:04 +0100)]
docs/zink: update query requirements
These features are no longer required.
Reviewed-by: Soroush Kashani <soroush.kashani@imgtec.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19750>
Erik Faye-Lund [Tue, 22 Nov 2022 11:43:24 +0000 (12:43 +0100)]
mesa: do not require optional queries
The OpenGL specifications explicitly calls out these queries as allowing
zero bits, so these features aren't actually required to bump the OpenGL
version.
While we could in theory also enable the corresponding extensions
unconditionally, this risks breaking applications that assume that the
presence of the extensions are sufficient to use meaningfully use them,
like is the case with most other OpenGL extensions.
However, blocking more recent GL versions due to this seems like a bit
of an overreaction. So let's allow new OpenGL versions, but not the
extensions themselves.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Soroush Kashani <soroush.kashani@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19750>
Erik Faye-Lund [Tue, 15 Nov 2022 12:18:16 +0000 (13:18 +0100)]
mesa: support dummy queries for ARB_pipeline_statistics_query
Similar to ARB_occlusion_query / ARB_occlusion_query2, this extension
allows zero bits for the queries, meaning there's no actual hardware
requirements here.
So let's just report zero bits if the driver doesn't support the CAP,
and treat these queries as dummies like we already do for occlusion
queries.
We still don't expose the extension, this is just to make it possible to
allow the core OpenGL functionality without exposing the extension.
Reviewed-by: Soroush Kashani <soroush.kashani@imgtec.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19750>
Erik Faye-Lund [Tue, 15 Nov 2022 14:41:22 +0000 (15:41 +0100)]
mesa: treat unsupported queries as dummies
It's legal in OpenGL to start a query even if the result will have zero
valid bits. It's not enough to just report zero bits, We need to also
prevent calling down into the driver with these invalid queries.
Because ARB_ES3_compatibility adds ANY_SAMPLES_PASSED and
ANY_SAMPLES_PASSED_CONSERVATIVE to the set of queries that support zero
bits, we also need to check for the corresponding indices.
Fixes:
0186e9e1c51 ("mesa: always support occlusion queries")
Reviewed-by: Soroush Kashani <soroush.kashani@imgtec.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19750>
Marek Olšák [Wed, 23 Nov 2022 17:17:17 +0000 (12:17 -0500)]
st/vdpau: fix interop with GL
Fixes:
e00bb6cb98b - mesa/st: use tracked samplerview swizzle values
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7751
Tested-By: Veerabadhran.Gopalakrishnan@amd.com
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19961>
Alyssa Rosenzweig [Thu, 24 Nov 2022 23:18:42 +0000 (18:18 -0500)]
panfrost: Revert "Require 64-byte alignment on imports"
This reverts commit
811f8a19469722bea32f3c539b8cf0939fe3b057. As Alpine put it
-- this is causing more problems than it's fixing. Hotfix to revert the
offending commit until a more measured fix can be implemented.
Closes: #7731
Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-by: Jan Palus
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19993>
Alyssa Rosenzweig [Tue, 22 Nov 2022 00:31:37 +0000 (19:31 -0500)]
agx: Use default SHAREABLE_SHADERS
No need to set this explicitly, u_default does it for us.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19971>
Alyssa Rosenzweig [Sun, 20 Nov 2022 14:40:15 +0000 (09:40 -0500)]
agx: Fix signedness issues packing
UBSan complains otherwise:
../src/asahi/compiler/agx_pack.c:701:21: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
../src/asahi/compiler/agx_pack.c:534:18: runtime error: left shift of 8 by 28 places cannot be represented in type 'int'
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19971>
Alyssa Rosenzweig [Sat, 19 Nov 2022 22:37:25 +0000 (17:37 -0500)]
agx: Handle vertex shaders that use <= 8 halfregs
r5 and r6 are always getting lowered. Will prevent a regression with VBO
lowering on a shader which has stride=0 and hence gets the vertex ID read
optimized out with NIR:
dEQP-GLES2.functional.draw.random.50
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19971>
Alyssa Rosenzweig [Sat, 19 Nov 2022 21:43:19 +0000 (16:43 -0500)]
agx: Try to align sources of pack_64_2x32_split
Helps with coalescing the pack.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19971>
Alyssa Rosenzweig [Sat, 19 Nov 2022 20:07:52 +0000 (15:07 -0500)]
agx: Implement nir_op_pack_64_2x32_split
This maps to a collect where the dest size is 64 and the src size is 32.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19971>
Alyssa Rosenzweig [Mon, 21 Nov 2022 04:06:45 +0000 (23:06 -0500)]
asahi: Allocate smaller scissor/zbias arrays
Don't waste 1MB per batch for descriptors that may be completely unused.
Instead, upload the scissor and depth bias arrays at submit time. This is a
simple solution to a silly problem: we can't grow the scissor/depth bias arrays,
and we don't know how big they will be at draw time. We could...
1. Statically allocate large buffers? Waste lots of memory.
2. Statically allocate small buffers? Forces too much flushing.
3. Dynamically allocate a growable GPU buffer? Requires either reading
back write-combined memory contents, or maintaining a CPU copy in
addition to extra GPU copies, or doing complicated MMU shenanigans.
The first two options are slow and the last is complicated.
Instead, we upload these descriptors to a dynamically allocated CPU-side which
gets copied just once to the GPU at submit-time when the exact size is known,
minimizing wasted memory and copies and avoiding any unnecessary flushing or WC
memory reads.
In addition, this patch makes sure we flush if we would overflow with more than
65535 scissor descriptors in a batch. This is a (minor) bug fix.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19971>
Alyssa Rosenzweig [Mon, 21 Nov 2022 03:50:35 +0000 (22:50 -0500)]
asahi: Allocate/free batch BOs as needed
Rather than hanging onto them across batches. This lets us free these BOs if the
number of batches shrinks, which is pretty common if all 32 batches are used
during a loading screen for glGenerateMipmap() and then the in-game portion
drops to 1 or 2 batches only. Now that we have the BO cache wired up, this
should not adversely affect performance.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19971>
Alyssa Rosenzweig [Fri, 17 Jun 2022 02:27:47 +0000 (22:27 -0400)]
asahi: Copy panfrost's bo cache
Massive performance gains, some fps before/after numbers from glmark2:
[shading] 1486 -> 2391
[refract] 87 -> 127
[terrain] 32 -> 56
...and it's basically for free with enough copy/paste, so thank you to Boris
Brezillon for an excellent Asahi patch, the LRU cache seems to work great on M1
:-p
There are a few minor changes I made from panfrost, notably adjusting the
constants to account for 16KiB pages and switching from pthread_mutex to
simple_mtx to be less weird in Mesa.
For context on the design, the following commits evolved it in Panfrost and
their commit messages may be useful... The logic in this module is the product
of years of mistakes and correcting course :-)
f06809cdcaf ("panfrost: Evict the BO cache when allocation fails")
77d04989135 ("panfrost: Fix major flaw in BO cache")
ee82f9f07e1 ("panfrost: Try to evict unused BOs from the cache")
2225383af8b ("panfrost: Make sure the BO is 'ready' when picked from the cache")
9af4aeaaf7c ("panfrost: Don't return imported/exported BOs to the cache")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19971>
Alyssa Rosenzweig [Mon, 21 Nov 2022 03:02:16 +0000 (22:02 -0500)]
asahi: Stop aligning pool allocations to 4KiB
This defeats the point of specifying alignments and of packing allocations
together with the BO cache. We're a real driver now, let's allocate memory like
one.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19971>
Alyssa Rosenzweig [Sun, 20 Nov 2022 23:35:18 +0000 (18:35 -0500)]
asahi: Label BOs internally
This will help debugging memory usage problems.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19971>
David Heidelberg [Tue, 22 Nov 2022 17:56:20 +0000 (18:56 +0100)]
ci/alpine: bump to 3.17, new GCC 12 and LLVM 15
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19959>
David Heidelberg [Wed, 23 Nov 2022 16:38:49 +0000 (17:38 +0100)]
ci/alpine: enable Mold linker
Alpine has Mold 1.7.1 in the repository.
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19959>
Martin Roukala (né Peres) [Thu, 24 Nov 2022 13:01:54 +0000 (15:01 +0200)]
radv/ci: do not create jobs that will fail outside of mesa's namespace
Mirror what is done for the freedreno project and do not allow manual
execution of jobs that require restricted access to a CI farm.
This fixes pushing new branches with non-radv-related changes.
Fixes: #7773
Reported-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19984>
Italo Nicola [Fri, 18 Nov 2022 17:38:12 +0000 (14:38 -0300)]
hud: add GALLIUM_HUD_ROTATION option
The user can use GALLIUM_HUD_ROTATION={0,90,180,270} to rotate the hud
by the specified amount.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19854>
Timur Kristóf [Wed, 23 Nov 2022 23:22:37 +0000 (00:22 +0100)]
ac/nir: Avoid data race with task shader payloads.
Device memory scope is necessary because we need to ensure there is
always a waitcnt_vscnt instruction in order to avoid a race condition
between payload stores and their loads after mesh shaders launch.
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/19967>
Erik Faye-Lund [Wed, 16 Nov 2022 11:49:27 +0000 (12:49 +0100)]
docs/zink: add missing required device-feature
Seems I forgot to add this to the list of required features.
Fixes:
eb0195358c4 ("zink: only inspect dual-src limit if feature enabled")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>
Erik Faye-Lund [Wed, 16 Nov 2022 11:55:26 +0000 (12:55 +0100)]
zink: update textureCompressionBC requirement
The mesa state-tracker can now emulate all formats indicated by this
feature-flag, so we don't require this for OpenGL 4.2 any more.
It's however a good idea to support for power-usage and performance
reasons, saving on memory bandwidth. So let's move it to the
gl46_optimal block instead.
Fixes:
e4ff42684b9 ("mesa/st: enable bptc extension with fallback")
Fixes:
2ea481b2f0a ("Zink: add Zink profiles file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>
Erik Faye-Lund [Wed, 16 Nov 2022 11:53:57 +0000 (12:53 +0100)]
zink: fix incorrect requirements
These were in the wrong list all along.
Fixes:
a466c2a7839 ("zink: check for stores and atomics features")
Fixes:
2644835f039 ("zink: add missing required feature")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>
Erik Faye-Lund [Wed, 16 Nov 2022 11:41:07 +0000 (12:41 +0100)]
zink: remove needless requirements
We never required the uniform texel buffer bit for more than
bufferFeatures for a bunch of these formats.
Similarly, we *don't* need the uniform texel buffer bit for sampled
image access.
For the image-dimensions, the Mesa frontend doesn't validate the max 1D,
3D or Cube sizes, nor the max texture layers. So we'll expose GL 4.1
without these, even if that's not conformant.
Finally, we don't require robustImageAccess2 for OpenGL 4.3 at all. All
we need is the robustBufferAccess feature.
Fixes:
2ea481b2f0a ("Zink: add Zink profiles file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>
Erik Faye-Lund [Wed, 16 Nov 2022 11:23:45 +0000 (12:23 +0100)]
zink: fix json-errors in profile-file
There's some stray commas here, let's get rid of them.
Fixes:
2ea481b2f0a ("Zink: add Zink profiles file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>
Iago Toral Quiroga [Mon, 21 Nov 2022 07:36:28 +0000 (08:36 +0100)]
v3dv: specialize query copy pipelines
Instead of having one shader that checks the various flags and emits
conditional code, create specialized pipelines for each relevant
combination of flags values so we can produce more optimized
pipelines with less conditional code for each scenario.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19770>
Iago Toral Quiroga [Tue, 15 Nov 2022 12:47:07 +0000 (13:47 +0100)]
v3dv: allocate one BO for both occlusion results and availability
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19770>
Iago Toral Quiroga [Fri, 28 Oct 2022 10:07:07 +0000 (12:07 +0200)]
v3dv: reimplement occlusion queries
Our implementation was mostly CPU-based, with things such as query
resets and result copying handled in the CPU, as well as some aspects
of query availability tracking.
This new implementation handles all GPU-side query functions by
dispatching compute shaders to push the work to the GPU. This
involves query availability, reset and result copying.
For now, only occlusion queries are managed this way. Performance
queries can also be implemented in a similar fashion in the future
with some additional work, however, for timestamp queries our only
option to improve this would be to execute the actual timestamp in the
kernel, since we can't take a timestamp from a shader.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19770>
Iago Toral Quiroga [Fri, 28 Oct 2022 10:29:06 +0000 (12:29 +0200)]
v3dv: add a helper to create compute pipelines from nir
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19770>
Iago Toral Quiroga [Tue, 15 Nov 2022 13:20:31 +0000 (14:20 +0100)]
v3dv: reset pending cpu job state once processed
If we have any pending jobs queued in the command buffer state
to be emitted at the end of a given job, make sure we reset
that state once these have been processed.
cc: mesa-table
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19770>
Erik Faye-Lund [Thu, 24 Nov 2022 08:55:20 +0000 (08:55 +0000)]
Apply 1 suggestion(s) to 1 file(s)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19974>
Lionel Landwerlin [Thu, 24 Nov 2022 08:30:50 +0000 (10:30 +0200)]
docs/perfetto: update section about vulkan app tracing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
18e820009d6 ("common/utrace: Refactor and combine all envvars into `GPU_TRACES`")
Fixes:
8370a0d6bfc ("common/utrace: Prefix all environment variables with `MESA_`")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19974>
Filip Gawin [Sat, 12 Nov 2022 13:33:59 +0000 (14:33 +0100)]
r300: fix r300_max_vertex_count
(seems like we counted size twice)
Helps with:
dEQP-GLES2.functional.draw.draw_elements.points.single_attribute
dEQP-GLES2.functional.draw.draw_elements.points.multiple_attributes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19703>
Samuel Pitoiset [Tue, 22 Nov 2022 16:11:41 +0000 (17:11 +0100)]
zink/ci: mark the two remaining GLES3 failures as CTS test bug
This means Zink/RADV could be conformant against GLES3!
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7395
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19932>
Martin Roukala (né Peres) [Wed, 23 Nov 2022 11:58:28 +0000 (13:58 +0200)]
radv/ci: don't download back the vkd3d-proton.cache files
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19930>
Martin Roukala (né Peres) [Wed, 23 Nov 2022 10:34:59 +0000 (12:34 +0200)]
radv/ci: set B2C_JOB_VOLUME_EXCLUSIONS in all jobs
This will also speed up the execution time of non-vkcts jobs.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19930>
Martin Roukala (né Peres) [Tue, 22 Nov 2022 14:23:56 +0000 (16:23 +0200)]
radv/ci: do not sync back the install folder
When a job is over, we download back all the files generated by the
job. This however includes the mesa install/ folder which is close
to 1G in size.
This commit adds the install/ folder to the exclusion list for the
volume mirroring.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19930>
Martin Roukala (né Peres) [Tue, 22 Nov 2022 14:41:26 +0000 (16:41 +0200)]
radv/ci: run test automatically only for the mesa namespace
The Valve CI Farm uses allow lists for projects/users to prevent abuse,
so only enable automatic testing when running in the context of Mesa to
prevent failures in forks.
Suggested-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19930>
Yonggang Luo [Fri, 18 Nov 2022 19:10:40 +0000 (03:10 +0800)]
util: Remove unused WIN32 and MSVC related staff in p_compiler.h
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/19918>
Yonggang Luo [Fri, 18 Nov 2022 23:37:03 +0000 (07:37 +0800)]
util: Rename PIPE_CDECL to UTIL_CDECL and moved into util/macros.h
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/19918>
Yonggang Luo [Fri, 18 Nov 2022 23:34:59 +0000 (07:34 +0800)]
util: Move EXCLUSIVE_CACHELINE and CACHE_LINE_SIZE macros into u_memory.h
They are coupled with MALLOC_STRUCT_CL, so move them into a single place and accessed consistently
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/19918>
Yonggang Luo [Tue, 22 Nov 2022 05:11:42 +0000 (13:11 +0800)]
util: Remove the latest PIPE_ALIGN_VAR in p_compiler.h
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/19918>
Yonggang Luo [Tue, 22 Nov 2022 10:24:54 +0000 (18:24 +0800)]
clover: Fixes -Wundef in memory.cpp
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>
Yonggang Luo [Tue, 22 Nov 2022 10:24:26 +0000 (18:24 +0800)]
gallium: Fixes -Wundef in draw_gs.c
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>
Yonggang Luo [Tue, 22 Nov 2022 10:23:31 +0000 (18:23 +0800)]
util: Fixes -Wundef in u_debug_stack_test.cpp
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>
Yonggang Luo [Tue, 22 Nov 2022 10:23:01 +0000 (18:23 +0800)]
util: Fixes -Wundef in u_qsort.h
Partial of: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7680
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>
Yonggang Luo [Tue, 22 Nov 2022 10:01:23 +0000 (18:01 +0800)]
mesa: Fixes -Wundef in arbprogparse.c
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>
Yonggang Luo [Tue, 22 Nov 2022 10:01:07 +0000 (18:01 +0800)]
util: Fixes -Wundef in util/compiler.h
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>
Yonggang Luo [Tue, 22 Nov 2022 09:46:12 +0000 (17:46 +0800)]
gallivm: use valid LLVM_VERSION_MAJOR instead of LLVM_VERSION
Partial of: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7680
Fixes:
203920d4c69 ("gallivm: add atomic 32-bit float support")
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>
Yonggang Luo [Fri, 4 Nov 2022 07:13:28 +0000 (15:13 +0800)]
r600: Fixes -Werror,-Wunused-but-set-variable for clang-15
one of the error messages:
../../src/gallium/drivers/r600/r600_asm.c:2528:8: error: variable 'o' set but not used [-Werror,-Wunused-but-set-variable]
int o = 0;
^
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19969>
Yonggang Luo [Fri, 4 Nov 2022 11:30:12 +0000 (19:30 +0800)]
aco: Fixes -Werror,-Wbitwise-instead-of-logical for clang-15 in aco_optimizer.cpp
error message:
error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19969>
Yonggang Luo [Fri, 4 Nov 2022 12:51:40 +0000 (20:51 +0800)]
mesa: fixes -Werror,-Wunused-but-set-variable for clang-15 in program_parse.y
error message:
src/mesa/program/program_parse.tab.c:1952:9: error: variable 'yynerrs' set but not used [-Werror,-Wunused-but-set-variable]
int yynerrs = 0;
^
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/19969>
Yonggang Luo [Tue, 22 Nov 2022 13:00:01 +0000 (21:00 +0800)]
mesa: indent fixes after replace tab with 3 space by find and replace in program/program_parse.y
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/19969>
Yonggang Luo [Tue, 22 Nov 2022 16:04:14 +0000 (00:04 +0800)]
mesa: replace tab with 3 space in mesa/program/program_parse.y by tools
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/19969>
Thomas Debesse [Thu, 3 Nov 2022 10:16:45 +0000 (11:16 +0100)]
rusticl: print missing context features
Signed-off-by: Thomas Debesse <dev@illwieckz.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19498>
Alyssa Rosenzweig [Tue, 15 Nov 2022 19:12:06 +0000 (14:12 -0500)]
meson: Don't depend on expat for !use_xmlconfig
If we don't use xmlconfig, expat becomes an optional dependency on
Linux/BSD, which may be convenient for embedded systems that do not
otherwise need expat. (expat is so ubiquitous that this
probably doesn't matter a ton in practice, but fewer required Mesa deps
is probably nice anyway.)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>
Alyssa Rosenzweig [Wed, 9 Nov 2022 20:50:03 +0000 (15:50 -0500)]
util: Gate installing drirc on use_xmlconfig
Pointless otherwise. This should shrink the on-disk size of the Android and
Windows builds slightly, but I have not tested this.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>
Alyssa Rosenzweig [Wed, 9 Nov 2022 19:30:31 +0000 (14:30 -0500)]
util: Add xmlconfig build option
On embedded Linux, we can hardcode the driconf file (00-mesa-defaults.conf) with
no possibility of the file changing after the build. The static driconf
implementation, used on Windows and Android, suffices for that use case. It is
undesireable for these platforms to depend on expat or to spend time during app
start-up parsing driconf XML.
We already have the static driconf implemented, all we need is a meson option to
opt-out of runtime xmlconfig on Linux and use the static version instead.
To opt-out of runtime xmlconfig, build Mesa with -Dxmlconfig=disabled.
v2: Expand out feature.require() since it was only added in meson 0.59.0.
v3: Use more concise Meson syntax (Dylan)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> [v2]
Reviewed-by: Eric Engestrom <eric@igalia.com> [v2]
Reviewed-by: Emma Anholt <emma@anholt.net>
Tested-by: Chris Healy <healych@amazon.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>
Alyssa Rosenzweig [Wed, 9 Nov 2022 19:23:41 +0000 (14:23 -0500)]
util: Define WITH_XMLCONFIG from Meson
This will allow us to disable runtime xmlconfig even outside of Windows/Android.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>
Alyssa Rosenzweig [Wed, 9 Nov 2022 19:07:27 +0000 (14:07 -0500)]
zink: Don't check WITH_XMLCONFIG
It's not necessary -- no other driver does this despite most drivers having a
driconf check like Zink does -- and it adds a problematic cross-tree dependency.
This was been a relic from when xmlconfig didn't work at all on Windows, added
in commit
834b69d1ef4 ("zink: fix win32 build"). That has been replaced the
"static" xmlconfig only, which is good for almost everyone enough in practice.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>
Alyssa Rosenzweig [Wed, 23 Nov 2022 04:21:53 +0000 (23:21 -0500)]
docs/features: Get Asahi on the board
We support a good chunk of GL 3.x now ... let's get us on the board so that
Mesamatrix can get onto solving the challenging problem of deciding what colour
to use for Asahi ;-)
Table filled out to the best of my abilities, there may be inaccuracies or
omissions.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19944>
Christian Gmeiner [Sat, 19 Nov 2022 16:49:34 +0000 (17:49 +0100)]
etnaviv: Hide MSAA support behind debug flag
With the current level of MSAA support we have some real world rendering
problems in Chromium/Skia (issue #7678). Convert the MSAA support to an
explicit opt-in by settings ETNA_MESA_DEBUG=msaa.
Cc: 22.3 mesa-stable
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19870>
Eric Engestrom [Wed, 23 Nov 2022 19:15:23 +0000 (19:15 +0000)]
docs: update calendar for 22.3.0-rc4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19965>
Marek Olšák [Wed, 16 Nov 2022 07:43:23 +0000 (02:43 -0500)]
st/mesa: only call st_manager_validate_framebuffers at FBO change or SwapBuffers
Hopefully this doesn't break anything.
There are a lot of places that invalidate drawables, but no place attempted
to call the context directly like this. A few places don't even have
the context.
Explanation:
The DRI frontend uses a global atomic counter per drawable that is
incremented when that drawable changed buffers.
st_manager_validate_framebuffers checks for that atomic counter and
updates the framebuffer state if there is any change. This was called at
every state update, so likely before almost every draw (!!!).
This commit changes that. Everything is the same except that the change
of buffers will not be noticed until the beginning of the next frame or
when the framebuffer state update is triggered by something else.
The effect is that we don't waste time calling
st_manager_validate_framebuffers a million times per frame.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19775>
Alyssa Rosenzweig [Sat, 29 Oct 2022 19:45:03 +0000 (15:45 -0400)]
pan/mdg: Fix out-of-order execution
We can go up to 15 instructions out of order (performance fix) but we
can't go past a branch (bug fix).
Fixes:
30a393f4581 ("pan/mdg: Enable out-of-order execution after texture ops")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19762>
Danylo Piliaiev [Tue, 8 Nov 2022 13:54:31 +0000 (14:54 +0100)]
freedreno/replay: Add option to replay specific range of cmdstreams
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19444>
Danylo Piliaiev [Thu, 3 Nov 2022 18:18:21 +0000 (19:18 +0100)]
freedreno/rddecompiler: Add shader disasm/asm support
Now rddecompiler outputs shaders in editable assembly form.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19444>
Danylo Piliaiev [Tue, 1 Nov 2022 18:55:06 +0000 (19:55 +0100)]
freedreno/decode: Add 'rddecompiler' tool
Decompiles a single cmdstream from .rd into compilable C source.
Given the address space bounds the generated program creates
a new .rd which could be used to override cmdstream with 'replay'.
Generated .rd is not replayable on its own and depends on buffers
provided by the source .rd.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19444>
Rob Clark [Tue, 25 Oct 2022 16:53:41 +0000 (09:53 -0700)]
freedreno/cffdec: Add type0/type4 vs type3/type7 pkt helpers
The handling is the same, just the format differes for pre-a5xx vs later
gens, so split out some helpers to simplify this.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19444>
Rob Clark [Tue, 25 Oct 2022 16:35:06 +0000 (09:35 -0700)]
freedreno/cffdec: Remove packet types
These don't add any value.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19444>
Rob Clark [Tue, 25 Oct 2022 16:34:06 +0000 (09:34 -0700)]
freedreno/cffdec: Remove dead code
pkt2 is already handled further down the if/else ladder.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19444>
Danylo Piliaiev [Tue, 1 Nov 2022 16:16:36 +0000 (17:16 +0100)]
freedreno/replay: Add option to override selected cmdstream
This adds an option to override a single cmdstream while replaying
.rd capture. Cmdstream for override is stored in the same .rd format,
where there is only one RD_CMDSTREAM_ADDR section and any amount
of buffers.
Instead of using provided .rd file, 'replay' calls external program
to generate it first, in order to be able to pass the range of
GPU addresses available for the new buffers.
Usage example:
./replay --override=13 --generator=~/cmdstream_gen
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19444>
Danylo Piliaiev [Tue, 1 Nov 2022 14:20:10 +0000 (15:20 +0100)]
freedreno/decode: Print cmdstream idx
Will be useful later for cmdstream substitution.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19444>
Danylo Piliaiev [Thu, 27 Oct 2022 11:20:17 +0000 (13:20 +0200)]
freedreno/decode: Move rd section parsing to a common header
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19444>
Eric Engestrom [Thu, 27 Jun 2019 17:10:12 +0000 (18:10 +0100)]
i915g: fix typo in #if
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>
Eric Engestrom [Thu, 27 Jun 2019 16:51:10 +0000 (17:51 +0100)]
iris: s/#if/#ifdef/ to fix -Wundef
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>
Eric Engestrom [Thu, 27 Jun 2019 16:51:03 +0000 (17:51 +0100)]
freedredno: s/#if/#ifdef/ to fix -Wundef
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>
Eric Engestrom [Tue, 25 Jun 2019 08:25:19 +0000 (09:25 +0100)]
freedreno/ir3: fix -Wundef warning
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>
Eric Engestrom [Tue, 25 Jun 2019 08:17:35 +0000 (09:17 +0100)]
freedreno: fix HAVE_FREEDRENO_KGSL check
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>
Hans-Kristian Arntzen [Fri, 18 Nov 2022 18:30:18 +0000 (19:30 +0100)]
docs: Mark VK_KHR_present_wait as supported.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
Hans-Kristian Arntzen [Wed, 26 Oct 2022 12:17:22 +0000 (14:17 +0200)]
wsi/x11: Rewrite wait logic for ANI/WaitForPresentKHR.
When we need to poll the XCB connection with a non-trivial timeout,
be very careful to not hit an XCB bug where a poll() may hang for too
long even if an event is ready in the special event queue.
This is a pragmatic workaround, a wait_for_special_event_with_timeout()
is the only proper solution here.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
Hans-Kristian Arntzen [Wed, 26 Oct 2022 10:57:56 +0000 (12:57 +0200)]
wsi/x11: Mention problems with xcb_wait_for_special_event().
There is no pragmatic solution for this.
Comment about the rationale for doing it like this until we have a more
robust solution in XCB.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
Hans-Kristian Arntzen [Tue, 25 Oct 2022 09:22:25 +0000 (11:22 +0200)]
turnip: Conditionally enable VK_KHR_present_wait on Turnip.
Hide behind driconf.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Tested-by: Gabe Rowe <gaberowe@gmail.com>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
Hans-Kristian Arntzen [Mon, 24 Oct 2022 11:48:30 +0000 (13:48 +0200)]
anv: Conditionally expose VK_KHR_present_wait on ANV.
Gate it behind driconf query for now.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
Hans-Kristian Arntzen [Mon, 24 Oct 2022 11:48:11 +0000 (13:48 +0200)]
radv: Conditionally expose VK_KHR_present_wait on RADV.
Gate it behind driconf query for now.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
Hans-Kristian Arntzen [Mon, 31 Oct 2022 15:00:04 +0000 (16:00 +0100)]
wsi/common: Allow present-wait to be unconditionally enabled.
If all potentially supported surface types support present wait,
we can expose the extension.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
Hans-Kristian Arntzen [Mon, 24 Oct 2022 11:43:37 +0000 (13:43 +0200)]
driconf: Add DRI configuration for exposing VK_KHR_present_wait.
These extensions are flawed and do not support the concept of
per-surface queries. For the time being we cannot guarantee that we are
able to implement it on all surfaces, but the feature is useful enough
to make available as an opt-in feature for the time being, so hide it
behind an driconf until we have a better mechanism in place.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
Hans-Kristian Arntzen [Mon, 24 Oct 2022 14:10:01 +0000 (16:10 +0200)]
wsi/display: Implement VK_KHR_present_wait on KHR_display swapchain.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
Hans-Kristian Arntzen [Fri, 21 Oct 2022 13:04:13 +0000 (15:04 +0200)]
wsi/x11: Implement VK_KHR_present_wait on X11.
Based on original implementation by Keith Packard in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12086.
Also fixes the implementation to work on IMMEDIATE and MAILBOX
presentation modes and Xwayland.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
Hans-Kristian Arntzen [Mon, 24 Oct 2022 12:47:51 +0000 (14:47 +0200)]
vulkan/wsi: Add mechanism to wait for WSI semaphore unsignal.
When vkWaitForPresentKHR succeeds, we are guaranteed
that any dependent semaphores have been unsignalled.
In an explicit sync world, we are guaranteed this automatically by
having a present complete, since that event must follow a semaphore wait
completion.
However, if the swapchain image is implicitly
synchronized, the semaphore might technically not have been unsignaled
before the present complete event triggers.
Present IDs must be signalled in monotonic order, same as timeline
semaphores.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
Hans-Kristian Arntzen [Fri, 21 Oct 2022 13:00:32 +0000 (15:00 +0200)]
vulkan/wsi: Refactor out wsi_init_pthread_cond_monotonic.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
Daniel Stone [Wed, 11 May 2022 18:13:48 +0000 (19:13 +0100)]
vulkan/wsi: Add stub interface for VK_KHR_present_wait
Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
LingMan [Mon, 31 Oct 2022 17:41:35 +0000 (18:41 +0100)]
intel/fs: Accept an unsigned int in fs_reg::fs_reg
The parameter `nr` is currenlty an `int` but it only gets assigned to an
`unsigned int`. Make it clear in the function signature what's actually
required.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19423>
LingMan [Mon, 31 Oct 2022 13:22:09 +0000 (14:22 +0100)]
intel/fs: Preserve unsignedness in fs_visitor::split_virtual_grfs
GCC 12.2.0 warns:
../src/intel/compiler/brw_fs.cpp: In member function ‘bool fs_visitor::
split_virtual_grfs()’:
../src/intel/compiler/brw_fs.cpp:2199:10: warning: ‘void* memset(void*, int,
size_t)’ specified size between
18446744071562067968 and
18446744073709551615
exceeds maximum object size
9223372036854775807 [-Wstringop-overflow=]
2199 | memset(vgrf_has_split, 0, num_vars * sizeof(*vgrf_has_split));
`num_vars` is an `int` but gets assigned the value of `this->alloc.count`,
which is an `unsigned int`. Thus, `num_vars` will be negative if
`this->alloc.count` is larger than int max value. Converting that negative
`int` to a `size_t`, which `memset` expects, then blows it up to a huge
positive value.
Simply turning `num_vars` into an `unsigned int` would be enough to fix this
specific problem, but there are many other instances where an `unsigned int`
gets assigned to an `int` for no good reason in this function. Some of which
the compiler warns about now, some of which it doesn't warn about.
This turns all variables in `fs_visitor::split_virtual_grfs`, which should
reasonably be unsigned, into `unsigned int`s. While at it, a few now pointless
casts are removed.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19423>
Philippe Lecluse [Tue, 22 Nov 2022 15:27:46 +0000 (07:27 -0800)]
intel: Disable SSE2 instruction set if building for non x86 architectures
Signed-off-by: Philippe Lecluse <philippe.lecluse@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19812>