Commit Graph

64 Commits

Author SHA1 Message Date
Faith Ekstrand
6af617095b nvk: Rip out old UAPI support
This was mostly generated by

    unifdef -DNVK_NEW_UAPI=1 -m src/nouveau/**/*.h

with a few manual fixups for device features and to remove includes and
strip out the meson bits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25357>
2023-09-26 05:05:26 +00:00
Faith Ekstrand
963d658f09 nvk: SPDX everything
I chose to use "Collabora Ldt. and Red Hat Inc." as the author line.  I
could have gone through and manually checked every single file but I
think it's better to spread the blame around.  No one should actually
trust those lines anyway.  That's what git blame is for.

Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25085>
2023-09-06 17:05:58 +00:00
Faith Ekstrand
1249937b5d nvk: Clean up includes
Drop a bunch of totally unnecessary stuff from xf86drm.h from
nvk_private.h and limit it to vk_util and vk_log.  In particular, we
drop nvk_entrypoints.h which is auto-generated, allowing NVK headers to
be included in other parts of the tree.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25085>
2023-09-06 17:05:58 +00:00
Mohamed Ahmed
c7f109352d nvk: Enable MIDPOINT_CHROMA_SAMPLES_BIT for multi-planar formats only
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24614>
2023-08-16 22:36:27 +00:00
Mohamed Ahmed
b9801a3c08 nvk: Enable SEPARATE_RECONSTRUCTION_FILTER_BIT for multi-planar formats only
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24614>
2023-08-16 22:36:27 +00:00
Faith Ekstrand
52c57667ed nvk: Use common physical device properties
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24575>
2023-08-11 02:53:47 +00:00
Dave Airlie
7321d151a9 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>
2023-08-04 21:32:07 +00:00
Faith Ekstrand
98a3bc699b nvk: Implement the maintenance5 image layout queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:07 +00:00
Faith Ekstrand
af72961ff1 nvk: Rework memory requirements to handle aspects correctly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:07 +00:00
Faith Ekstrand
0afc57afad 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>
2023-08-04 21:32:07 +00:00
Faith Ekstrand
b883031b91 nvk: Improve image format properties and limits
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:07 +00:00
Mohamed Ahmed
2b85ccacf0 nouveau/nvk: Enable VK_KHR_sampler_ycbcr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:07 +00:00
Emma Anholt
758973fb62 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>
2023-08-04 21:32:07 +00:00
Faith Ekstrand
9345b95346 nvk: Bind 3D depth/stencil images as 2D arrays
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:06 +00:00
Faith Ekstrand
f0a165799c 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>
2023-08-04 21:32:06 +00:00
Dave Airlie
ad37394dfe 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>
2023-08-04 21:32:06 +00:00
Faith Ekstrand
10ffe8e709 nvk: Require dedicated allocations for external images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:06 +00:00
Faith Ekstrand
7f0c06e130 nvk: Dedicated allocations override internal
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:06 +00:00
Faith Ekstrand
702326d013 nvk: Add external memory queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:06 +00:00
Dave Airlie
3572f5cd7e nvk: add support for D32_SFLOAT_S8_UINT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:05 +00:00
Faith Ekstrand
8d712c2e06 nvk: Add helpers for binding image planes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:05 +00:00
Faith Ekstrand
fe022d4e87 nvk: s/device/dev in nvk_image.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:05 +00:00
Mohamed Ahmed
e41031d8ff nvk: Enable multiplane images and image views
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:05 +00:00
Faith Ekstrand
e2379a2e87 nvk: Advertise shaderStorageImageReadWithoutFormat
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:05 +00:00
Dave Airlie
651bdb3822 nvk: fix r32_sint format support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:04 +00:00
Mohamed Ahmed
81dc17c4db nvk: add stub for vkGetDeviceImageSparseMemoryRequirementsKHR()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:04 +00:00
Mohamed Ahmed
e4ec8df90b nvk: implement vkGetDeviceImageMemoryRequirementsKHR()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:04 +00:00
Dave Airlie
22cd2658e8 nvk: Report image alignments from NIL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:03 +00:00
Faith Ekstrand
6fd6baa989 nouveau/nil: Use nv_device_info for format queries
There's no reason why any of this needs access to the fd or the context.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:03 +00:00
Faith Ekstrand
f23b892a9d nouveau/nil: Take an nv_device_info for image functions
There's no reason why any of this needs access to the fd or the context.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:03 +00:00
Faith Ekstrand
87f946730f nouveau/winsys: Add an info to nouveau_ws_device
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:03 +00:00
Rebecca Mckeever
788ae9b601 nvk: Enable shadow sampling
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:02 +00:00
Thomas H.P. Andersen
380a2bc795 nvk: add check for VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT
The tests in dEQP-VK.pipeline.*.image_2d_view_3d_image.* set this
bit and nil was not checking for it

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:02 +00:00
Faith Ekstrand
d47ca67cde nvk: Advertise MSAA via image format properties
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:02 +00:00
Faith Ekstrand
4bd2ba31fc nvk: Use meta for MSAA resolves
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:02 +00:00
Faith Ekstrand
48f9ec1fe5 nvk: Stop asserting on MSAA
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
640783513b nvk: Use 2D array views for 3D storage images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
2c57a941cd nvk: Support 2D views of 3D images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
32f2317223 nvk: Use meta for doing blits with the 3D hardware
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:00 +00:00
Faith Ekstrand
2a2076b0d2 nvk: Don't advertise tiling on non-power-of-two formats
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:58 +00:00
Yusuf Khan
8e052c311f nvk: support GetImageSparseMemoryRequirements2
KHR_get_memory_requirements2 was enabled but GetImageMemoryRequirem
ents2 was not. This stubs out GetImageMemoryRequirements2 to fix it.

Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>

v2: remove the v1 version of the command as its provided by the
common runtime

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:58 +00:00
Faith Ekstrand
d2b30362eb nvk: Assert samples == 1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:58 +00:00
Faith Ekstrand
e3afa1e3c2 nvk: Re-flow a couple function prototypes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:58 +00:00
Faith Ekstrand
226c152f55 nvk: Advertise depth/stencil support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:58 +00:00
Faith Ekstrand
78009a1a9a nvk: Do internal dedicated allocations for ZS images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:58 +00:00
Faith Ekstrand
6909155346 nvk: Advertise more format features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:57 +00:00
Faith Ekstrand
8dff06aada nvk: add linear image creation support.
the dEQP-VK.draw.* tests use a tiled + linear image and copy between
them.

This fixes the result gathering, not the actual result.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:57 +00:00
Faith Ekstrand
152ded2b97 nvk: No-op sparse image format properties
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:55 +00:00
Faith Ekstrand
0e284f71e1 nvk: Unconditionally zero image format properties
It seems like this shouldn't be neded but some of the tests complain if
we don't because they call vkGetPhysicalDeviceImageFormatProperties()
and vkGetPhysicalDeviceImageFormatProperties2() and compare if they
return identical results even if they return error.  Zero is the
reasonable thing to do if you don't support a format anyway because then
it's a maximum extent, sample count, etc. of zero.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:55 +00:00
Faith Ekstrand
dda149c053 nvk: Better advertise image format features
We now advertise the top-level features and we don't falsely claim
write-without-format support per-format.  In theory, NV hardware should
be able to do shaderStorageImageReadWithoutFormat but codegen doesn't
know how yet.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:55 +00:00