Commit Graph

156740 Commits

Author SHA1 Message Date
Jesse Natalie c002bbeb2f util: Add a Win32 futex impl
This uses APIs that are not available on Win7. Since this is a build-time
configuration, and since we can't use the SDK version as an indicator
(since you can support Win7 via new SDKs), a new option is added to allow
disabling it, to maintain Win7 support if desired.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17431>
2022-07-15 21:31:51 +00:00
Yiwei Zhang 62f79f9ec1 venus: add more tracepoints for perf analysis
This change adds the tracepoints that can help understand app behavior
for debugging and performance optimization purposes.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17497>
2022-07-15 20:57:41 +00:00
Yiwei Zhang f96e25ae05 venus: suballocate more for layering
Previously we suballocate only for host visible memory type to reduce
the kvm mem slot usage. That is no longer an issue given the limit has
been raised. However, we should still suballocate to make layering
clients performant. So we just suballocate regardless of mem type.

This change also increases the allowed suballocation size request from
64K to 128K, which makes layering clients happier.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17497>
2022-07-15 20:57:41 +00:00
naveen 1eea424a7e github/ci: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17562>
2022-07-15 20:56:16 +00:00
Mike Blumenkrantz 3ff058ed0b mesa: update GL_CLAMP emulation when binding/unbinding textures
binding/unbinding a texture affects the previously specified parameters,
so ensure the driver flag for clamp emulation is also set to perform
updates as needed

Fixes: e8f71f6ac4 ("mesa/st: add PIPE_CAP_GL_CLAMP")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17459>
2022-07-15 18:58:15 +00:00
Mike Blumenkrantz 068239dad0 mesa: track which sampler wrap params use GL_CLAMP
this adds a bitmask to sampler objects for tracking whether GL_CLAMP
is active

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17459>
2022-07-15 18:58:15 +00:00
Mike Blumenkrantz c17bfc5309 mesa: move is_wrap_gl_clamp() to samplerobj.h and deduplicate
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17459>
2022-07-15 18:58:15 +00:00
Mike Blumenkrantz 56e5eaeba1 zink: fix xfb emit check in compiler
nir->info.has_transform_feedback_varyings is set for all stages in the
pipeline when xfb is present, so it can't be used for this

harmless, but this is more correct

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz bd2eaaeb7d zink: add a compiler pass to split xfb block outputs
this splits all the members of a struct into separate variables to
improve xfb inlining and reduce the number of locations consumed by
xfb outputs, reducing the chances of running out of shader outputs

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz 924145c7b5 zink: bitcast extracted streamout components to uint before creating uvec
spirv can't create a uvec from float components, so pre-cast here

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz c189b7f585 zink: use right glsl length getter for ntv partial stores
why does glsl_get_length exist if it returns 0 for the most common cases?

Fixes: 31ba19ff68 ("zink: fix ntv partial stores")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz 5245290565 zink: fix xfb array inlining
get_slot_components() returns the total number of output components
for arrays for initial evaluation phase, but during the packed->inlined
conversion the arrayed size must be normalized to the slot's component count
in order to effectively catch and inline the array

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz 042cc6e6e6 zink: split xfb block emission from array/matrix handling
these are not necessarily the same case even if in glsl they are the same,
and by splitting it out a bunch of redundant array[scalar] code can be deleted

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz 76cc519866 zink: handle bare matrix types in xfb emission
these have no inherent slot index since they aren't block members

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz a0771cd4ab zink: always use 32bit floats for so output types
doubles may be the output variable type, but the xfb output will always
be 32bit

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
2022-07-15 17:32:27 +00:00
David Heidelberg c5ebd44850 ci: Allow disabling the whole of the Igalia farm
Add a global-level variable that allows disabling all jobs that would
have gone to the Igalia lab, to be used in case of outages or failures.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17178>
2022-07-15 16:56:03 +00:00
Jesse Natalie f4a5e95ad2 CI: Update DirectX-Headers dependency for MinGW/Debian
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17548>
2022-07-15 16:27:11 +00:00
Jesse Natalie 1e59bc7a74 subprojects: Point DirectX-Headers at a specific tag
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17548>
2022-07-15 16:27:11 +00:00
Jesse Natalie f4f1914cd2 microsoft/clc: Add helpers to build with correct ABI for MinGW
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17548>
2022-07-15 16:27:11 +00:00
Jesse Natalie e14beaf05b d3d12: Add helpers to build with correct ABI for MinGW
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17548>
2022-07-15 16:27:11 +00:00
Jesse Natalie 489ab1aa3b dzn: Remove the cast when the SDK version is high enough
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17548>
2022-07-15 16:27:11 +00:00
Jesse Natalie b9fb14da06 dzn: Missed ABI fixes for GetCustomHeapProperties
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17548>
2022-07-15 16:27:11 +00:00
Eric Engestrom 8317de8ed3 docs/isl: fix typos & formatting
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17522>
2022-07-15 15:17:45 +00:00
Tatsuyuki Ishi 648731e2bd radv: Only set pstate for the first hw_ctx.
We used to do it for every queue, which was duplicate work as pstate is
per-device. It could also cause trouble when multiple hw_ctx are created as
the call will succeed for only one of them and the rest will return -EBUSY.

Simplify and fix this by only setting for the first non-null hw_ctx.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17541>
2022-07-15 15:08:07 +00:00
Bas Nieuwenhuizen 2d2591bbb7 radv: Expose VK_NV_device_generated_commands.
Closes: #6736

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen 05bf39238b radv: Add stub for vkCmdBindPipelineShaderGroupNV.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen 3f09bd5a0e radv: Implement CmdExecuteGeneratedCommandsNV.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen d7bd9db9fc radv: Implement DGC cmdbuffer generation.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen 37a619f517 radv: Implement DGC generated command layout structure.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen 0c7bb92a78 radv: Add DGC meta shader.
This generated the cmd and upload buffers.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen 848d3fdeb6 radv: Add flushing for DGC.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen df69b34450 radv: Add helper to write scissors.
For use by DGC shader.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen 57017b494d radv: Make radv_get_vgt_index_size non-static.
For DGC cmdbuffer generation use.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen f6a21fccf9 radv: Expose helper for base pa_su_sc_mode_cntl.
So that we can feed it to the DGC shader for front face overrides.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen b213de12d3 radv: Require 32bit memory for indirect buffers.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen cca680bab1 radv: Always store stride in the vbo descriptor.
So we can use it in the DGC shader.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen bce3af2cb3 radv: Expose function to write vertex descriptors for dgc.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen 82c2e99102 radv: Skip setting empty index buffers to avoid hang
In the direct path we already skipped draws, but in DGC I noticed
that just emitting these packets can cause issues ...

Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Bas Nieuwenhuizen f27f06d72c radv: Add a 32bit memory type.
Got to put the commandbuffers & uploadbuffers there. With DGC
those can be allocated by the application.

Excluding it from all other buffers/images to avoid using the
precious 32bit address space.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
2022-07-15 14:45:13 +00:00
Mike Blumenkrantz b1c1d099a9 zink: always update sampler descriptor layouts on fb surface unbind
this will affect the layout

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17524>
2022-07-15 14:20:24 +00:00
Mike Blumenkrantz f79d71f59e zink: break out samplerview layout reset code
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17524>
2022-07-15 14:20:24 +00:00
Mike Blumenkrantz 960a6316d4 zink: use sampler_bind_count to simplify some code
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17524>
2022-07-15 14:20:24 +00:00
Mike Blumenkrantz 3a47576687 zink: add a compiler pass to match up tex op dest types
this handles bitsize conversions and depth component splatting to
enable simplifying some of the related ntv code

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17427>
2022-07-15 14:08:56 +00:00
Mike Blumenkrantz 49d5fa12f2 zink: always use 32bit sample ops
while some (tg4) sample ops can use different bit sizes in spirv, most
cannot, and all the shader variables are always emitted as 32bit, so
ensure the 32bit type is always what's being used for sampling

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17427>
2022-07-15 14:08:56 +00:00
Mike Blumenkrantz 35a4b8989f zink: allow multiple tex components for depth tg4
this returns a vec4, so don't break the return type by clamping 1 component

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17427>
2022-07-15 14:08:56 +00:00
Daniel Stone 02d9d1557b CI: Disable Collabora lab
It's everyone's favourite day, infrastructure maintenance Friday.

This includes manual disables for a618-vk and zink-anv-tgl, because
apparently the disable-on-variable rules don't carry through to those
jobs for ... some reason.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17553>
2022-07-15 13:26:42 +00:00
Lucas Stach 612b99d721 etnaviv: fix use after free in async shader compile
When the shader state is destroyed before the async shader compile is
done, we get a use after free in the async thread, as the shader state
it is operating on is gone. Fix this by dropping any pending job from
the async queue or wait for it to finish before destroying the state
by calling util_queue_drop_job.

Also call util_queue_fence_destroy, which would have caught this issue
by asserting that the queue_fence is in signalled state when the
shader state is destroyed.

Fixes: 1141ed5859 ("etnaviv: async shader compile")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17534>
2022-07-15 11:07:12 +00:00
Matt Coster 20350a73a7 pvr: Add helper macros for creating pvr_dev_addr_t instances
The two macros introduced here form a (hopefully) unobjectionable
subset of those added in !17203.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17488>
2022-07-15 10:39:21 +01:00
Matt Coster 282f0a9330 pvr: Split pvr_dev_addr_t into a separate header
This type is useful beyond the scope of winsys.

It can now be used without being lumbered with a dependency on
pvr_winsys.h. Since pvr_winsys.h is used by pvr_private.h, this can be
a common cause for circular dependencies during development.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17488>
2022-07-15 10:39:21 +01:00
Karmjit Mahil f2e2e66e42 pvr: Update pvrsrv build version for fixed size fw.
It's still 1.17 but the version is changed due to the fixed size
fw struct update.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17491>
2022-07-15 00:52:14 +00:00