platform/upstream/mesa.git
2 years agointel/compiler: Stop using GLuint in brw_compiler.h
Jason Ekstrand [Thu, 9 Dec 2021 22:47:24 +0000 (16:47 -0600)]
intel/compiler: Stop using GLuint in brw_compiler.h

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14157>

2 years agoaux/trace: add pipe_context::fence_server_signal tracing
Mike Blumenkrantz [Tue, 11 Jan 2022 18:07:24 +0000 (13:07 -0500)]
aux/trace: add pipe_context::fence_server_signal tracing

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14539>

2 years agotu: implement wsi hook to decide if we can present directly on device
Danylo Piliaiev [Mon, 31 May 2021 14:35:24 +0000 (17:35 +0300)]
tu: implement wsi hook to decide if we can present directly on device

This will prevent the driver to take the prime blit path for presentation
in scenarios where it can avoid it.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11091>

2 years agovulkan/wsi: create a common function to compare drm devices
Danylo Piliaiev [Fri, 4 Jun 2021 16:42:08 +0000 (19:42 +0300)]
vulkan/wsi: create a common function to compare drm devices

Effectively moves most of v3dv_wsi_can_present_on_device to the
common code to be used in other drivers.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11091>

2 years agointel/devinfo: deal with i915 topology query change
Lionel Landwerlin [Fri, 25 Jun 2021 07:46:30 +0000 (10:46 +0300)]
intel/devinfo: deal with i915 topology query change

i915 does not report slices accurately anymore on Gfx12.5+. Since this
is information we need to have for performance queries, we need to
rebuild it here.

v2: Remove invalid change to pixel pipes computations (Jordan)

v3: Fix index calculation (Curro)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14297>

2 years agointel/devinfo: split out l3/pixelpipes counting
Lionel Landwerlin [Fri, 25 Jun 2021 07:45:59 +0000 (10:45 +0300)]
intel/devinfo: split out l3/pixelpipes counting

v2: fix up subslice_total store (Lionel)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (v1)
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14297>

2 years agointel/devinfo: Adjust L3 banks for DG2
Jordan Justen [Thu, 20 Aug 2020 20:02:18 +0000 (13:02 -0700)]
intel/devinfo: Adjust L3 banks for DG2

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Co-Authored-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14297>

2 years agointel/dev: extract slice/subslice total computation
Lionel Landwerlin [Wed, 12 Jan 2022 20:17:06 +0000 (22:17 +0200)]
intel/dev: extract slice/subslice total computation

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14297>

2 years agov3d: implement double-buffer mode
Iago Toral Quiroga [Fri, 7 Jan 2022 07:08:00 +0000 (08:08 +0100)]
v3d: implement double-buffer mode

As with Vulkan, we are not enabling this by default since it may
improve of hurt performance depending on the case. Instead, we
can selectively enable it by using the V3D_DEBUG environment
variable.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14551>

2 years agov3dv: implement double-buffer mode
Iago Toral Quiroga [Wed, 5 Jan 2022 10:07:59 +0000 (11:07 +0100)]
v3dv: implement double-buffer mode

Double buffer mode splits the tile buffer size in half so we can
start processing the next tile while the current one is being
stored to memory. This mode is available only if MSAA is not enabled
and can, in theory, improve performance by reducing tile store
overhead, however, it comes at the cost of reducing the tile size,
which also causes some overhead of its own.

Testing shows that this helps some cases (i.e the Vulkan Quake
ports) but hurts others (i.e. Unreal Engine 4), so for the time
being we don't enable this by default but we allow to enable it
selectively by using V3D_DEBUG.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14551>

2 years agovulkan: return default string for undefined enum
Alejandro Piñeiro [Wed, 12 Jan 2022 22:01:46 +0000 (23:01 +0100)]
vulkan: return default string for undefined enum

Instead of a unreachable.

This would avoid an assert on debug builds that uses vkfoo_to_str to
print structure types. This will become more common as some tests will
start to use VK_STRUCTURE_TYPE_MAX_ENUM to mark structures from
unsupported extensions more often.

v2 (Jason):
   * Include enum name on the default message
   * Handle MAX_ENUM as a special case

v3 (Jason):
   * vk_ObjectType_to_ObjectName don't need to use ${enum.name}

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14525>

2 years agov3dv: implement VK_EXT_4444_formats
Iago Toral Quiroga [Thu, 13 Jan 2022 08:00:10 +0000 (09:00 +0100)]
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>

2 years agov3dv: handle formats with reverse flag
Iago Toral Quiroga [Thu, 13 Jan 2022 07:59:00 +0000 (08:59 +0100)]
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>

2 years agov3dv: add swizzle helpers to identify formats wit R/B swap and reverse flags
Iago Toral Quiroga [Thu, 13 Jan 2022 07:55:42 +0000 (08:55 +0100)]
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>

2 years agofreedreno, tu: Export vk_icdGetPhysicalDeviceProcAddr
Charles Giessen [Thu, 23 Dec 2021 19:40:53 +0000 (13:40 -0600)]
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>

2 years agopanvk: Export vk_icdGetPhysicalDeviceProcAddr
Charles Giessen [Thu, 23 Dec 2021 19:29:11 +0000 (13:29 -0600)]
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>

2 years agov3dv: Update LoaderICDInterfaceVersion to v4
Charles Giessen [Thu, 23 Dec 2021 19:20:01 +0000 (13:20 -0600)]
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>

2 years agoradv: Update description of vk_icdNegotiateLoaderICDInterfaceVersion
Charles Giessen [Thu, 23 Dec 2021 19:18:23 +0000 (13:18 -0600)]
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>

2 years agozink: add some nv ci results
Mike Blumenkrantz [Thu, 13 Jan 2022 21:29:53 +0000 (16:29 -0500)]
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>

2 years agozink: remove SpvMemorySemanticsMakeVisibleMask from nir_intrinsic_memory_barrier
Mike Blumenkrantz [Wed, 12 Jan 2022 20:26:22 +0000 (15:26 -0500)]
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>

2 years agoradv: enable radv_disable_aniso_single_level for Battlefield 1 & V
Samuel Pitoiset [Mon, 27 Dec 2021 13:36:34 +0000 (14:36 +0100)]
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: 5ce4017a2bf ("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>

2 years agoradv: allow to disable anisotropic filtering for single level image with drirc
Samuel Pitoiset [Mon, 27 Dec 2021 13:18:59 +0000 (14:18 +0100)]
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>

2 years agopanfrost: Don't double-free when handling error for unsupported GPU
Carsten Haitzler [Wed, 12 Jan 2022 15:36:13 +0000 (15:36 +0000)]
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>

2 years agokmsro: Add komeda DPU
Carsten Haitzler [Wed, 12 Jan 2022 11:39:19 +0000 (11:39 +0000)]
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>

2 years agopanfrost: Add GPU G76 to the set of known ids
Carsten Haitzler [Wed, 12 Jan 2022 15:39:04 +0000 (15:39 +0000)]
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>

2 years agoutil/vbuf: fix buffer translation sizing
Mike Blumenkrantz [Mon, 10 Jan 2022 17:07:50 +0000 (12:07 -0500)]
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: 3c5b7dca30e ("util/vbuf: fix buffer overrun in attribute conversions")

fixes #5846

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

2 years agofreedreno/fdl: Fix reinterpreting "size-compatible" formats
Connor Abbott [Wed, 12 Jan 2022 17:25:57 +0000 (18:25 +0100)]
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>

2 years agov3dv: simplify v3dv_debug_ignored_stype
Alejandro Piñeiro [Wed, 12 Jan 2022 12:16:18 +0000 (13:16 +0100)]
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>

2 years agoradv: only clear VRS_HTILE_ENCODING on GFX10.3+
Samuel Pitoiset [Thu, 13 Jan 2022 07:51:20 +0000 (08:51 +0100)]
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: 9c746157ae4 ("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>

2 years agoglthread: Check out of bounds for MultiDrawElementsBaseVertex cmd
Vadym Shovkoplias [Tue, 11 Jan 2022 08:21:05 +0000 (10:21 +0200)]
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>

2 years agointel: Add *disabled* device ids for DG2
Jordan Justen [Mon, 9 Dec 2019 18:51:40 +0000 (10:51 -0800)]
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>

2 years agointel: Add device info for DG2
Jordan Justen [Mon, 9 Dec 2019 18:51:40 +0000 (10:51 -0800)]
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>

2 years agov3d/doc: do not expose ARB_shader_image_load_store
Juan A. Suarez Romero [Tue, 21 Dec 2021 16:19:58 +0000 (17:19 +0100)]
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>

2 years agomesa: fix MAX_GEOMETRY_IMAGE_UNIFORMS check support
Juan A. Suarez Romero [Thu, 6 Jan 2022 12:35:27 +0000 (13:35 +0100)]
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>

2 years agomesa/st: do not expose ARB_shader_image_load_store if not fully implemented
Juan A. Suarez Romero [Tue, 21 Dec 2021 16:02:12 +0000 (17:02 +0100)]
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>

2 years agod3d12: enable PIPE_CAP_IMAGE_STORE_FORMATTED
Juan A. Suarez Romero [Fri, 7 Jan 2022 17:47:06 +0000 (18:47 +0100)]
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>

2 years agosoftpipe: enable PIPE_CAP_IMAGE_STORE_FORMATTED
Juan A. Suarez Romero [Tue, 21 Dec 2021 15:43:39 +0000 (16:43 +0100)]
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>

2 years agoanv: fix perf queries
Lionel Landwerlin [Thu, 6 Jan 2022 14:45:57 +0000 (14:45 +0000)]
anv: fix perf queries

We're not saving the first pool.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 36ea90a3619f ("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>

2 years agomesa/st: Assert that NIR drivers that support tess use tess levels as inputs
Jesse Natalie [Tue, 4 Jan 2022 19:34:01 +0000 (11:34 -0800)]
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\9aák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14401>

2 years agoaux/trace: copy over stream_output_target_offset method from context
Mike Blumenkrantz [Mon, 10 Jan 2022 16:04:11 +0000 (11:04 -0500)]
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>

2 years agozink: add flake
Mike Blumenkrantz [Thu, 13 Jan 2022 02:15:31 +0000 (21:15 -0500)]
zink: add flake

smh

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

2 years agofreedreno: Update chip-ids
Rob Clark [Tue, 11 Jan 2022 23:36:22 +0000 (15:36 -0800)]
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>

2 years agofreedreno: Handle wildcard fuse-id in device matching
Rob Clark [Thu, 16 Dec 2021 21:27:32 +0000 (13:27 -0800)]
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>

2 years agofreedreno: Rearrange dev_id_compare() logic
Rob Clark [Thu, 16 Dec 2021 21:09:40 +0000 (13:09 -0800)]
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>

2 years agofreedreno: Small dev_id_compare() cleanup
Rob Clark [Thu, 16 Dec 2021 19:33:34 +0000 (11:33 -0800)]
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>

2 years agoturnip: Porting to common implementation for timeline semaphore
Hyunjun Ko [Wed, 12 Jan 2022 02:12:19 +0000 (02:12 +0000)]
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>

2 years agoturnip: Porting to common vulkan implementation for synchronization.
Hyunjun Ko [Wed, 12 Jan 2022 02:11:13 +0000 (02:11 +0000)]
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>

2 years agovulkan: fix typo
Hyunjun Ko [Fri, 3 Dec 2021 08:50:57 +0000 (08:50 +0000)]
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>

2 years agoturnip: Use the new common device lost tracking
Hyunjun Ko [Thu, 18 Nov 2021 04:05:27 +0000 (04:05 +0000)]
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>

2 years agointel: add swizzle flag into driver uuid
Jianxun Zhang [Mon, 10 Jan 2022 22:11:40 +0000 (14:11 -0800)]
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>

2 years agointel: remove chipset_id
Jianxun Zhang [Mon, 10 Jan 2022 19:59:10 +0000 (11:59 -0800)]
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>

2 years agointel: dump PCI info in intel_dev_info
Jianxun Zhang [Thu, 6 Jan 2022 01:44:57 +0000 (17:44 -0800)]
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>

2 years agoanv: remove private pci fields
Jianxun Zhang [Thu, 6 Jan 2022 18:43:13 +0000 (10:43 -0800)]
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>

2 years agointel: use PCI info to compute device uuid
Jianxun Zhang [Thu, 6 Jan 2022 18:12:13 +0000 (10:12 -0800)]
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>

2 years agointel: provide pci bus and dev info in base device struct
Jianxun Zhang [Thu, 6 Jan 2022 00:48:28 +0000 (16:48 -0800)]
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>

2 years agovenus: VkExternalImageFormatProperties is optional
Yiwei Zhang [Tue, 11 Jan 2022 22:01:22 +0000 (22:01 +0000)]
venus: VkExternalImageFormatProperties is optional

It's optional even if VkPhysicalDeviceExternalImageFormatInfo is there.

Fixes: 108f386a612 ("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>

2 years agodocs: update calendar and link releases notes for 21.3.4
Eric Engestrom [Wed, 12 Jan 2022 21:57:54 +0000 (21:57 +0000)]
docs: update calendar and link releases notes for 21.3.4

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

2 years agodocs: add release notes for 21.3.4
Eric Engestrom [Wed, 12 Jan 2022 21:32:23 +0000 (21:32 +0000)]
docs: add release notes for 21.3.4

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

2 years agonir/opt_if: also merge break statements with ones after the branch
Daniel Schürmann [Fri, 30 Oct 2020 21:56:52 +0000 (22:56 +0100)]
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>

2 years agonir/opt_if: merge two break statements from both branch legs
Daniel Schürmann [Mon, 9 Nov 2020 20:28:08 +0000 (21:28 +0100)]
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>

2 years agovulkan/overlay: support Vulkan 1.2
Caleb Callaway [Mon, 22 Nov 2021 20:06:14 +0000 (12:06 -0800)]
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>

2 years agovirgl: disable texture uploads with copy transfers
Chia-I Wu [Tue, 11 Jan 2022 18:12:10 +0000 (10:12 -0800)]
virgl: disable texture uploads with copy transfers

This disables cdc480585c9 ("virgl/drm: New optimization for uploading
textures") effectively.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lepton Wu <lepton@chromium.org>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14497>

2 years agodocs: move the release for 22.0 out
Dylan Baker [Tue, 11 Jan 2022 21:15:50 +0000 (13:15 -0800)]
docs: move the release for 22.0 out

Between a troubles with Marge and FD.O, and requests for a bit more
time for a few patches to land, we're going to bump the release out by
three weeks.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14502>

2 years agoci: Add paraview traces to several drivers.
Emma Anholt [Tue, 11 Jan 2022 20:48:11 +0000 (12:48 -0800)]
ci: Add paraview traces to several drivers.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14501>

2 years agoci/llvmpipe: Add a trace for the game JVGS, which got regressed recently.
Emma Anholt [Tue, 11 Jan 2022 20:47:46 +0000 (12:47 -0800)]
ci/llvmpipe: Add a trace for the game JVGS, which got regressed recently.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14501>

2 years agoci/llvmpipe: Sort the list of traces.
Emma Anholt [Tue, 11 Jan 2022 20:46:29 +0000 (12:46 -0800)]
ci/llvmpipe: Sort the list of traces.

so I don't have to deliberate about where to put new ones.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14501>

2 years agoradv: set radv_split_fma=true for Proton SotTR
Rhys Perry [Fri, 7 Jan 2022 14:30:26 +0000 (14:30 +0000)]
radv: set radv_split_fma=true for Proton SotTR

The game seems to expect fma to be unfused. Fixes depth-prepass artifacts.

I haven't tested the D3D12 version, but I think it doesn't work and needs
sparse depth/stencil images.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14458>

2 years agoradv: add RADV_DEBUG=splitfma
Rhys Perry [Fri, 7 Jan 2022 14:27:29 +0000 (14:27 +0000)]
radv: add RADV_DEBUG=splitfma

This splits application-provided FMA in vertex/geometry/tesselation/mesh
shaders.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14458>

2 years agolima: remove not needed lie about PIPE_CAP_OCCLUSION_QUERY
Christian Gmeiner [Sat, 1 Jan 2022 15:09:21 +0000 (16:09 +0100)]
lima: remove not needed lie about PIPE_CAP_OCCLUSION_QUERY

Occlusion queries are supported always but only the number of
supported samples differ.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14361>

2 years agoi915: remove not needed lie about PIPE_CAP_OCCLUSION_QUERY
Christian Gmeiner [Sat, 1 Jan 2022 15:07:44 +0000 (16:07 +0100)]
i915: remove not needed lie about PIPE_CAP_OCCLUSION_QUERY

Occlusion queries are supported always but only the number of
supported samples differ. This also removes I915_LIE debug
option.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14361>

2 years agovc4: remove not needed lie about PIPE_CAP_OCCLUSION_QUERY
Christian Gmeiner [Sat, 1 Jan 2022 15:01:35 +0000 (16:01 +0100)]
vc4: remove not needed lie about PIPE_CAP_OCCLUSION_QUERY

Occlusion queries are supported always but only the number of
supported samples differ.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14361>

2 years agobroadcom/ci: use .test-manual-mr
Christian Gmeiner [Sat, 1 Jan 2022 15:11:59 +0000 (16:11 +0100)]
broadcom/ci: use .test-manual-mr

Allow the jobs to be available for MRs.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14361>

2 years agomesa: always support occlusion queries
Christian Gmeiner [Fri, 31 Dec 2021 08:39:58 +0000 (09:39 +0100)]
mesa: always support occlusion queries

Excerpt from ARB_occlusion_query.txt:
  An implementation can either set QUERY_COUNTER_BITS_ARB to the
  value 0, or to some number greater than or equal to n.  If an
  implementation returns 0 for QUERY_COUNTER_BITS_ARB, then the
  occlusion queries will always return that zero samples passed the
  occlusion test, and so an application should not use occlusion queries
  on that implementation.

This looks more sane for drivers wanting desktop gl 1.5 without real
hw support then just faking it.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14361>

2 years agoRevert "ci: disable vs2019 windows build"
Daniel Stone [Wed, 12 Jan 2022 12:57:32 +0000 (12:57 +0000)]
Revert "ci: disable vs2019 windows build"

This reverts commit 567a9550d78a92815e7075eda42c38519b73c0b2.

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

2 years agofreedreno: drop dead assignment
Thomas H.P. Andersen [Tue, 11 Jan 2022 20:45:30 +0000 (21:45 +0100)]
freedreno: drop dead assignment

width0 was introduced in e11a239e8ca642414a61ac6fddf442a269a51d92

Its use was dropped in 979e7e3680792dc23d434295edd10b161af8aee3

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

2 years agofreedreno: silence sometimes-uninitialized warning
Thomas H.P. Andersen [Tue, 11 Jan 2022 20:44:20 +0000 (21:44 +0100)]
freedreno: silence sometimes-uninitialized warning

Clang does not see that this is unreachable and thus
thinks that opc will be used uninitialized later.

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

2 years agoradeon/vcn: enable dynamic dpb Tier2 for hevc dec vaapi path
Ruijing Dong [Mon, 10 Jan 2022 21:26:03 +0000 (16:26 -0500)]
radeon/vcn: enable dynamic dpb Tier2 for hevc dec vaapi path

keep omx hevc decoding using the current mode, set dpb Tier2 for
vaapi hevc decoding mode as default.

Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14484>

2 years agoradeon/vcn: enable dynamic dpb Tier2 support for h264 dec vaapi path
Ruijing Dong [Mon, 10 Jan 2022 20:03:15 +0000 (15:03 -0500)]
radeon/vcn: enable dynamic dpb Tier2 support for h264 dec vaapi path

By disabling h264 enxtension flag to let vaapi application manage the
dpb buffers. The calculation of the non_exist_flags for h264 reference
frames needs to consider both frame number and POC in the reference
picture list, set this flag only if both of the frame number and POC
are not existed in the valid reference lists; otherwise, that reference
frame is considered valid.

Also enabled drm buffer in dynamic dpb Tier2.

Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14484>

2 years agofrontends/va: preparing to disable h264 extension flag in vaapi dec path
Ruijing Dong [Mon, 10 Jan 2022 16:57:53 +0000 (11:57 -0500)]
frontends/va: preparing to disable h264 extension flag in vaapi dec path

In frame reference frame, the top/bottom field reference flag also needs
to be set, so does the long term reference flag.

Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14484>

2 years agofrontends/omx: preserve omx to keep current mode for avc decoding
Ruijing Dong [Mon, 10 Jan 2022 16:29:52 +0000 (11:29 -0500)]
frontends/omx: preserve omx to keep current mode for avc decoding

Preparing to disable h264 extension flag in vaapi path, and this change
will not affect omx.

Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14484>

2 years agozink: ci updates
Mike Blumenkrantz [Wed, 12 Jan 2022 02:49:18 +0000 (21:49 -0500)]
zink: ci updates

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

2 years agozink: use even more accurate stride values for query result copies
Mike Blumenkrantz [Wed, 5 Jan 2022 16:05:13 +0000 (11:05 -0500)]
zink: use even more accurate stride values for query result copies

this shouldn't be used at all, but some drivers get it wrong and I don't want
to have to fix every driver

Fixes: 039ed2de94d ("zink: always use type size for query result copy stride")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14397>

2 years agoRevert "zink: when performing an implicit reset, sync qbos"
Mike Blumenkrantz [Tue, 4 Jan 2022 18:06:38 +0000 (13:06 -0500)]
Revert "zink: when performing an implicit reset, sync qbos"

this appeared to fix some sort of bug related to preserving qbo data,
but really there shouldn't have been any sort of bug anyway since the qbos
all get read back, and thus the data is already preserved

instead, it just preserved the query id, which overloaded the pools and crashed

This reverts commit 79790e276f61f23217badd80c51add755dfe18ac.

fixes #5669

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14397>

2 years agozink: skip readback of qbos with no results
Mike Blumenkrantz [Tue, 4 Jan 2022 18:04:07 +0000 (13:04 -0500)]
zink: skip readback of qbos with no results

this is a no-op and also crashes

Fixes: 93190be1b99 ("zink: rewrite query internals")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14397>

2 years agozink: fix availability buffer sizing/copying for xfb queries
Mike Blumenkrantz [Fri, 7 Jan 2022 14:44:34 +0000 (09:44 -0500)]
zink: fix availability buffer sizing/copying for xfb queries

xfb queries have 2 results, and the availability bit is a 3rd result, so
the buffer size has to be at least that big and the copy offset has to reflect
the number of xfb results in the src offset

cc: mesa-stable

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14397>

2 years agozink: always set number of timestamp results to 1 for internal qbo
Mike Blumenkrantz [Fri, 7 Jan 2022 14:41:44 +0000 (09:41 -0500)]
zink: always set number of timestamp results to 1 for internal qbo

timestamp queries don't accumulate results

Fixes: 93190be1b99 ("zink: rewrite query internals")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14397>

2 years agozink: add a better threshold for clamping query pool resets on suspend
Mike Blumenkrantz [Tue, 4 Jan 2022 17:47:15 +0000 (12:47 -0500)]
zink: add a better threshold for clamping query pool resets on suspend

these pools should be dumped even if they aren't used

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14397>

2 years agonir: refactor nir_opt_move
Daniel Schürmann [Fri, 31 Jan 2020 16:44:19 +0000 (17:44 +0100)]
nir: refactor nir_opt_move

This patch is a rewrite of nir_opt_move.
Differently from the previous version, each instruction is checked
if it can be moved downwards and then inserted before the first user
of the definition. The advantage is that less insert operations are
performed, the original order is kept if two movable instructions have
the same first user, and instructions without user in the same block
are moved towards the end.

v2: Only return true if an instruction really changed the position.
    Don't care for discards, this will be handled by another MR.
v3: fix self-referring phis and update according to nir_can_move_instr().
v4: use nir_can_move_instr() and nir_instr_ssa_def()
v5: deduplicate some code

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3657>

2 years agointel/devinfo: drop num_eus_per_subslice field
Lionel Landwerlin [Fri, 25 Jun 2021 08:23:23 +0000 (11:23 +0300)]
intel/devinfo: drop num_eus_per_subslice field

This field is an average computation that is not actually useful for
any of our driver code.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14510>

2 years agointel/devinfo: add a helper to check for slice availability
Lionel Landwerlin [Wed, 23 Jun 2021 15:26:28 +0000 (18:26 +0300)]
intel/devinfo: add a helper to check for slice availability

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14510>

2 years agointel/devinfo: printout devinfo struct size
Lionel Landwerlin [Fri, 25 Jun 2021 07:44:44 +0000 (10:44 +0300)]
intel/devinfo: printout devinfo struct size

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14510>

2 years agointel/devinfo: printout pixel pipes in info printout
Lionel Landwerlin [Fri, 25 Jun 2021 07:44:29 +0000 (10:44 +0300)]
intel/devinfo: printout pixel pipes in info printout

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14510>

2 years agoradeonsi/tests: add expected results for vega20
Pierre-Eric Pelloux-Prayer [Fri, 7 Jan 2022 13:01:52 +0000 (14:01 +0100)]
radeonsi/tests: add expected results for vega20

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

2 years agoradeonsi/tests: update expected results
Pierre-Eric Pelloux-Prayer [Fri, 7 Jan 2022 13:01:34 +0000 (14:01 +0100)]
radeonsi/tests: update expected results

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

2 years agoradeonsi,radv: fix usages of surf_pitch
Pierre-Eric Pelloux-Prayer [Fri, 7 Jan 2022 08:01:27 +0000 (09:01 +0100)]
radeonsi,radv: fix usages of surf_pitch

For linear textures, pitch[level] should be used instead.

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

2 years agoradeonsi/gfx10: fix si_texture_get_offset for mipmapped tex
Pierre-Eric Pelloux-Prayer [Thu, 6 Jan 2022 13:07:18 +0000 (14:07 +0100)]
radeonsi/gfx10: fix si_texture_get_offset for mipmapped tex

Pitch can be different per-level so adjust stride and offset.

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

2 years agoradv: fix computing the fb size in presence of dynamic VRS attachment
Samuel Pitoiset [Thu, 6 Jan 2022 15:56:21 +0000 (16:56 +0100)]
radv: fix computing the fb size in presence of dynamic VRS attachment

This fixes
dEQP-VK.fragment_shading_rate.dynamic_rendering.attachment_rate.*.

Fixes: e914a6710fd ("radv: Expose the VK_KHR_dynamic_rendering extension.")
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/14421>

2 years agoradv: reset VRS if the current subpass doesn't have a VRS attachment
Samuel Pitoiset [Fri, 7 Jan 2022 08:56:48 +0000 (09:56 +0100)]
radv: reset VRS if the current subpass doesn't have a VRS attachment

With a scenario like:
BeginRP(DS + VRS att)
Draw()
EndRP()
BeginRP(same DS)
Draw()
EndRP()

The second draw shouldn't use VRS but it did because the VRS bit
is always set during DS surface initialization if a surface can use VRS.
So, it would have been using the previous copied VRS rates.

Found by inspection.

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

2 years agoradv: stop checking if dynamic states changed
Samuel Pitoiset [Wed, 18 Aug 2021 08:36:28 +0000 (10:36 +0200)]
radv: stop checking if dynamic states changed

This is costly for the CPU and might hurt "good" applications that
already avoid that like DXVK/vkd3d-proton.

Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5009
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/12441>

2 years agoci: disable vs2019 windows build
Lionel Landwerlin [Wed, 12 Jan 2022 08:27:01 +0000 (10:27 +0200)]
ci: disable vs2019 windows build

Failing with :

   error during connect: In the default daemon configuration on
   Windows, the docker client must be run with elevated privileges to
   connect.: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/auth:
   open //./pipe/docker_engine: The system cannot find the file
   specified.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14509>