Commit Graph

156295 Commits

Author SHA1 Message Date
Pierre-Eric Pelloux-Prayer 3c61f2cc15 util/blob: use memcpy in read functions
Type casting may require specific alignment on some platforms;
since the input data can be provided by the application we can't
require any alignment.

Switch to using memcpy like the write functions do, and drop the
asserts.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6493
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16662>
2022-07-07 12:25:05 +00:00
Pierre-Eric Pelloux-Prayer 8856379a03 mesa/st: don't guess the internal format if it's known
This fixes tests using imageLoad/imageStore on texture
created using glEGLImageTargetTexture2DOES.

Before this change, the format was guessed as GL_RGBA,
which would be rejected by _mesa_get_shader_image_format.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16662>
2022-07-07 12:25:05 +00:00
Pierre-Eric Pelloux-Prayer 085bdd89c2 dri: store internal_format when known
For images created from textures or renderbuffer, the internal
format is known so store it.

This will be used in the next commit to replaces guessing it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16662>
2022-07-07 12:25:05 +00:00
Lionel Landwerlin f1dd487531 intel/nir: temporarly disable opt_uniform_atomics for RT/CL
Not had time to investiguate what is going is on but it's definitely a
contributor to failures.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16104>
2022-07-07 10:21:48 +00:00
Gert Wollny bf29ebc0a7 virgl: Submit the TGSI_PROPERTY_SEPARABLE_PROGRAM when the host understands it
We can't unconditionally support separable shader objects on the host,
so submit the property only if the shader is actually separable, the
host knows about the property, and supports SSO.

Without support for SSOs, the  host can still compile and link the shaders,
it needs to do more  work on interface matching though.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17344>
2022-07-07 09:46:53 +00:00
Gert Wollny 198bcf7726 tgsi: Don't bother setting the TGSI_PROPERTY_SEPARABLE_PROGRAM
Most drivers don't care about the property, and virgl should only handle
it if the host supports it.

This is a partial revert of b634030, i.e. we keep the definition of the
property, but we don't set it only based on the shader info.

Fixes: b634030542
  tgsi: Add SEPARABLE_PROGRAM property

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17344>
2022-07-07 09:46:53 +00:00
Iago Toral Quiroga f4a3bccf94 v3dv: remove obsolete comment
multop + umul24 can only be used to implement 32-bit multiplies,
so for a full 64-bit result we always need to lower.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17372>
2022-07-07 09:16:24 +00:00
Iago Toral Quiroga 152fc4fd28 v3dv: don't lower uadd_carry and usub_borrow
We can produce slightly better code for these in the backend, so
do that. For this we need to:

1. Fix our implementation of uadd_carry (which wasn't used) to return
   an integer instead of a boolean value.
2. Add an implementation of usub_borrow.

Notice these are only used in Vulkan. In GL these instructions are
always unconditionally lowered by the state tracker in GLSL IR so
we never get to see them in the backend.

Shader-db stats from a collection of Vulkan samples:

total instructions in shared programs: 122351 -> 122345 (<.01%)
instructions in affected programs: 196 -> 190 (-3.06%)
helped: 2
HURT: 0

total uniforms in shared programs: 18670 -> 18672 (0.01%)
uniforms in affected programs: 59 -> 61 (3.39%)
helped: 0
HURT: 2

total max-temps in shared programs: 13145 -> 13147 (0.02%)
max-temps in affected programs: 27 -> 29 (7.41%)
helped: 0
HURT: 2

total inst-and-stalls in shared programs: 123052 -> 123046 (<.01%)
inst-and-stalls in affected programs: 197 -> 191 (-3.05%)
helped: 2
HURT: 0

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17372>
2022-07-07 09:16:24 +00:00
Iago Toral Quiroga 84a0dca9df nir: fix documentation for uadd_carry and usub_borry opcodes
These opcodes where fixed to return an integer instead of a boolean
value some time ago but the documentation for them was not updated
and still talked about a boolean result.

Fixes: b0d4ee520 ('nir/opcodes: Fix up uadd_carry and usub_borrow')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17372>
2022-07-07 09:16:24 +00:00
Lionel Landwerlin 1b6c74c48d intel/fs: make sure memory writes have landed for thread dispatch
The thread dispatch SEND instructions will dispatch new threads
immediately even before the caller of the SEND instruction has reached
EOT. So we really need to make sure all the memory writes are visible
to other threads within the DSS before the SEND.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15755>
2022-07-07 09:48:20 +03:00
Clément Guérin a1a22862c6 venus: implement VK_EXT_physical_device_drm
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17387>
2022-07-07 02:46:45 +00:00
Dawn Han fdf550cdf0 venus: enabled iub in physical device
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16699>
2022-07-07 02:37:36 +00:00
Dawn Han 32283b9703 Refactor and add template support for iub
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16699>
2022-07-07 02:37:36 +00:00
Dawn Han abae9d4831 Add the iub binding count tracking
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16699>
2022-07-07 02:37:36 +00:00
Dawn Han 6bd8dda57b Add iub type to vn_descriptor_type
Verified the pNext VkWriteDescriptorSet is not NULL on iub type

Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16699>
2022-07-07 02:37:36 +00:00
Dawn Han 78e637f857 Refactor the descriptor enums to be extensible
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16699>
2022-07-07 02:37:36 +00:00
Dawn Han 40fb107664 Add iub features and properties passthrough
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16699>
2022-07-07 02:37:36 +00:00
Guilherme Gallo 20827dfa9b ci/lava: Update license header
Use SPDX to indicate the license.
Update authors of lava_job_submitter.py

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Guilherme Gallo 3f3b0a28f2 ci/lava: Rename console color names
Use FG to indicate foreground colors

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Guilherme Gallo 6ba2b33a8c ci/lava: Flexibilize section marker regexes
In some jobs, such as
https://gitlab.freedesktop.org/gallo/mesa/-/jobs/24904100, the kmsg is
interleaved with stderr/stdout in serial console, making it difficult to
confidently find the log messages to detect when the DUT is booting,
when the DUT is running etc.

Luckily, LAVA sends redundant messages about their signals. We can use
them to mitigate the chance of missing an interleaved message by being
more open to different messages, using the regex on both `debug` and
`target` LAVA log levels.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Guilherme Gallo 24f368d652 ci/lava: Stop printing after the result line
There are some leftovers in the jobs logs after the result log line.
Only print until the init-stage2.sh output, to raise the chance to check
for the test script results at the first glance in the Gitlab logs.

Extra changes:
- Add `hung` status for jobs considered hanging in the Gitlab
- print them after the retry loop

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Guilherme Gallo f09aab08e9 ci/lava: Highlight job retrying message
It should be clear to the developer that the job was not successful in
the first run.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Guilherme Gallo 868daded22 ci/lava: Highlight kernel messages in bold
This will serve to warn the user that those messages are processed
differently, e.g. the kmsgs does not trigger heartbeats and maybe
eventual targets of hint to retry the job immediately.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Guilherme Gallo 29af421272 ci/lava: Don't print LAVA debug messages
Remove debug messages from the output in order to unclutter the log a
little more for the developers.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Guilherme Gallo 466917ea4c ci/lava: Add an integration test for LAVA jobs
test_full_yaml_log is a test that will look for a LAVA log YAML file at
`/tmp/log.yaml` and consume it as it was a realtime CI job.
It is useful for debugging issues related with LAVA.

Let's keep it skipped by default, to avoid introducing entire logs into
the codebase.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Guilherme Gallo c9d4076c1e ci/lava: Wrap job definition dump into a collapsed section
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Guilherme Gallo fc2ae8d375 ci/lava: Wrap job info into a collapsed section
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Guilherme Gallo 02cac49721 ci/lava: heartbeat: don't consider kernel message logs
Currently, the submitter consider that every new log that comes from the
DUT console is a signal that the device is healthy, but maybe that is
not the case, since in some kernel hangs/failures, no output is
presented except from some kernel messages.

This commit bypass the heartbeat when the LogFollower detect a kernel
message. Any log line that does follow the kmsg pattern will make the
job labeled as healthy again.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Guilherme Gallo aa26a6ab72 ci/lava: Follow job execution via LogFollower
Now LogFollower is used to deal with the LAVA logs.

Moreover, this commit adds timeouts per Gitlab section, if a section
takes longer than expected, cancel the job and retry again.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Guilherme Gallo 2569d7d7df ci/lava: Create LogFollower and move logging methods
- Create LogFollower to capture LAVA log and process it adding some
- GitlabSection and color treatment to it
- Break logs further, make new gitlab sections between testcases
- Implement LogFollower as ContextManager to deal with incomplete LAVA
  jobs.
- Use template method to simplify gitlab log sections management
- Fix sections timestamps

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Guilherme Gallo c86ba3640f ci/lava: Create Gitlab log sections handler
Gitlab has support for collapsible sections, so it would be good to
create collapsed log sections for the LAVA setup logs. This way, the
Mesa developers to see only the execution of the scripts, instead of
LAVA messages clutter.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
2022-07-07 00:28:53 +00:00
Chia-I Wu 3831079fdf vulkan/device_select: remove get_pdevice_proc_addr
It is optional and is needed only when a layer has physical device
extensions that may be unknown to the loader.

This simplifies the layer a bit, but more importantly, it works around a
bug in the loader when there is another layer in the layer chain that
wraps VkInstance.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16307>
2022-07-06 23:53:25 +00:00
Dylan Baker 259449e573 docs: Bump 22.2 branchpoint by two weeks
There's been several requests to push the release back a bit to allow
more time in the 22.2 cycle, so we'll bump by two weeks. This adds an
extra 22.1 release to the schedule as well, due to the move.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17384>
2022-07-06 15:11:36 -07:00
Hans-Kristian Arntzen 9dbfc21ab9 radv: Implement VK_EXT_shader_module_identifier.
Passes dEQP-VK.pipeline.*.shader_module_identifier.*

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17332>
2022-07-06 16:27:21 +00:00
Hans-Kristian Arntzen 0119de08f2 vulkan: Add common code for VK_EXT_shader_module_identifier.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17332>
2022-07-06 16:27:21 +00:00
Hans-Kristian Arntzen 6d66a43a70 vulkan: Update Vulkan XML and headers to 1.3.219.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17332>
2022-07-06 16:27:21 +00:00
Mike Blumenkrantz 0070dd2fa9 mesa: remove incomplete texture warning
ETOOSPAMMY

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Yusuf Khan <yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17362>
2022-07-06 15:35:46 +00:00
Corentin Noël d92c1ca01b virgl: Add support for passing the supported number of components from virgl
Return the capabilities reported by the host. No functional change in case the
host virgl implementation doesn't implement it.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16401>
2022-07-06 13:12:38 +00:00
Corentin Noël 2283ac5832 virgl/ci: Update virglrenderer
Update virglrenderer to the latest version on time.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16401>
2022-07-06 13:12:38 +00:00
Lucas Stach a1ed056ee6 kmsro: add 'imx-lcdif' driver support
This is the scanout engine found on the NXP i.MX8MP SoC.

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/17369>
2022-07-06 12:37:02 +00:00
Jesse Natalie 53565c9929 dzn: Add ABI helpers for D3D12 functions returning structs
The currently available D3D12 API headers have incorrect C function
prototypes for these functions when compiling for non-Windows platforms.

Future changes here will move these helpers into the DirectX-Headers
project, but:
* The process of getting a fix into the headers is still ongoing
* I'd prefer to avoid taking an immediate dependency on just-published
  headers again

So, for now add some helpers to work around this problem in Dozen

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
2022-07-06 12:18:55 +00:00
Jesse Natalie 074275d911 dzn: Add a DXCore enumeration path
WSL doesn't have DXGI, but it does have DXCore. DXCore also has a nice
property that it filters to only D3D12-capable adapters. We can rely
on DXCore as a first option even for Windows, because we'll be able
to let the Vulkan loader do preference sorting, instead of having to
rely on DXGI to do it for us.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
2022-07-06 12:18:55 +00:00
Jesse Natalie 49967ea306 dzn: Move DXGI code to a separate file and only build it on Windows
The prototypes for physical device enumeration are moved to a new
dedicated header so that it can be included from a DXCore path,
which will C++, in the next commit

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
2022-07-06 12:18:55 +00:00
Jesse Natalie 68c65de264 dzn: Use a custom adapter desc instead of DXGI adapter desc
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
2022-07-06 12:18:55 +00:00
Jesse Natalie 9a2ab661b7 dzn: Don't hash adapter LUID as part of device UUID
Per the Vulkan spec, the device UUID should be identical between reboots.
It should also uniquely identify different instances of the same device,
e.g. 2 identical GPUs connected to different PCI ports, but D3D doesn't
currently expose a way to do both of these things. Prefer persistence
over uniqueness here.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
2022-07-06 12:18:55 +00:00
Jesse Natalie 236282559e dzn: Use IUnknown instead of IDXGIAdapter1 as the stored adapter
WSL doesn't support DXGI, and DirectX-Headers used to build for WSL
doesn't have the DXGI headers, so we need to isolate DXGI usage
and only build it on Windows

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
2022-07-06 12:18:55 +00:00
Jesse Natalie 17c0888cfe dzn: Skip dxil validator and some Windows-only debug flags for Linux
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
2022-07-06 12:18:55 +00:00
Jesse Natalie 72a9e66b20 dzn: Fix maybe-uninitialized warning
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
2022-07-06 12:18:55 +00:00
Jesse Natalie 45ad8125f5 dzn: Add an eventfd sync implementation
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
2022-07-06 12:18:55 +00:00
Jesse Natalie c7d8f1a7b8 dzn: Use u_dl to load D3D12
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
2022-07-06 12:18:55 +00:00