Commit Graph

148818 Commits

Author SHA1 Message Date
Iago Toral Quiroga fbe4d7ccf4 v3dv: implement VK_EXT_4444_formats
Because these formats are introduced trough an extension, their
enum values are exceedingly large and we cannot use them to index
directly into the format table we had for core formats. Instead,
we put these in a separate table and we always use the
VK_ENUM_OFFSET helper to index into these tables.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14533>
2022-01-14 10:10:10 +00:00
Iago Toral Quiroga 25c46c465d v3dv: handle formats with reverse flag
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14533>
2022-01-14 10:10:10 +00:00
Iago Toral Quiroga 872f08815b v3dv: add swizzle helpers to identify formats wit R/B swap and reverse flags
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14533>
2022-01-14 10:10:10 +00:00
Charles Giessen dbd3935b04 freedreno, tu: Export vk_icdGetPhysicalDeviceProcAddr
Support Loader ICD Interface Version 4 by exporting the function
vk_icdGetPHysicalDeviceProcAddr.

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14299>
2022-01-14 10:26:13 +01:00
Charles Giessen b00fe27015 panvk: Export vk_icdGetPhysicalDeviceProcAddr
Support Loader ICD Interface Version 4 by exporting the function
vk_icdGetPhysicalDeviceProcAddr.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14299>
2022-01-14 10:26:00 +01:00
Charles Giessen 5a37cc1186 v3dv: Update LoaderICDInterfaceVersion to v4
vk_icdNegotiateLoaderICDInterfaceVersion now correctly identifies the
driver as supporting v4. Before, the driver did support the
functionality but didn't report supporting it through the negotiate
function.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14299>
2022-01-14 10:25:50 +01:00
Charles Giessen 9d013f2c24 radv: Update description of vk_icdNegotiateLoaderICDInterfaceVersion
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14299>
2022-01-14 10:25:41 +01:00
Mike Blumenkrantz 307cdb7147 zink: add some nv ci results
just something so I have a vague idea

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14547>
2022-01-13 21:46:34 +00:00
Mike Blumenkrantz f0eb07f98f zink: remove SpvMemorySemanticsMakeVisibleMask from nir_intrinsic_memory_barrier
this is invalid since vk memory model isn't used

cc: mesa-stable

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14540>
2022-01-13 14:57:56 -05:00
Samuel Pitoiset 74b0fbe2e9 radv: enable radv_disable_aniso_single_level for Battlefield 1 & V
Both games seem to have a bug. This can also be reproduced with
AMDVLK since PAL enabled anisotropic filtering for single level images.

Fixes: 5ce4017a2b ("radv,aco: do not disable anisotropy filtering for non-mipmap images")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5753
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/14471>
2022-01-13 16:17:48 +00:00
Samuel Pitoiset e6173ed1d2 radv: allow to disable anisotropic filtering for single level image with drirc
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/14471>
2022-01-13 16:17:48 +00:00
Carsten Haitzler 874f4095c5 panfrost: Don't double-free when handling error for unsupported GPU
Setting the screen ro member before we checked gpu id means the error
case leads to a double-free because screen->ro is set and allocated
by parent who hanbdles de-alloc a second time after we destroyed the
screen we just created because ro was set.

Cc: mesa-stable

Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14516>
2022-01-13 16:01:08 +00:00
Carsten Haitzler 7553aee06b kmsro: Add komeda DPU
Arm Komeda (Mali) display units do exist on a few SoC's. This is the
first time that I've seen Mesa brought up "in anger" on one of these,
thus it has no such knowledge of these DPUs. This adds that to the
kmsro set like a lot of other fairly standard split GPU/DPU devices.

Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14515>
2022-01-13 15:25:44 +00:00
Carsten Haitzler b22294f6d5 panfrost: Add GPU G76 to the set of known ids
This is another working GPU so add the ID to the known set. Working on
real silicon and tested.

Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14517>
2022-01-13 14:59:48 +00:00
Mike Blumenkrantz 596d2ab0ad util/vbuf: fix buffer translation sizing
the original change here attempted to fix calculating the maximum bound for the
mapped readback buffer by adding the maximum attribute size to the final element
used by readback

the calculation was erroneous, however, because it instead calculated the maximum
offset instead of the size, which would cause a different kind of overrun

Fixes: 3c5b7dca30 ("util/vbuf: fix buffer overrun in attribute conversions")

fixes #5846

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14479>
2022-01-13 14:28:23 +00:00
Connor Abbott 8f18c72f9a freedreno/fdl: Fix reinterpreting "size-compatible" formats
It's allowed to reinterpret compressed formats as one of a few
non-compressed formats with the same pixel size as the blocksize of the
compressed format, and vice-versa. If we did this we'd wind up with an
incorrect width/height. Fix that.

Fixes dEQP-VK.image.sample_texture.*.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14520>
2022-01-13 13:44:14 +00:00
Alejandro Piñeiro d7cbe17760 v3dv: simplify v3dv_debug_ignored_stype
mesa_logd already handles having or not DEBUG defined, and also has a
better empty option.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14512>
2022-01-13 13:18:05 +00:00
Samuel Pitoiset 49c1b40290 radv: only clear VRS_HTILE_ENCODING on GFX10.3+
On older chips like GFX9, bit 19 is RB_ALIGNED.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5859
Fixes: 9c746157ae ("radv: reset VRS if the current subpass doesn't have a VRS attachment")
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/14530>
2022-01-13 12:57:39 +00:00
Vadym Shovkoplias fd2fbc558b glthread: Check out of bounds for MultiDrawElementsBaseVertex cmd
Make sure draw count is not high so the MultiDrawElementsBaseVertex cmd
can fit the queue buffer.

v2: add the same check for _mesa_marshal_MultiDrawArrays and add additional
    assert to _mesa_glthread_allocate_command (Pierre-Eric)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5719
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14490>
2022-01-13 12:05:11 +00:00
Jordan Justen 70a4e64685 intel: Add *disabled* device ids for DG2
We are waiting for i915 to enable DG2 in upstream Linux, so for now we
use an "#if 0" around the PCI ids.

Reworks:
 * Merged Lionel's "intel/devinfo: store the different kind of DG2"

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14524>
2022-01-13 09:48:51 +00:00
Jordan Justen 4f9141607f intel: Add device info for DG2
Reworks:
 * Lionel: simulator_id
 * Rafael: has_llc
 * Merged Lionel's "intel/devinfo: store the different kind of DG2"

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14524>
2022-01-13 09:48:51 +00:00
Juan A. Suarez Romero cd678c7029 v3d/doc: do not expose ARB_shader_image_load_store
V3D does not support formatless writings.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14288>
2022-01-13 09:12:35 +00:00
Juan A. Suarez Romero bd70b4f27f mesa: fix MAX_GEOMETRY_IMAGE_UNIFORMS check support
MAX_GEOMETRY_IMAGE_UNIFORMS are supported if geometry shaders and either
ARB_shader_image_load_store or GLES 3.1 are supported.

v2:
 - MAX_GEOMETRY_IMAGE_UNIFORMS shouldn't be supported for GL 3.2 if
   ARB_shader_image_load_store is not supported (Ilia).
 - MAX_TESS_{CONTROL,EVALUATION}_IMAGE_UNIFORMS requires tessellation
   shader support (Anholt).

v3:
 - Use _mesa_is_gles31() function (Ilia).

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14288>
2022-01-13 09:12:35 +00:00
Juan A. Suarez Romero 3b81d2d30d mesa/st: do not expose ARB_shader_image_load_store if not fully implemented
So far we were checking ARB_shader_image_load_store is supported as
requirement to expose GLES 3.1.

But when this extension functionality was added in GLES 3.1 spec, it
was relaxed, and one of its requirements, the support for formatless
writing, was not included.

So this means that a driver that support all the extension
functionality except formatless writing, could expose GLES 3.1, but it
couldn't expose the extension itself (nor GL 4.2, which requires fully
implementation of the extension).

v2:
 - Add the same exposure treatment to ARB_shader_image_size (Ilia).

v3:
 - Remove dependency for OES_texture_buffer (Ilia).
 - Check image resources for GLES 3.1 (Ilia).

v4:
 - Check for MaxImageUniforms in compute shader (Ilia).
 - Check for max combined image uniforms/ssbo (Ilia).

v5:
 - Remove ARB_shader_image_load_store from check (Ilia).
 - ARB_shader_image_store and ARB_shader_image required for
   ARB_ES3_1_compatibility (Ilia).

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14288>
2022-01-13 09:12:35 +00:00
Juan A. Suarez Romero d9bc018854 d3d12: enable PIPE_CAP_IMAGE_STORE_FORMATTED
Required to expose ARB_shader_load_image_store and thus
ARB_compute_shader, which are supported by the driver.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14288>
2022-01-13 09:12:35 +00:00
Juan A. Suarez Romero 5e9b43f505 softpipe: enable PIPE_CAP_IMAGE_STORE_FORMATTED
Required to expose ARB_shader_load_image_store and thus
ARB_compute_shader, which are supported by the driver.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14288>
2022-01-13 09:12:35 +00:00
Lionel Landwerlin 1027b68418 anv: fix perf queries
We're not saving the first pool.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 36ea90a361 ("anv: Convert to the common sync and submit framework")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14420>
2022-01-13 07:54:22 +00:00
Jesse Natalie 545e73d72c mesa/st: Assert that NIR drivers that support tess use tess levels as inputs
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14401>
2022-01-13 07:31:54 +00:00
Mike Blumenkrantz 01709464a4 aux/trace: copy over stream_output_target_offset method from context
this can't be traced, so don't crash

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14481>
2022-01-13 06:09:22 +00:00
Mike Blumenkrantz d0bba3dfbf zink: add flake
smh

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14527>
2022-01-13 05:55:29 +00:00
Rob Clark 4dc406c748 freedreno: Update chip-ids
Counterpoint to https://patchwork.freedesktop.org/series/98772/

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14506>
2022-01-13 05:26:11 +00:00
Rob Clark 785a324deb freedreno: Handle wildcard fuse-id in device matching
A future kernel update will add fuse-id in the upper bits of the
chip_id.  Do avoid breaking device matching, add a way to include
a wildcard/fallback fuse-id.  (Note that this only effects un-
released devices.)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14506>
2022-01-13 05:26:11 +00:00
Rob Clark 6b8e3aeeb7 freedreno: Rearrange dev_id_compare() logic
We're going to need to add a couple more cases.  Let's split up the
existing two cases first, rather than piling on more logic to a single
expression.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14506>
2022-01-13 05:26:11 +00:00
Rob Clark 9176e27dd2 freedreno: Small dev_id_compare() cleanup
We don't really treat the two arguments identically, so rename them to
make it clear which one is the device id coming from kernel, and which
one is the reference id from the fd_dev_recs table.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14506>
2022-01-13 05:26:11 +00:00
Hyunjun Ko 0a82a26a18 turnip: Porting to common implementation for timeline semaphore
Define struct tu_timeline_sync for emulated timeline support in common
implementation that is on top of drm syncobj as a binary sync.

Also implement init/finish/reset/wait_many methods for the struct.

v1. Does not set MSM_SUBMIT_SYNCOBJ_RESET for waiting syncobjs since
it's being managed in the common implementation already.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14105>
2022-01-13 04:01:44 +00:00
Hyunjun Ko 479a1c405e turnip: Porting to common vulkan implementation for synchronization.
This patch ports to common code for VkSemaphore, VkFence and relevant
APIs like vkCreate(Destroy)Semaphore/Fence, vkGetSemaphoreFdKHR, etc.

Accordingly, starts using common vkQueueSubmit with implementing
driver-specific hook.

Also remove all timeline semaphore codes so that we could use common
code in the following patches. This way we could easily see what's
modified in the following patch.

Note that kgsl is not ported in this patch.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14105>
2022-01-13 04:01:44 +00:00
Hyunjun Ko 58aa920706 vulkan: fix typo
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14105>
2022-01-13 04:01:44 +00:00
Hyunjun Ko f976f71fb0 turnip: Use the new common device lost tracking
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14105>
2022-01-13 04:01:44 +00:00
Jianxun Zhang 14a4600b62 intel: add swizzle flag into driver uuid
Suggested by Lionel Landwerlin, we add has_bit6_swizzle as
another input when computing driver uuid.

Also fix miscalculation of the length of driver tag.

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13936>
2022-01-13 03:09:36 +00:00
Jianxun Zhang f43c7185e0 intel: remove chipset_id
The chipset_id should be named after i915 ioctl that's called
to get the device id. In user space this field holds pci device
id in reality. We now have a pci_device_id queried from drm
instead using the ioctl, so there is no much reason to keep
the chipset_id for the same purpose.

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13936>
2022-01-13 03:09:36 +00:00
Jianxun Zhang ddfa3924b3 intel: dump PCI info in intel_dev_info
Dump PCI bus and device info so that we can easily identify output
in a multi-gpu system.

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13936>
2022-01-13 03:09:36 +00:00
Jianxun Zhang 3414ba9a81 anv: remove private pci fields
These fields are in the base device struct 'intel_device_info' now.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5489

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13936>
2022-01-13 03:09:36 +00:00
Jianxun Zhang d86989bf73 intel: use PCI info to compute device uuid
With the new input from PCI bus and device fields, we can compute
device uuids in a multi-gpu system.

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13936>
2022-01-13 03:09:36 +00:00
Jianxun Zhang db8405670a intel: provide pci bus and dev info in base device struct
Having PCI bus and dev info in the base struct
'intel_device_info' enables us to utilize the info across
multiple drivers for several purposes, such as computing
device uuids in a multi-gpu system.

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13936>
2022-01-13 03:09:36 +00:00
Yiwei Zhang 17b753459e venus: VkExternalImageFormatProperties is optional
It's optional even if VkPhysicalDeviceExternalImageFormatInfo is there.

Fixes: 108f386a61 ("venus: initial support for VkPhysicalDevice commands")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14503>
2022-01-13 02:59:51 +00:00
Eric Engestrom cd6377741d docs: update calendar and link releases notes for 21.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14526>
2022-01-13 02:55:35 +00:00
Eric Engestrom 7240b37948 docs: add release notes for 21.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14526>
2022-01-13 02:55:35 +00:00
Daniel Schürmann 79a987ad2a nir/opt_if: also merge break statements with ones after the branch
This optimizations turns

     loop {
        ...
        if (cond1) {
           if (cond2) {
              do_work_1();
              break;
           } else {
              do_work_2();
           }
           do_work_3();
           break;
        } else {
           ...
        }
     }

 into:

     loop {
        ...
        if (cond1) {
           if (cond2) {
              do_work_1();
           } else {
              do_work_2();
              do_work_3();
           }
           break;
        } else {
           ...
        }
     }

As this optimizations moves code into the NIF statement,
it re-iterates on the branch legs in case of success.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7587>
2022-01-13 02:30:32 +00:00
Daniel Schürmann dad609d152 nir/opt_if: merge two break statements from both branch legs
This optimization turns

     loop {
        ...
        if (cond) {
           do_work_1();
           break;
        } else {
           do_work_2();
           break;
        }
     }

 into:

     loop {
        ...
        if (cond) {
           do_work_1();
        } else {
           do_work_2();
        }
        break;
     }

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7587>
2022-01-13 02:30:32 +00:00
Caleb Callaway 64a51293c8 vulkan/overlay: support Vulkan 1.2
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5602
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14465>
2022-01-13 02:02:14 +00:00