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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Karol Herbst [Wed, 19 Jul 2023 12:06:39 +0000 (14:06 +0200)]
nouveau/winsys: fix SM value for Ada
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Emma Anholt [Wed, 3 May 2023 21:15:44 +0000 (14:15 -0700)]
nvk: Add support for probing as a platform device.
The driver now comes up on gk20a (Jetson TK1).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Emma Anholt [Wed, 3 May 2023 21:10:09 +0000 (14:10 -0700)]
nvk: Clean up redundant vendor checking for physical device creation.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Emma Anholt [Fri, 13 Jan 2023 00:54:02 +0000 (16:54 -0800)]
nvk: Quiet a compiler warning.
Looks like it's always set to me, but :shrug:
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Emma Anholt [Wed, 3 May 2023 20:42:48 +0000 (13:42 -0700)]
nouveau/winsys: Fix an undefined use in the error path.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Tue, 18 Jul 2023 05:51:23 +0000 (15:51 +1000)]
nvk/query: fix push buffer size for copy pool results.
the immediate takes two slots, so bump this by one,
fixes a crash in zink KHR-GL45.transform_feedback.query_vertex_interleaved_test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Mon, 17 Jul 2023 22:48:31 +0000 (17:48 -0500)]
nvk: Enable external memory extensions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Mon, 17 Jul 2023 21:49:35 +0000 (16:49 -0500)]
nvk: Support dma-buf export
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Mon, 17 Jul 2023 22:43:25 +0000 (17:43 -0500)]
nvk: Support dma-buf import
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Mon, 17 Jul 2023 22:37:24 +0000 (17:37 -0500)]
nouveau/winsys: Add dma-buf import support
This requires a lock and a buffer cache on the nouveau_ws_device.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Mon, 17 Jul 2023 21:54:28 +0000 (16:54 -0500)]
nvk: Require dedicated allocations for external images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Mon, 17 Jul 2023 21:49:24 +0000 (16:49 -0500)]
nvk: Dedicated allocations override internal
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Mon, 17 Jul 2023 20:11:05 +0000 (15:11 -0500)]
nvk: Add external memory queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Mon, 17 Jul 2023 19:58:14 +0000 (14:58 -0500)]
nvk: Add device and driver UUIDs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Mon, 17 Jul 2023 23:13:47 +0000 (18:13 -0500)]
nvk: Use abbreviated names in nvk_device_memory.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Mon, 17 Jul 2023 20:00:33 +0000 (15:00 -0500)]
nvk: Use NVIDIA_VENDOR_ID in pdev try_create()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
George Ouzounoudis [Mon, 9 Jan 2023 17:51:47 +0000 (19:51 +0200)]
nvk: Enable descriptor indexing
These values follow the already existing per-stage and descriptor set
limits. If we change these to be similar to the reported values of the
proprietary driver, care must be taken as Turing has bigger limits for
uniform buffers than older generations.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
George Ouzounoudis [Sat, 15 Apr 2023 17:13:56 +0000 (20:13 +0300)]
nvk: Add nir non-uniform optimization pass
The hardware supports non-uniform access natively so we do not need to
lower most non-uniform access in the shader. Just lower the ubo access
as it should probably be faster when we uniformly load from real hw
ubos in the future.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
George Ouzounoudis [Sun, 16 Apr 2023 16:32:44 +0000 (19:32 +0300)]
nvk: Handle cases of descriptor bindings with variable counts
We need to compute the allocated descriptor buffer size at descriptor allocation
time. So we need to split to a pre-computed size for all the other bindings
except the one with the variable count.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
George Ouzounoudis [Wed, 26 Apr 2023 18:37:23 +0000 (21:37 +0300)]
nvk: Support VkDescriptorSetVariableDescriptorCountLayoutSupport
On cases with variable descriptor counts we need to calculate the
maximum supported variable count while taking into account the other existing
descriptors and their alignments in the set.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Fri, 14 Jul 2023 00:06:20 +0000 (19:06 -0500)]
nvk: Use the max descriptor alignemtn in GetDescriptorSetLayoutSupport
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Benjamin Lee [Fri, 9 Jun 2023 22:22:01 +0000 (15:22 -0700)]
nvk: Fix segfault when opening DRI device file returns error
Previously, ver was unitialized on this path, causing UB on the
`if (ver)` branch after the out_err label.
Signed-off-by: Benjamin Lee <benjamin@computer.surgery>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Thu, 13 Jul 2023 21:13:29 +0000 (16:13 -0500)]
nvk: add support for D32_SFLOAT_S8_UINT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Thu, 13 Jul 2023 21:19:07 +0000 (16:19 -0500)]
nvk: Take an nvk_image_plane in nouveau_copy_rect_image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Thu, 13 Jul 2023 21:12:42 +0000 (16:12 -0500)]
nvk: Add helpers for binding image planes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Thu, 13 Jul 2023 21:08:10 +0000 (16:08 -0500)]
nvk: s/device/dev in nvk_image.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Fri, 7 Jul 2023 06:42:45 +0000 (16:42 +1000)]
nvk: introduce an optimisation loop.
This brings in pretty much the radv opt loop.
So for tess ctrl where this a loop we can unroll, this fixes
some dynamic array access later to be non-dynamic.
Fixes:
dEQP-VK.clipping.user_defined.clip_distance_dynamic_index.vert_tess.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Tue, 11 Jul 2023 01:30:01 +0000 (11:30 +1000)]
nvk: merge tess info between tcs/tes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Thu, 13 Jul 2023 02:45:57 +0000 (12:45 +1000)]
nvk: fix transform feedback crash when optimiser removes things.
This optimise loop can remove stuff, which causes this to crash,
just exit early.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
George Ouzounoudis [Tue, 23 May 2023 16:12:37 +0000 (19:12 +0300)]
nvk: Lower io to temporaries for tessellation evaluation nir
This is consistent to what radv does.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
George Ouzounoudis [Fri, 14 Apr 2023 13:07:52 +0000 (16:07 +0300)]
nvk: Respect tessellation domain origin state
When switching to lower left tessellation domain origin we need to
switch the orientation for triangles/quads. The changes are based on
what anv and radv do.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
George Ouzounoudis [Fri, 14 Apr 2023 11:47:38 +0000 (14:47 +0300)]
nvk: Fix cases where execution mode is specified in the tesc shader.
We need to keep some context for the compilation of the tessellation shaders.
This is required in the case where the domain is specified in the
tessellation control shader instead of the tessellation evaluation
shader, as codegen needs the domain information when compiling the
tessellation evaluation shader.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
George Ouzounoudis [Thu, 13 Apr 2023 21:16:50 +0000 (00:16 +0300)]
nvk: Enable multiview with tessellation shader
This works by default, we just switch it on.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
George Ouzounoudis [Mon, 24 Oct 2022 19:21:29 +0000 (22:21 +0300)]
nvk: Assign locations correctly for arrayed IO
Arrayed IO, encountered in tessellation shaders, should not take up
multiple driver locations.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
George Ouzounoudis [Fri, 14 Apr 2023 12:15:46 +0000 (15:15 +0300)]
nvk: Basic tessellation shader support
Based on nvc0 implementation but with added nvidia-headers usage.
Device limits taken from http://www.vulkan.gpuinfo.org/ and minimum
required values.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Mon, 3 Apr 2023 20:03:39 +0000 (22:03 +0200)]
nvk: remove duplicated device features
These are already set in the Vulkan 1.2 section
Add status for bufferDeviceAddressCaptureReplayEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Mohamed Ahmed [Wed, 12 Jul 2023 19:18:49 +0000 (14:18 -0500)]
nvk: Enable multiplane images and image views
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Sat, 6 May 2023 16:50:54 +0000 (11:50 -0500)]
nvk: Advertise KHR_spirv_1_4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Thu, 4 May 2023 19:32:19 +0000 (14:32 -0500)]
nvk: Fix the NO_PREFETCH assert for CmdDrawIndirect
The NO_PREFETCH bit gets set on the range. The offset can pretty much
be whatever.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Wed, 3 May 2023 23:14:09 +0000 (18:14 -0500)]
nvk: Advertise shaderStorageImageReadWithoutFormat
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Wed, 3 May 2023 03:01:10 +0000 (22:01 -0500)]
nvk/heap: Set the right pitch for heap resize copies
Otherwise, once we need to grow past 2^17 B, we attempt to copy two
lines, the hardware errors out, and we get left with a junk heap.
While we're here, re-arrange the code a bit so we keep all the P_FOO
together.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Echo J [Wed, 19 Apr 2023 05:56:16 +0000 (08:56 +0300)]
nil: Add A4B4G4R4_UNORM format support
DXVK versions before v1.5.5 need this format in some cases
I haven't tried running CTS yet, but GTA San Andreas runs
well now on DXVK v1.5.1 (before this change it crashed) so
I think CTS should be happy enough :frog:
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Thu, 23 Mar 2023 05:29:59 +0000 (15:29 +1000)]
nvk: expose EXT_sampler_filter_minmax
The sampler bits of this were already hooked up.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Sat, 8 Apr 2023 17:52:23 +0000 (12:52 -0500)]
nvk: Only use view_id for layer in multiview
I can't prove that this fixes anything but it seems right.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Rebecca Mckeever [Fri, 7 Apr 2023 16:52:22 +0000 (09:52 -0700)]
nvk: Move code inside view mask loops to a helper function
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Rebecca Mckeever [Fri, 31 Mar 2023 22:41:16 +0000 (15:41 -0700)]
nvk: Combine CLEAR_VIEWS and CLEAR_LAYERS MME macros
Check view_mask inside the macro to determine which loop to run. In
emit_clear_rects(), move code out of if/else that is the same in both
branches.
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Rebecca Mckeever [Fri, 31 Mar 2023 22:23:55 +0000 (15:23 -0700)]
nvk: Load view_mask to shadow scratch in nvk_CmdBeginRendering
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Sun, 2 Apr 2023 23:41:22 +0000 (01:41 +0200)]
nvk: simplify code by using new helpers
All tests still pass:
dEQP-VK.query_pool.*.compute_shader_invocations*
Test run totals:
Passed: 78/78 (100.0%)
Failed: 0/78 (0.0%)
Not supported: 0/78 (0.0%)
Warnings: 0/78 (0.0%)
Waived: 0/78 (0.0%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Echo J [Sun, 2 Apr 2023 13:29:19 +0000 (16:29 +0300)]
nvk: Reset offset value in ResetDescriptorPool
This is another secret change you've been waiting for 🐸
This change resets the current_offset value to 0 in ResetDescriptorPool
(without it the offset would keep counting until it reaches the limit
which causes allocation issues and/or application crashes/freezes)
RADV does the same thing, so I think this change is correct 🤓
BTW this meme seems to be relevant: https://youtu.be/1stQbTuUBIE
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Echo J [Thu, 30 Mar 2023 19:34:18 +0000 (22:34 +0300)]
nvk: Add bufferImageGranularity limit
This is the secret change everyone has been waiting for 🐸
But anyway, this change adds the bufferImageGranularity limit (which
is needed by both DXVK and osu!lazer; DXVK will be a corrupted mess
without it and osu!lazer simply throws an exception)
The values have been scraped from https://vulkan.gpuinfo.org BTW
(because of that I'm not sure if they're actually accurate)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Fri, 31 Mar 2023 16:37:58 +0000 (11:37 -0500)]
nvk: Advertise EXT_shader_viewport_index_layer on MaxwellB+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Fri, 31 Mar 2023 18:56:38 +0000 (13:56 -0500)]
nvk: Sort SPIR-V caps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Fri, 31 Mar 2023 16:11:22 +0000 (11:11 -0500)]
nvk: Implement VK_KHR_map_memory2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Fri, 31 Mar 2023 16:07:36 +0000 (11:07 -0500)]
nvk: Use vk_device_memory
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Thu, 30 Mar 2023 22:41:47 +0000 (17:41 -0500)]
nvk: Set spirv_to_nir_options::min_*_alignment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Thu, 30 Mar 2023 22:40:35 +0000 (17:40 -0500)]
nvk: Add a separate #define for SSBO alignment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Thu, 30 Mar 2023 20:42:01 +0000 (15:42 -0500)]
nvk: Expose VK_KHR_maintenance2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Thu, 30 Mar 2023 20:40:57 +0000 (15:40 -0500)]
nvk: Set pointClippingBehavior
This is what the blob advertises. I don't know if it's correct or not
because the CTS test for this seems to pass either way:
dEQP-VK.clipping.clip_volume.depth_clamp.point_list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Thu, 30 Mar 2023 16:38:16 +0000 (11:38 -0500)]
nvk: Implement uncompressed views of compressed images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>