platform/upstream/mesa.git
2 years agomesa/st: make get_sampler_view_format() public
Mike Blumenkrantz [Wed, 22 Jun 2022 13:14:11 +0000 (09:14 -0400)]
mesa/st: make get_sampler_view_format() public

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17189>

2 years agointel/compiler: Avoid copy propagating large registers into EOT messages
Kenneth Graunke [Thu, 7 Jul 2022 03:29:02 +0000 (20:29 -0700)]
intel/compiler: Avoid copy propagating large registers into EOT messages

EOT messages need to use g112-g127 for their sources.  With the new
opt_split_sends pass, we may be constructing an EOT message from two
different registers, and be able to copy propagate the original values
into those SENDs.

This can cause problems if we copy propagate from a large register
(say an RGBA value which is 4 GRFs in SIMD8 or 8 GRFs in SIMD16), in a
situation where the SEND only read a subset of that (say the alpha value
out of an RGBA texturing result).  g112-127 can only hold 16 registers
worth of data, and sometimes we can only use g112-126.  So, we can't
propagate if the GRFs in question are larger than 15 GRFs.

Fixes a shader validation failure in Alan Wake.  Thanks to Ian Romanick
for catching this!

shader-db on Icelake shows that only SIMD32 programs are affected, and
the results are pretty negligable:

   total instructions in shared programs: 19615228 -> 19615269 (<.01%)
   instructions in affected programs: 10702 -> 10743 (0.38%)
   helped: 1 / HURT: 43 / largest change: +/- 2 instructions

   total cycles in shared programs: 852001706 -> 852001566 (<.01%)
   cycles in affected programs: 767098 -> 766958 (-0.02%)
   helped: 68 / HURT: 64 / largest change: +/- 774 cycles

   GAINED: 2 / LOST: 0

Fixes: 589b03d02f0 ("intel/fs: Opportunistically split SEND message payloads")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6803
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17390>

2 years agor600/sfn: support nir_op_mulz and legazy math rules
Gert Wollny [Thu, 16 Jun 2022 07:37:56 +0000 (09:37 +0200)]
r600/sfn: support nir_op_mulz and legazy math rules

v2: Handle nir_op_ffmaz as well (Georg Lehmann)

Closes: #6390
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17076>

2 years agor600: Cleanup nir options
Gert Wollny [Wed, 18 May 2022 20:35:48 +0000 (22:35 +0200)]
r600: Cleanup nir options

A general cleanop of the nir compiler options including separating
the handling for FS and all the other shaders.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17076>

2 years agor600: enable sb by default also for NIR
Gert Wollny [Wed, 18 May 2022 20:29:06 +0000 (22:29 +0200)]
r600: enable sb by default also for NIR

Currently, the NIR code path doesn't use clause local registers,
but these seem to help a lot with some work loads.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17076>

2 years agor600/sfn: rewrite NIR backend
Gert Wollny [Sat, 19 Jun 2021 11:03:32 +0000 (13:03 +0200)]
r600/sfn: rewrite NIR backend

This is a rewite of the NIR backend. it adds some optimization
and a scheduler.

v2: - replace some magic numbers by constants
    - make sure constructor is always used with new
    - use default initialization in more places
      (changes suggested by Filip Gawin)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17076>

2 years agor600: Update nir options
Gert Wollny [Wed, 18 May 2022 20:35:48 +0000 (22:35 +0200)]
r600: Update nir options

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17076>

2 years agor600: Make sure that LDS instructions only use bank swizzle 012
Gert Wollny [Wed, 18 May 2022 20:27:39 +0000 (22:27 +0200)]
r600: Make sure that LDS instructions only use bank swizzle 012

Not sure whether this is really needed. With the TGSI code path no
other bank swizzle is emitted for LDS ops, so make sure it's the same here.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17076>

2 years agor600: Add number of ALU groups to statistics
Gert Wollny [Wed, 18 May 2022 20:41:54 +0000 (22:41 +0200)]
r600: Add number of ALU groups to statistics

The number of ALU groups is important for good sccheduling, so
let's add it to the stats.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17076>

2 years agoanv/utrace: use a bo pool for utrace buffers
Lionel Landwerlin [Thu, 19 May 2022 17:53:30 +0000 (20:53 +0300)]
anv/utrace: use a bo pool for utrace buffers

When utrace/perfetto is active, we allocate/free utrace buffers at the
same rate as command buffers. It's useful to have a pool that avoids
GEM_CREATE/GEM_CLOSE ioctls.

v2: Use the pool more

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/16613>

2 years agodozen: Stop asking for semaphore/fence signaling
Jason Ekstrand [Thu, 7 Jul 2022 00:59:14 +0000 (19:59 -0500)]
dozen: Stop asking for semaphore/fence signaling

Dozen is currently a SW driver as far as WSI is concerned so it's going
to wait on a fence anyway.  Also, I highly doubt it's actually hooked
these up properly.  It's probably just a copy+paste from ANV.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agodozen: Increase optimalBufferCopy*Alignment
Jason Ekstrand [Thu, 7 Jul 2022 14:47:54 +0000 (09:47 -0500)]
dozen: Increase optimalBufferCopy*Alignment

D3D12 requires the offset to be 512B-aligned and row pitch to be
256B-aligned for copy commands.  There will need to be a fallback
written eventually because Vulkan has no such requirements but these
will remain the optimal limits as they allow using the D3D12 copy
commands directly.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi/win32: Use the new helpers and persistent map
Jesse Natalie [Thu, 7 Jul 2022 02:32:49 +0000 (19:32 -0700)]
vulkan/wsi/win32: Use the new helpers and persistent map

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi/wayland: Use host pointer import when available
Jason Ekstrand [Wed, 6 Jul 2022 22:27:42 +0000 (17:27 -0500)]
vulkan/wsi/wayland: Use host pointer import when available

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi/x11: Only use MIT_SHM if the device supports EXT_external_memory_host
Jason Ekstrand [Thu, 7 Jul 2022 00:31:38 +0000 (19:31 -0500)]
vulkan/wsi/x11: Only use MIT_SHM if the device supports EXT_external_memory_host

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi/x11: Don't leak shm_reply if we don't have dri3 or present
Jason Ekstrand [Thu, 7 Jul 2022 00:30:11 +0000 (19:30 -0500)]
vulkan/wsi/x11: Don't leak shm_reply if we don't have dri3 or present

Fixes: b5c390c113d3 ("vulkan/wsi: add support for detecting mit-shm pixmaps.")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi: Support tiled CPU images
Jason Ekstrand [Wed, 6 Jul 2022 23:04:58 +0000 (18:04 -0500)]
vulkan/wsi: Support tiled CPU images

Some drivers such as lavapipe are 100% fine with using linear for WSI
images.  Most HW drivers, however, would rather render tiled and eat a
blit.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi: Align buffer image strides to optimalBufferCopyRowPitchAlignment
Jason Ekstrand [Thu, 7 Jul 2022 14:54:19 +0000 (09:54 -0500)]
vulkan/wsi: Align buffer image strides to optimalBufferCopyRowPitchAlignment

This isn't a big deal for the current buffer paths because the required
alignment for PRIME is already higher than any driver advertises.
However, the SW path we're about to add won't have the PRIME requirement.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi: Compute stride and size in configure_buffer_image
Jason Ekstrand [Thu, 7 Jul 2022 15:08:30 +0000 (10:08 -0500)]
vulkan/wsi: Compute stride and size in configure_buffer_image

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi: Persistently map CPU images
Jason Ekstrand [Wed, 6 Jul 2022 23:52:32 +0000 (18:52 -0500)]
vulkan/wsi: Persistently map CPU images

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi: Delete SW support from configure_native_image
Jason Ekstrand [Wed, 6 Jul 2022 21:50:48 +0000 (16:50 -0500)]
vulkan/wsi: Delete SW support from configure_native_image

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi/wayland: Use wsi_configure_cpu_image
Jason Ekstrand [Wed, 6 Jul 2022 21:48:53 +0000 (16:48 -0500)]
vulkan/wsi/wayland: Use wsi_configure_cpu_image

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi/x11: Use wsi_configure_cpu_image
Jason Ekstrand [Wed, 6 Jul 2022 21:42:35 +0000 (16:42 -0500)]
vulkan/wsi/x11: Use wsi_configure_cpu_image

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi: Add a helper for creating CPU images
Jason Ekstrand [Wed, 6 Jul 2022 21:39:17 +0000 (16:39 -0500)]
vulkan/wsi: Add a helper for creating CPU images

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi: Move select_memory_type to common and rework it a bit
Jason Ekstrand [Wed, 6 Jul 2022 21:29:03 +0000 (16:29 -0500)]
vulkan/wsi: Move select_memory_type to common and rework it a bit

Instead of taking a single boolean for device-local, take a set of
required properties and denied properties.  This will let us require
additional things like being CPU mappable in the future.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi/wayland: Use a single memcpy in the SW path
Jason Ekstrand [Tue, 5 Jul 2022 22:26:18 +0000 (17:26 -0500)]
vulkan/wsi/wayland: Use a single memcpy in the SW path

The strides match.  There's no reason to loop over image height.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agovulkan/wsi: Pass the size to MapMemory in the SW path
Jason Ekstrand [Tue, 5 Jul 2022 22:24:50 +0000 (17:24 -0500)]
vulkan/wsi: Pass the size to MapMemory in the SW path

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>

2 years agoradv/ci: Move sample_texture.*_compressed_format_* to faillist for gfx<=9
Tatsuyuki Ishi [Sat, 2 Jul 2022 08:20:28 +0000 (17:20 +0900)]
radv/ci: Move sample_texture.*_compressed_format_* to faillist for gfx<=9

This turned out to be not a CTS bug but rather hardware bug around the
cache handle BCn textures.

It requires significant tracking to detect such cases, and it's likely
not worth a workaround since reading a texture as both compressed and
uncompressed in succession shall not be a realistic use case.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6689
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17345>

2 years agomesa: skip draws with invalid indices offset
Pierre-Eric Pelloux-Prayer [Wed, 8 Jun 2022 08:21:46 +0000 (10:21 +0200)]
mesa: skip draws with invalid indices offset

It's easy to misuse glDrawElements and end up with an
invalid indices offset.
Since this can cause a hang, detect this case and skip
the draw.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6625
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16662>

2 years agoutil/blob: use memcpy in read functions
Pierre-Eric Pelloux-Prayer [Mon, 23 May 2022 08:33:25 +0000 (10:33 +0200)]
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>

2 years agomesa/st: don't guess the internal format if it's known
Pierre-Eric Pelloux-Prayer [Fri, 20 May 2022 15:31:46 +0000 (17:31 +0200)]
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>

2 years agodri: store internal_format when known
Pierre-Eric Pelloux-Prayer [Fri, 20 May 2022 15:30:00 +0000 (17:30 +0200)]
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>

2 years agointel/nir: temporarly disable opt_uniform_atomics for RT/CL
Lionel Landwerlin [Thu, 21 Apr 2022 14:32:23 +0000 (07:32 -0700)]
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>

2 years agovirgl: Submit the TGSI_PROPERTY_SEPARABLE_PROGRAM when the host understands it
Gert Wollny [Sat, 2 Jul 2022 08:06:27 +0000 (10:06 +0200)]
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>

2 years agotgsi: Don't bother setting the TGSI_PROPERTY_SEPARABLE_PROGRAM
Gert Wollny [Sat, 2 Jul 2022 08:02:16 +0000 (10:02 +0200)]
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: b63403054237c3e408f2662beb52ec65db0aee30
  tgsi: Add SEPARABLE_PROGRAM property

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17344>

2 years agov3dv: remove obsolete comment
Iago Toral Quiroga [Thu, 7 Jul 2022 06:33:00 +0000 (08:33 +0200)]
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>

2 years agov3dv: don't lower uadd_carry and usub_borrow
Iago Toral Quiroga [Wed, 6 Jul 2022 09:29:41 +0000 (11:29 +0200)]
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>

2 years agonir: fix documentation for uadd_carry and usub_borry opcodes
Iago Toral Quiroga [Thu, 7 Jul 2022 09:13:51 +0000 (11:13 +0200)]
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>

2 years agointel/fs: make sure memory writes have landed for thread dispatch
Lionel Landwerlin [Tue, 5 Apr 2022 13:23:13 +0000 (13:23 +0000)]
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>

2 years agovenus: implement VK_EXT_physical_device_drm
Clément Guérin [Wed, 6 Jul 2022 23:04:32 +0000 (16:04 -0700)]
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>

2 years agovenus: enabled iub in physical device
Dawn Han [Mon, 27 Jun 2022 19:29:23 +0000 (19:29 +0000)]
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>

2 years agoRefactor and add template support for iub
Dawn Han [Thu, 30 Jun 2022 00:39:45 +0000 (00:39 +0000)]
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>

2 years agoAdd the iub binding count tracking
Dawn Han [Thu, 30 Jun 2022 00:33:33 +0000 (00:33 +0000)]
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>

2 years agoAdd iub type to vn_descriptor_type
Dawn Han [Wed, 29 Jun 2022 20:37:03 +0000 (20:37 +0000)]
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>

2 years agoRefactor the descriptor enums to be extensible
Dawn Han [Mon, 27 Jun 2022 19:23:22 +0000 (19:23 +0000)]
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>

2 years agoAdd iub features and properties passthrough
Dawn Han [Wed, 29 Jun 2022 18:14:01 +0000 (18:14 +0000)]
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>

2 years agoci/lava: Update license header
Guilherme Gallo [Wed, 6 Jul 2022 00:34:01 +0000 (21:34 -0300)]
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>

2 years agoci/lava: Rename console color names
Guilherme Gallo [Wed, 6 Jul 2022 00:33:30 +0000 (21:33 -0300)]
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>

2 years agoci/lava: Flexibilize section marker regexes
Guilherme Gallo [Mon, 4 Jul 2022 20:34:17 +0000 (17:34 -0300)]
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>

2 years agoci/lava: Stop printing after the result line
Guilherme Gallo [Thu, 30 Jun 2022 22:46:40 +0000 (19:46 -0300)]
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>

2 years agoci/lava: Highlight job retrying message
Guilherme Gallo [Thu, 30 Jun 2022 21:49:26 +0000 (18:49 -0300)]
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>

2 years agoci/lava: Highlight kernel messages in bold
Guilherme Gallo [Thu, 30 Jun 2022 21:43:05 +0000 (18:43 -0300)]
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>

2 years agoci/lava: Don't print LAVA debug messages
Guilherme Gallo [Thu, 30 Jun 2022 21:41:14 +0000 (18:41 -0300)]
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>

2 years agoci/lava: Add an integration test for LAVA jobs
Guilherme Gallo [Thu, 30 Jun 2022 21:16:51 +0000 (18:16 -0300)]
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>

2 years agoci/lava: Wrap job definition dump into a collapsed section
Guilherme Gallo [Thu, 30 Jun 2022 21:05:36 +0000 (18:05 -0300)]
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>

2 years agoci/lava: Wrap job info into a collapsed section
Guilherme Gallo [Thu, 30 Jun 2022 21:04:49 +0000 (18:04 -0300)]
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>

2 years agoci/lava: heartbeat: don't consider kernel message logs
Guilherme Gallo [Thu, 30 Jun 2022 20:58:17 +0000 (17:58 -0300)]
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>

2 years agoci/lava: Follow job execution via LogFollower
Guilherme Gallo [Mon, 4 Apr 2022 14:26:17 +0000 (11:26 -0300)]
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>

2 years agoci/lava: Create LogFollower and move logging methods
Guilherme Gallo [Fri, 24 Jun 2022 00:43:00 +0000 (21:43 -0300)]
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>

2 years agoci/lava: Create Gitlab log sections handler
Guilherme Gallo [Thu, 24 Mar 2022 23:32:06 +0000 (20:32 -0300)]
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>

2 years agovulkan/device_select: remove get_pdevice_proc_addr
Chia-I Wu [Tue, 3 May 2022 17:55:03 +0000 (10:55 -0700)]
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>

2 years agodocs: Bump 22.2 branchpoint by two weeks
Dylan Baker [Wed, 6 Jul 2022 22:10:04 +0000 (15:10 -0700)]
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>

2 years agoradv: Implement VK_EXT_shader_module_identifier.
Hans-Kristian Arntzen [Fri, 1 Jul 2022 10:02:35 +0000 (12:02 +0200)]
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>

2 years agovulkan: Add common code for VK_EXT_shader_module_identifier.
Hans-Kristian Arntzen [Fri, 1 Jul 2022 09:44:55 +0000 (11:44 +0200)]
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>

2 years agovulkan: Update Vulkan XML and headers to 1.3.219.
Hans-Kristian Arntzen [Fri, 1 Jul 2022 09:36:59 +0000 (11:36 +0200)]
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>

2 years agomesa: remove incomplete texture warning
Mike Blumenkrantz [Tue, 5 Jul 2022 13:24:26 +0000 (09:24 -0400)]
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>

2 years agovirgl: Add support for passing the supported number of components from virgl
Corentin Noël [Mon, 9 May 2022 14:21:17 +0000 (16:21 +0200)]
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>

2 years agovirgl/ci: Update virglrenderer
Corentin Noël [Tue, 28 Jun 2022 15:57:33 +0000 (17:57 +0200)]
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>

2 years agokmsro: add 'imx-lcdif' driver support
Lucas Stach [Thu, 12 May 2022 11:10:54 +0000 (13:10 +0200)]
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>

2 years agodzn: Add ABI helpers for D3D12 functions returning structs
Jesse Natalie [Sat, 2 Jul 2022 14:34:07 +0000 (07:34 -0700)]
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>

2 years agodzn: Add a DXCore enumeration path
Jesse Natalie [Fri, 1 Jul 2022 20:38:14 +0000 (13:38 -0700)]
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>

2 years agodzn: Move DXGI code to a separate file and only build it on Windows
Jesse Natalie [Fri, 1 Jul 2022 16:39:03 +0000 (09:39 -0700)]
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>

2 years agodzn: Use a custom adapter desc instead of DXGI adapter desc
Jesse Natalie [Tue, 5 Jul 2022 20:44:45 +0000 (13:44 -0700)]
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>

2 years agodzn: Don't hash adapter LUID as part of device UUID
Jesse Natalie [Tue, 5 Jul 2022 20:43:17 +0000 (13:43 -0700)]
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>

2 years agodzn: Use IUnknown instead of IDXGIAdapter1 as the stored adapter
Jesse Natalie [Fri, 1 Jul 2022 16:01:03 +0000 (09:01 -0700)]
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>

2 years agodzn: Skip dxil validator and some Windows-only debug flags for Linux
Jesse Natalie [Fri, 1 Jul 2022 16:06:55 +0000 (09:06 -0700)]
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>

2 years agodzn: Fix maybe-uninitialized warning
Jesse Natalie [Fri, 1 Jul 2022 16:05:39 +0000 (09:05 -0700)]
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>

2 years agodzn: Add an eventfd sync implementation
Jesse Natalie [Fri, 1 Jul 2022 16:05:25 +0000 (09:05 -0700)]
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>

2 years agodzn: Use u_dl to load D3D12
Jesse Natalie [Fri, 1 Jul 2022 16:05:01 +0000 (09:05 -0700)]
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>

2 years agodzn: Use os_time_sleep instead of Win32 Sleep
Jesse Natalie [Fri, 1 Jul 2022 16:04:02 +0000 (09:04 -0700)]
dzn: Use os_time_sleep instead of Win32 Sleep

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>

2 years agodzn: Define COBJMACROS before any includes
Jesse Natalie [Fri, 1 Jul 2022 16:28:52 +0000 (09:28 -0700)]
dzn: Define COBJMACROS before any includes

Otherwise the IUnknown definition might get included before it.

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>

2 years agodzn: Annotate sometimes-unused variables.
Jesse Natalie [Fri, 1 Jul 2022 03:49:43 +0000 (20:49 -0700)]
dzn: Annotate sometimes-unused variables.

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>

2 years agonir: Use util_mask_sign_extend when serializing constants
Jason Ekstrand [Fri, 1 Jul 2022 18:50:58 +0000 (13:50 -0500)]
nir: Use util_mask_sign_extend when serializing constants

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17214>

2 years agopanfrost,asahi: Use util_sign_extend for unpacking
Jason Ekstrand [Thu, 23 Jun 2022 18:19:12 +0000 (13:19 -0500)]
panfrost,asahi: Use util_sign_extend for unpacking

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17214>

2 years agointel/decoder: Use util_mask_sign_extend()
Jason Ekstrand [Thu, 23 Jun 2022 18:05:14 +0000 (13:05 -0500)]
intel/decoder: Use util_mask_sign_extend()

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17214>

2 years agoisl: Use util_sign_extend
Jason Ekstrand [Thu, 23 Jun 2022 18:00:36 +0000 (13:00 -0500)]
isl: Use util_sign_extend

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17214>

2 years agoutil,nir: Move mask_sign_extend from opt_load_store_vectorize to util
Jason Ekstrand [Thu, 23 Jun 2022 17:55:40 +0000 (12:55 -0500)]
util,nir: Move mask_sign_extend from opt_load_store_vectorize to util

While we're moving it, reformat a bit to make it match util_sign_extend
better.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17214>

2 years agomesa/bptc: Use util_sign_extend
Jason Ekstrand [Thu, 23 Jun 2022 17:52:27 +0000 (12:52 -0500)]
mesa/bptc: Use util_sign_extend

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17214>

2 years agoutil: Use util_sign_extend in fast_idiv_by_const
Jason Ekstrand [Thu, 23 Jun 2022 17:34:51 +0000 (12:34 -0500)]
util: Use util_sign_extend in fast_idiv_by_const

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17214>

2 years agoutil: Use shifts in util_sign_extend
Jason Ekstrand [Thu, 23 Jun 2022 17:30:48 +0000 (12:30 -0500)]
util: Use shifts in util_sign_extend

As long as we left-shift the unsigned version, this has no undefined
behavior and is fewer instructions.  The only tricky bit is that a right
shift of a negative number is technically implementation-defined (not
undefined) behavior in C.  However, if it's ever anything other than an
arithmatic right-shift, there's lots of other places where Mesa will
break today.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17214>

2 years agoutil: Re-indent util_sign_extend, comment, and add asserts
Jason Ekstrand [Thu, 23 Jun 2022 17:23:24 +0000 (12:23 -0500)]
util: Re-indent util_sign_extend, comment, and add asserts

The current implementation depends on both of these things for
correctness.  If width > 64, you get UB wrap-around and, if
val >= (1 << width), the subtract trick won't work.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17214>

2 years agoanv: Replace an assert() with unreachable()
Jason Ekstrand [Fri, 1 Jul 2022 17:10:49 +0000 (12:10 -0500)]
anv: Replace an assert() with unreachable()

Also move it to the end of the switch as is more conventional.  For some
reason, later patches in the series make ANV fail to build because GCC
stops detecting the assert(!"str") as not returning.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17214>

2 years agoaco/optimizer: Optimize SOPC with literal to SOPK.
Georg Lehmann [Sun, 17 Apr 2022 20:14:30 +0000 (22:14 +0200)]
aco/optimizer: Optimize SOPC with literal to SOPK.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15999>

2 years agoaco/optimizer: Convert s_add_u32 with literals to s_add_i32 if carry is not used.
Georg Lehmann [Sun, 17 Apr 2022 12:32:34 +0000 (14:32 +0200)]
aco/optimizer: Convert s_add_u32 with literals to s_add_i32 if carry is not used.

To allow further optimizations to s_addk_i32.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15999>

2 years agoaco/ra: Optimize some SOP2 instructions with literal to SOPK.
Georg Lehmann [Sun, 17 Apr 2022 11:17:20 +0000 (13:17 +0200)]
aco/ra: Optimize some SOP2 instructions with literal to SOPK.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15999>

2 years agoaco/ir: Pad SOP2 and SOPC to the same size as SOPK.
Georg Lehmann [Sun, 17 Apr 2022 19:09:15 +0000 (21:09 +0200)]
aco/ir: Pad SOP2 and SOPC to the same size as SOPK.

Being able to directly cast instructions simplifies optimizations.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15999>

2 years agoaco/ra: Move mac encoding optimization to its own function.
Georg Lehmann [Thu, 19 May 2022 13:50:30 +0000 (15:50 +0200)]
aco/ra: Move mac encoding optimization to its own function.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15999>

2 years agoaco/ra: Static assert that changing instruction type to VOP2 is valid.
Georg Lehmann [Sun, 17 Apr 2022 19:17:18 +0000 (21:17 +0200)]
aco/ra: Static assert that changing instruction type to VOP2 is valid.

It's not obvious that this is correct.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15999>

2 years agoradv/ci: update list of failures against CTS 1.3.3.0
Samuel Pitoiset [Wed, 6 Jul 2022 05:49:54 +0000 (07:49 +0200)]
radv/ci: update list of failures against CTS 1.3.3.0

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17370>

2 years agozink/ci: update list of failures
Samuel Pitoiset [Wed, 6 Jul 2022 05:52:22 +0000 (07:52 +0200)]
zink/ci: update list of failures

These regressions aren't related to LLVM at all and they are fixed
with recent 16-bit related fixes for ACO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17370>