platform/upstream/mesa.git
11 months agodocs: add two nvk exts to features.txt
Dave Airlie [Sun, 6 Aug 2023 21:53:50 +0000 (07:53 +1000)]
docs: add two nvk exts to features.txt

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

11 months agointel/decoder: Make intel_spec_load_filename() have separate dir and name strings
Jordan Justen [Wed, 28 Dec 2022 21:48:53 +0000 (13:48 -0800)]
intel/decoder: Make intel_spec_load_filename() have separate dir and name strings

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

11 months agointel/decoder: Add intel_spec_load_common()
Jordan Justen [Wed, 28 Dec 2022 21:26:34 +0000 (13:26 -0800)]
intel/decoder: Add intel_spec_load_common()

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

11 months agointel/decoder: Fix xml filename when verx10 % 10 is not 0
Jordan Justen [Wed, 28 Dec 2022 18:20:20 +0000 (10:20 -0800)]
intel/decoder: Fix xml filename when verx10 % 10 is not 0

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

11 months agor600/sfn: Take source uses into account when switching channels
Gert Wollny [Sun, 6 Aug 2023 18:42:07 +0000 (20:42 +0200)]
r600/sfn: Take source uses into account when switching channels

When we switch the channels by re-creating vec4 values we have to
take into account that the source values may be used in an ALU op,
and with that we have to take read-port limitations into account.

Fixes: 18a8d148d862d4a0f5b83f4385f00cf8a4a71b6d
    r600/sfn: Cleanup copy-prop into vec4 source values

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24519>

11 months agonvk: Call nir_lower_int64
Faith Ekstrand [Sun, 6 Aug 2023 16:35:26 +0000 (11:35 -0500)]
nvk: Call nir_lower_int64

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

11 months agonvk: Use more consistent device variable names
Faith Ekstrand [Sun, 6 Aug 2023 16:55:43 +0000 (11:55 -0500)]
nvk: Use more consistent device variable names

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

11 months agoci/freedreno: document another flakes on Adreno 530
David Heidelberg [Sat, 5 Aug 2023 07:54:43 +0000 (10:54 +0300)]
ci/freedreno: document another flakes on Adreno 530

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24511>

11 months agonv50/ir: convert system values to gl_system_value
Karol Herbst [Wed, 2 Aug 2023 13:34:29 +0000 (15:34 +0200)]
nv50/ir: convert system values to gl_system_value

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24447>

11 months agonv50/ir: use own info struct for sys vals
Karol Herbst [Wed, 2 Aug 2023 13:32:37 +0000 (15:32 +0200)]
nv50/ir: use own info struct for sys vals

This makes it more obvious what's actually needed by the driver and allows
us to drop some code in the nir to nvir step.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24447>

11 months agonvk: Enable the new UAPI
Faith Ekstrand [Thu, 3 Aug 2023 23:32:45 +0000 (18:32 -0500)]
nvk: Enable the new UAPI

We also add a meson option to disable it and re-enable the legacy API.
This code probably won't last long but it gives developers the option.

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

11 months agonvk: Print an error message if VM_BIND support is missing
Faith Ekstrand [Fri, 4 Aug 2023 17:03:16 +0000 (12:03 -0500)]
nvk: Print an error message if VM_BIND support is missing

This should prevent a lot of bug reports.

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

11 months agonouveau/winsys: Allow nouveau_ws_device_new() without VM_BIND
Faith Ekstrand [Fri, 4 Aug 2023 16:59:21 +0000 (11:59 -0500)]
nouveau/winsys: Allow nouveau_ws_device_new() without VM_BIND

Silently fall back to non-VM_BIND.  The client can check for the
has_vm_bind flag in the device to detect whether VM_BIND is actually
available or not.

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

11 months agonvk: add new internal bo allocation flag.
Dave Airlie [Sun, 23 Jul 2023 23:38:44 +0000 (09:38 +1000)]
nvk: add new internal bo allocation flag.

This is to allow the kernel to use a single resv object, this might
need more work.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonvk: Use an empty EXEC for the empty submit case
Faith Ekstrand [Fri, 21 Jul 2023 20:03:25 +0000 (15:03 -0500)]
nvk: Use an empty EXEC for the empty submit case

The new UAPI allows for an EXEC with zero pushes just fine so we no
longer need the no-op push just for synchronization.  This lets us drop
the whole empty push we allocate per-queue as well.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonvk: enable sparse residency buffer on maxwell+
Dave Airlie [Thu, 20 Jul 2023 04:52:00 +0000 (14:52 +1000)]
nvk: enable sparse residency buffer on maxwell+

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonvk: enable a bunch of external fence/semaphore bits
Dave Airlie [Wed, 19 Jul 2023 01:27:33 +0000 (11:27 +1000)]
nvk: enable a bunch of external fence/semaphore bits

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonvk: enable sparse features
Dave Airlie [Tue, 10 Jan 2023 22:20:10 +0000 (08:20 +1000)]
nvk: enable sparse features

There is a bug on my turing with
dEQP-VK.sparse_resources.buffer.ssbo.sparse_residency.buffer_size_2_24
but none of the others and we aren't seeing it on some other devices.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonvk: Handle pre-turing indirect buffers with sparse
Dave Airlie [Wed, 22 Mar 2023 03:14:37 +0000 (13:14 +1000)]
nvk: Handle pre-turing indirect buffers with sparse

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonvk/queue: add support for syncobjs and sparse binds
Dave Airlie [Tue, 10 Jan 2023 22:19:41 +0000 (08:19 +1000)]
nvk/queue: add support for syncobjs and sparse binds

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonvk: Add support for sparse images
Dave Airlie [Tue, 10 Jan 2023 22:18:44 +0000 (08:18 +1000)]
nvk: Add support for sparse images

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonvk: Add support for sparse buffers
Dave Airlie [Wed, 19 Jul 2023 21:45:27 +0000 (16:45 -0500)]
nvk: Add support for sparse buffers

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonouveau/mme: Support the new UAPI
Faith Ekstrand [Mon, 24 Jul 2023 19:26:09 +0000 (14:26 -0500)]
nouveau/mme: Support the new UAPI

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonouveau/winsys: add support for the vma bind interfaces
Dave Airlie [Tue, 10 Jan 2023 22:12:22 +0000 (08:12 +1000)]
nouveau/winsys: add support for the vma bind interfaces

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonvk: always sync internal cmd bufs for vma lifetimes.
Dave Airlie [Wed, 2 Nov 2022 06:54:33 +0000 (16:54 +1000)]
nvk: always sync internal cmd bufs for vma lifetimes.

We always sync on the internal push buf submissions for zero vram
and ctx setup, these shouldn't be bottlenecks.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonouveau/shim: Use the imported nouveau_drm.h headers
Faith Ekstrand [Mon, 31 Jul 2023 13:42:46 +0000 (08:42 -0500)]
nouveau/shim: Use the imported nouveau_drm.h headers

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

11 months agonvk: Use the imported nouveau_drm.h headers
Faith Ekstrand [Mon, 31 Jul 2023 13:42:14 +0000 (08:42 -0500)]
nvk: Use the imported nouveau_drm.h headers

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

11 months agonouveau/winsys: Use the imported nouveau_drm.h headers
Faith Ekstrand [Mon, 31 Jul 2023 13:30:57 +0000 (08:30 -0500)]
nouveau/winsys: Use the imported nouveau_drm.h headers

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

11 months agodrm-uapi: Import nouveau_drm.h
Faith Ekstrand [Mon, 31 Jul 2023 13:22:50 +0000 (08:22 -0500)]
drm-uapi: Import nouveau_drm.h

From https://cgit.freedesktop.org/drm-misc/

    commit e02238990b1ab2dfc8abb4c28369f1da6e863f81
    Author: Danilo Krummrich <dakr@redhat.com>
    Date:   Fri Aug 4 20:23:43 2023 +0200

        drm/nouveau: new VM_BIND uAPI interfaces

Signed-off-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonouveau: Move shader topology info to nv_device_info
Faith Ekstrand [Fri, 4 Aug 2023 16:17:14 +0000 (11:17 -0500)]
nouveau: Move shader topology info to nv_device_info

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

11 months agonvk: Decorate CmdBegin/EndRendering entrypoints
Faith Ekstrand [Fri, 4 Aug 2023 15:46:05 +0000 (10:46 -0500)]
nvk: Decorate CmdBegin/EndRendering entrypoints

These decorations are necessary for proper building on Android and
Windows.  You don't notice them in regular Linux builds, though.

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

11 months agonvk: Implement GetRenderingAreaGranularityKHR
Faith Ekstrand [Fri, 4 Aug 2023 15:45:25 +0000 (10:45 -0500)]
nvk: Implement GetRenderingAreaGranularityKHR

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

11 months agonvk: Implement CmdBindIndexBuffer2KHR
Faith Ekstrand [Fri, 4 Aug 2023 15:43:15 +0000 (10:43 -0500)]
nvk: Implement CmdBindIndexBuffer2KHR

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

11 months agonvk: Use VkBufferUsageFlags2
Faith Ekstrand [Fri, 4 Aug 2023 15:41:23 +0000 (10:41 -0500)]
nvk: Use VkBufferUsageFlags2

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

11 months agonvk: Implement the maintenance5 image layout queries
Faith Ekstrand [Fri, 4 Aug 2023 15:35:24 +0000 (10:35 -0500)]
nvk: Implement the maintenance5 image layout queries

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

11 months agonvk: Rework memory requirements to handle aspects correctly
Faith Ekstrand [Wed, 2 Aug 2023 16:36:41 +0000 (11:36 -0500)]
nvk: Rework memory requirements to handle aspects correctly

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

11 months agonvk: Misc. style nits
Faith Ekstrand [Fri, 4 Aug 2023 00:54:35 +0000 (19:54 -0500)]
nvk: Misc. style nits

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

11 months agonvk: enable EXT_depth_clip_enable
Dave Airlie [Wed, 26 Jul 2023 07:37:37 +0000 (17:37 +1000)]
nvk: enable EXT_depth_clip_enable

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

11 months agonvk: enable EXT_depth_clip_control
Dave Airlie [Wed, 26 Jul 2023 07:27:43 +0000 (17:27 +1000)]
nvk: enable EXT_depth_clip_control

This is already handled in the dynamic state.

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

11 months agonvk: Implement CopyQueryPoolResults with a compute shader
Faith Ekstrand [Wed, 2 Aug 2023 16:48:22 +0000 (11:48 -0500)]
nvk: Implement CopyQueryPoolResults with a compute shader

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

11 months agonvk: Separate the MME query copy code out a bit
Faith Ekstrand [Wed, 2 Aug 2023 16:47:26 +0000 (11:47 -0500)]
nvk: Separate the MME query copy code out a bit

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

11 months agonvk: Enable the SPIR-V DeviceGroup capability
Faith Ekstrand [Wed, 2 Aug 2023 15:48:23 +0000 (10:48 -0500)]
nvk: Enable the SPIR-V DeviceGroup capability

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

11 months agonvk: Add support for variable pointers
Faith Ekstrand [Wed, 2 Aug 2023 12:26:10 +0000 (07:26 -0500)]
nvk: Add support for variable pointers

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

11 months agonvk: Add a root_desc_addr to the root descriptor table
Faith Ekstrand [Wed, 2 Aug 2023 11:27:44 +0000 (06:27 -0500)]
nvk: Add a root_desc_addr to the root descriptor table

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

11 months agonvk: Use nvk_root_descriptor_offset for drawInfoBase
Faith Ekstrand [Wed, 2 Aug 2023 14:54:47 +0000 (09:54 -0500)]
nvk: Use nvk_root_descriptor_offset for drawInfoBase

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

11 months agonvk: Rework multi-plane format features a bit
Faith Ekstrand [Wed, 2 Aug 2023 09:34:10 +0000 (04:34 -0500)]
nvk: Rework multi-plane format features a bit

We need to avoid returning certain feature flags such as rendering or
storage from vkGetPhysicalDeviceFormatFeatures*() but still allow those
for single-plane views of the image which means allowing them in
vkGetPhysicalDeviceImageFormatProperties*().

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

11 months agonvk: Improve image format properties and limits
Faith Ekstrand [Wed, 2 Aug 2023 04:49:24 +0000 (23:49 -0500)]
nvk: Improve image format properties and limits

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

11 months agonouveau/nvk: Enable VK_KHR_sampler_ycbcr
Mohamed Ahmed [Tue, 4 Jul 2023 22:46:06 +0000 (01:46 +0300)]
nouveau/nvk: Enable VK_KHR_sampler_ycbcr

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

11 months agonouveau/nvk: Add multiple sampler planes for CONVERSION_SEPARATE_RECONSTRUCTION_FILTE...
Mohamed Ahmed [Tue, 25 Jul 2023 11:51:46 +0000 (14:51 +0300)]
nouveau/nvk: Add multiple sampler planes for CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT

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

11 months agonouveau/nvk: Create helper function for sampler creation
Mohamed Ahmed [Sat, 29 Jul 2023 20:55:51 +0000 (23:55 +0300)]
nouveau/nvk: Create helper function for sampler creation

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

11 months agonouveau/nvk: Support multi-plane descriptors in nvk_nir_lower_descriptors.c
Mohamed Ahmed [Thu, 27 Jul 2023 09:46:22 +0000 (12:46 +0300)]
nouveau/nvk: Support multi-plane descriptors in nvk_nir_lower_descriptors.c

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

11 months agonouveau/nvk: Add YCbCr sampler NIR lowering pass
Mohamed Ahmed [Tue, 25 Jul 2023 22:17:45 +0000 (01:17 +0300)]
nouveau/nvk: Add YCbCr sampler NIR lowering pass

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

11 months agonvk: Use the new NIL helper for image level extents for copies
Faith Ekstrand [Tue, 1 Aug 2023 23:26:43 +0000 (18:26 -0500)]
nvk: Use the new NIL helper for image level extents for copies

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

11 months agonil: Add a nil_image_level_extent_px() helper
Faith Ekstrand [Tue, 1 Aug 2023 23:25:55 +0000 (18:25 -0500)]
nil: Add a nil_image_level_extent_px() helper

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

11 months agonvk: enable rgb32 texel buffer support
Dave Airlie [Thu, 20 Jul 2023 05:35:12 +0000 (15:35 +1000)]
nvk: enable rgb32 texel buffer support

This is needed for zink.

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

11 months agonvk: Disable shaderStorageImageReadWithoutFormat pre-Maxwell.
Emma Anholt [Tue, 18 Jul 2023 18:37:14 +0000 (11:37 -0700)]
nvk: Disable shaderStorageImageReadWithoutFormat pre-Maxwell.

On Kepler and earlier, image loads must get lowered based on the declared
format, since we don't have a SULDP op.

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

11 months agonouveau: Drop GART size from nv_device_info
Faith Ekstrand [Mon, 31 Jul 2023 22:27:40 +0000 (17:27 -0500)]
nouveau: Drop GART size from nv_device_info

The kernel always returns something rediculously high, like 40 bits or
something.  There's really no point in us tracking it.

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

11 months agonouveau/codegen: Do not keep redundant info for tessellation domain
George Ouzounoudis [Sun, 30 Jul 2023 12:31:56 +0000 (15:31 +0300)]
nouveau/codegen: Do not keep redundant info for tessellation domain

Just add an assert instead.

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

11 months agonvk: Do not keep redundant info for tessellation domain
George Ouzounoudis [Sun, 30 Jul 2023 12:29:34 +0000 (15:29 +0300)]
nvk: Do not keep redundant info for tessellation domain

This is not needed after merge_tess_info that or's the info of both the
tesc and tese shaders.

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

11 months agonvk: fix independent color write masks.
Dave Airlie [Mon, 31 Jul 2023 07:37:15 +0000 (17:37 +1000)]
nvk: fix independent color write masks.

This fixes:
dEQP-VK.renderpass.suballocation.attachment_write_mask.attachment_count_*

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

11 months agodocs/relnotes: Stick something about NVK in new_features.txt
Faith Ekstrand [Thu, 27 Jul 2023 21:03:38 +0000 (16:03 -0500)]
docs/relnotes: Stick something about NVK in new_features.txt

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

11 months agodocs: Add NVK to features.txt
Faith Ekstrand [Thu, 27 Jul 2023 21:01:31 +0000 (16:01 -0500)]
docs: Add NVK to features.txt

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

11 months agodocs: Add a docs page for NVK
Faith Ekstrand [Thu, 27 Jul 2023 21:17:43 +0000 (16:17 -0500)]
docs: Add a docs page for NVK

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonvk: Don't skip zero-size bindings in GetDescriptorSetLayoutSupport
Faith Ekstrand [Thu, 27 Jul 2023 22:06:57 +0000 (17:06 -0500)]
nvk: Don't skip zero-size bindings in GetDescriptorSetLayoutSupport

We still need to handle them in the case of variable descriptor counts.

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

11 months agonvk: align geometry clip setting with nvc0
Dave Airlie [Wed, 26 Jul 2023 23:38:04 +0000 (09:38 +1000)]
nvk: align geometry clip setting with nvc0

This fixes
dEQP-VK.clipping.clip_volume.depth_clamp.point_list,Fail
dEQP-VK.clipping.clip_volume.depth_clip.point_list,Fail

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

11 months agonvk: Flush more state on VI_BINDINGS_VALID dirty
Faith Ekstrand [Thu, 27 Jul 2023 19:12:05 +0000 (14:12 -0500)]
nvk: Flush more state on VI_BINDINGS_VALID dirty

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

11 months agonvk: Bind 3D depth/stencil images as 2D arrays
Faith Ekstrand [Thu, 27 Jul 2023 04:06:57 +0000 (23:06 -0500)]
nvk: Bind 3D depth/stencil images as 2D arrays

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

11 months agonvk/tess: don't emit patch control points in pipeline
Dave Airlie [Thu, 27 Jul 2023 02:58:28 +0000 (12:58 +1000)]
nvk/tess: don't emit patch control points in pipeline

Let the dynamic state thing emit these.

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

11 months agovulkan/meta: Use vk_meta_get_pipeline_layout in blit/resolve
Faith Ekstrand [Wed, 26 Jul 2023 21:22:20 +0000 (16:22 -0500)]
vulkan/meta: Use vk_meta_get_pipeline_layout in blit/resolve

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

11 months agovulkan/meta: Add a get_pipeline_layout helper
Faith Ekstrand [Wed, 26 Jul 2023 21:20:50 +0000 (16:20 -0500)]
vulkan/meta: Add a get_pipeline_layout helper

This helper handles the cache lookup and constructs a pipeline layout
and a descriptor set layout, as needed, all in one go.  This saves a bit
of boilerplate in the various meta functions.

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

11 months agoRevert "vulkan: Allow scissors or viewports to be set without counts"
Faith Ekstrand [Wed, 26 Jul 2023 19:22:58 +0000 (14:22 -0500)]
Revert "vulkan: Allow scissors or viewports to be set without counts"

This reverts commit b551f26a0caad52de620222e2df8416e80332943.

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

11 months agonvk: Use the new core vk_sampler struct
Faith Ekstrand [Wed, 26 Jul 2023 16:15:19 +0000 (11:15 -0500)]
nvk: Use the new core vk_sampler struct

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

11 months agonvk: enable fp helper invocations loads on more gens
Karol Herbst [Wed, 26 Jul 2023 00:30:32 +0000 (02:30 +0200)]
nvk: enable fp helper invocations loads on more gens

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

11 months agonvk: Require an environment variable for poorly tested hardware
Faith Ekstrand [Wed, 26 Jul 2023 14:31:34 +0000 (09:31 -0500)]
nvk: Require an environment variable for poorly tested hardware

We really only know that Turing and Ampere work right now.  Maxwell has
recieved some testing but still can't survive a CTS run.  Other hardware
is even less well tested.

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

11 months agonouveau: fix max_warps_per_mp_for_sm for builds with asserts disabled
Karol Herbst [Sat, 22 Jul 2023 17:33:45 +0000 (19:33 +0200)]
nouveau: fix max_warps_per_mp_for_sm for builds with asserts disabled

Fixes: 1b756be2bca ("nvk: properly calculate SLM region by taking per arch limits into account")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonvk: properly calculate SLM region by taking per arch limits into account
Karol Herbst [Thu, 20 Jul 2023 20:50:16 +0000 (22:50 +0200)]
nvk: properly calculate SLM region by taking per arch limits into account

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

11 months agonvk: replace mp with tpc
Karol Herbst [Thu, 20 Jul 2023 20:48:58 +0000 (22:48 +0200)]
nvk: replace mp with tpc

The tls space is calculate per TPC, but nouveau also doesn't report the MP
count to us, but the TPC count instead.

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

11 months agonvk: fix num_gprs for Volta+
Karol Herbst [Thu, 20 Jul 2023 13:38:13 +0000 (15:38 +0200)]
nvk: fix num_gprs for Volta+

Fixes OOR_REG errors being thrown

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

11 months agonvk: Implement VK_EXT_physical_device_drm
Faith Ekstrand [Thu, 20 Jul 2023 19:59:54 +0000 (14:59 -0500)]
nvk: Implement VK_EXT_physical_device_drm

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

11 months agonvk: Don't enumerate pre-Kepler GPUs
Faith Ekstrand [Thu, 20 Jul 2023 20:02:12 +0000 (15:02 -0500)]
nvk: Don't enumerate pre-Kepler GPUs

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

11 months agonvk: Move the winsys device to nvk_device
Faith Ekstrand [Thu, 20 Jul 2023 17:49:34 +0000 (12:49 -0500)]
nvk: Move the winsys device to nvk_device

Vulkan requires that different VkDevices be unable to affect each other.
To correctly provide this invariant, each VkDevice really needs its on
virtual address space.  This means opening a new nouveau_device per
nvk_device.  This may make device creation a tiny bit less efficient but
we can fix that with some sort of caching if we absolutely need to.

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

11 months agonvk: Add a ws_dev to nvk_device and use it
Faith Ekstrand [Thu, 20 Jul 2023 17:49:34 +0000 (12:49 -0500)]
nvk: Add a ws_dev to nvk_device and use it

At the moment, this is just a convenient short-hand but we're about to
permanently move the nouveau_ws_device to nvk_device so it will be the
only way to access it soon.

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

11 months agonvk: Rename nvk_device::ctx to ws_ctx
Faith Ekstrand [Thu, 20 Jul 2023 17:47:57 +0000 (12:47 -0500)]
nvk: Rename nvk_device::ctx to ws_ctx

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

11 months agonvk: Use nv_device_info for class checks
Faith Ekstrand [Thu, 20 Jul 2023 17:41:36 +0000 (12:41 -0500)]
nvk: Use nv_device_info for class checks

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

11 months agonouveau: Move gart_size to nv_device_info
Faith Ekstrand [Thu, 20 Jul 2023 17:16:08 +0000 (12:16 -0500)]
nouveau: Move gart_size to nv_device_info

This is more complicated than the others since it is a calculated value.
For nv_device_info struct, we want the raw version that raw query from
the chip.  We move the calculation into nvk_create_drm_physical_device().

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

11 months agonouveau: Move more stuff into nv_device_info
Faith Ekstrand [Tue, 31 Jan 2023 02:53:17 +0000 (20:53 -0600)]
nouveau: Move more stuff into nv_device_info

The device_id and is_integrated fields in nouveau_device can be dropped
entirely since they're redundant with nv_device_info::device_id and
nv_device_info::type.

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

11 months agonvk: Set deviceType based on nv_device_info::type
Faith Ekstrand [Thu, 20 Jul 2023 16:45:40 +0000 (11:45 -0500)]
nvk: Set deviceType based on nv_device_info::type

The is_integrated bool is based on VRAM size which is a bit clunky and
not really what the Vulkan query means.

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

11 months agonouveau: Stop using hex for SM numbers
Faith Ekstrand [Tue, 31 Jan 2023 02:53:17 +0000 (20:53 -0600)]
nouveau: Stop using hex for SM numbers

There's no indication that NVIDIA considers this to be anything other
than a decimal number.  Much to the contrary, the number of 5s and 9s in
the SM number table implies they very much are base 10.  Given that
Lovelace is SM90, we'll likely be hitting 100 fairly soon at which point
this will stop fitting in a uint8_t.  Switch to decimal to compress it
down a bit.

Also, rename the field to SM which beter matches the NVIDIA docs and
ensures that there are no users of this which are likely to be confused.

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

11 months agonouveau: Put PCI info in a pci substruct in nv_device_info
Faith Ekstrand [Thu, 20 Jul 2023 16:30:01 +0000 (11:30 -0500)]
nouveau: Put PCI info in a pci substruct in nv_device_info

We separate out device_id because even non-PCI devices have one.

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

11 months agonvk: Only advertise EXT_pci_bus_info on discrete GPUs
Faith Ekstrand [Thu, 20 Jul 2023 16:32:19 +0000 (11:32 -0500)]
nvk: Only advertise EXT_pci_bus_info on discrete GPUs

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

11 months agonvk: Drop nvk_physical_device::instance
Faith Ekstrand [Thu, 20 Jul 2023 17:54:19 +0000 (12:54 -0500)]
nvk: Drop nvk_physical_device::instance

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

11 months agonvk: Use canonical variable names in nvk_sampler.c
Faith Ekstrand [Thu, 20 Jul 2023 17:43:37 +0000 (12:43 -0500)]
nvk: Use canonical variable names in nvk_sampler.c

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

11 months agonvk: Use canonical variable names in nvk_bo_sync.c
Faith Ekstrand [Thu, 20 Jul 2023 17:23:09 +0000 (12:23 -0500)]
nvk: Use canonical variable names in nvk_bo_sync.c

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

11 months agonvk: Use canonical variable names in nvk_shader.c
Faith Ekstrand [Thu, 20 Jul 2023 16:57:22 +0000 (11:57 -0500)]
nvk: Use canonical variable names in nvk_shader.c

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

11 months agonvk: Use canonical variable names in nvk_physical_device.c
Faith Ekstrand [Thu, 20 Jul 2023 16:55:24 +0000 (11:55 -0500)]
nvk: Use canonical variable names in nvk_physical_device.c

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

11 months agonvk: handle alignments in device memory
Dave Airlie [Tue, 10 Jan 2023 22:10:51 +0000 (08:10 +1000)]
nvk: handle alignments in device memory

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

11 months agonvk: Add an addr field to nvk_image_plane
Faith Ekstrand [Wed, 19 Jul 2023 22:03:30 +0000 (17:03 -0500)]
nvk: Add an addr field to nvk_image_plane

Nothing actually needs the pointer to the memory object so it's better
to not even include it.

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

11 months agonvk: init image fields for requirements
Dave Airlie [Wed, 19 Jul 2023 06:05:49 +0000 (16:05 +1000)]
nvk: init image fields for requirements

Fixes a crash in dEQP-VK.memory.requirements.create_info.*

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

11 months agonvk: Add a buffer alignment helper
Faith Ekstrand [Wed, 19 Jul 2023 22:34:27 +0000 (17:34 -0500)]
nvk: Add a buffer alignment helper

This consolodates buffer alignment calculations into one place,
including physical device queries, buffer creation, and buffer memory
requirements queries.

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

11 months agonvk: Reformat nvk_buffer.c
Faith Ekstrand [Wed, 19 Jul 2023 20:08:04 +0000 (15:08 -0500)]
nvk: Reformat nvk_buffer.c

Mostly, using dev instead of device and re-flow the arguments to
nvk_GetDeviceBufferMemoryRequirements().

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