Karol Herbst [Sat, 10 Sep 2022 01:40:21 +0000 (03:40 +0200)]
nvk: reduce pitch for FillBuffer
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Fri, 9 Sep 2022 23:17:16 +0000 (01:17 +0200)]
nvk: use remaps for image copies
This helps us to get around hardware limitations on the width.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Fri, 9 Sep 2022 16:46:58 +0000 (18:46 +0200)]
nvk: properly align slm size
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Sun, 28 Aug 2022 21:26:03 +0000 (23:26 +0200)]
nvk: Use SET_PIPELINE_PROGRAM pre-Volta
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Mon, 29 Aug 2022 00:31:19 +0000 (02:31 +0200)]
nvk: align desc root table
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Sun, 28 Aug 2022 18:08:09 +0000 (20:08 +0200)]
nvk: rework QMD handling to support pre Turing
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Thu, 8 Sep 2022 14:49:53 +0000 (16:49 +0200)]
nvk: properly align shaders pre Turing
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Karol Herbst [Sun, 28 Aug 2022 15:44:19 +0000 (17:44 +0200)]
nvk: fix some class version checks
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk: Advertise EXT_vertex_attribute_divisor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Thu, 10 Nov 2022 22:39:26 +0000 (23:39 +0100)]
nvk: advertise EXT_image_2d_view_of_3d
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Thu, 10 Nov 2022 22:38:07 +0000 (23:38 +0100)]
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>
George Ouzounoudis [Fri, 4 Nov 2022 20:28:17 +0000 (22:28 +0200)]
nvk: Support base instance in instanced draw calls
Vulkan's gl_InstanceIndex is different than OpenGL gl_InstanceID.
For nvk, gl_InstanceIndex is lowered as gl_BaseInstance + gl_InstanceID in nir
code. This means we need to supply base instance to the vertex shader.
We load the value at mme draw time to a root constant, as it seems there
is no existing system value corresponding to this info.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
George Ouzounoudis [Wed, 9 Nov 2022 18:28:39 +0000 (20:28 +0200)]
nvk: Set base vertex state in sequential mme draw
We need to set base vertex state to zero before emitting a sequential
draw call, if we have already emitted an indexed draw call that changed
that state.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
George Ouzounoudis [Wed, 9 Nov 2022 18:13:26 +0000 (20:13 +0200)]
nvk: Add a macro for root descriptor table byte offsets
Use a helper macro instead of using offsetof directly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
George Ouzounoudis [Wed, 9 Nov 2022 17:50:32 +0000 (19:50 +0200)]
nvk: Do not increment instance id across draws
In cases of multiple draws (i.e. indirect draws) instance id should not
increment across draw boundaries. Use a local copy of "begin" to modify
the instance id inside the instances loop only.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk: Add a devenv ICD json file
This also reworks the ICD generation stuff based on the radv header
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk: Support VK_FORMAT_B10G11R11_UFLOAT_PACK32 for vertex buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Fri, 4 Nov 2022 03:37:58 +0000 (13:37 +1000)]
nvk: fix multiple pipelines failure allocation case.
Fixes these failures:
dEQP-VK.api.object_management.alloc_callback_fail_multiple*
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk/format: Style fix for VkFormatProperties3KHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk: Add a bo size to nvk_descriptor_set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk: Assert that descriptor buffer access stays in-bounds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk: Advertise VK_KHR_depth_stencil_resolve
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk: Advertise MSAA via image format properties
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk: Stop advertising higher framebufferNoAttachmentsSampleCounts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk: Replace gl_SamplePosition with fract(gl_FragCoord.xy)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk: Use meta for MSAA resolves
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk/meta: Fix restore for descriptor set 0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
vulkan/meta: Add support for MSAA resolves
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
vulkan/meta: Rename vk_meta_blit.c to vk_meta_blit_resolve.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
vulkan/meta: Support writing stencil as iterative discard
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
vulkan/meta: Break the guts of blit into a helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
vulkan/meta: Add a helper for building texture ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
vulkan/meta: Bind whole LODs of 3D blit destinations
Instead of only binding the layers we need, bind the whole LOD. In
particular, we now set a layer range of [0, 1] when creating the image
view but a layerCount of minify(depth, level) in VkRenderingInfo. While
still a bit out of spec, this is more in line with how 3D image views
typically work for sampled and storage images and allows us to avoid
creating 2D images views which would require 2D_ARRAY_COMPATIBLE_BIT.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk: Fill out sample locations on Maxwell B+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:03 +0000 (20:12 -0600)]
nvk: Stop creating a new upload BO every time
We intended this optimization for the case where we're uploading more
data than we had in the previous upload BO. If there is no previous
upload BO, we always want to set it to the new one.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nvk: Set correct multisample regs for graphics pipelines
This adds SAMPLE_MASK_*, ANTI_ALIAS_CONTROL, and drops ANTI_ALIAS which
we set in BeginRendering().
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nvk: Pass through a shader key for fragment shaders and MSAA
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Thu, 3 Aug 2023 20:54:09 +0000 (15:54 -0500)]
nvk: Use the right view format for stencil texturing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nvk: Support copies of MSAA images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nvk: Handle multisampled render targets properly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nvk: Handle zero color attachments better
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nvk: Stop asserting on MSAA
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nouveau/parser: Handle SET_ANTI_ALIAS_SAMPLE_POSITIONS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nouveau/parser: Sort METHOD_ARRAY_SIZES
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nil: Add an offset4d struct and some helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nil: Properly support MSAA
We had a num_samples field in nil_image but didn't do anything with it
for layout. This adds real code for MSAA which seems analygous to the
code in nvc0_miptree.c and seems to match HW based on my image layout
R/E crucible test.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nil: Use ONE for the anixotropic coarse spread function
No idea if it's what we want but this is what nouveau does and it's good
to be consistent for now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nvk: Implement CS invocations statistics queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nouveau/mme: Add a mul64 helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nvk: Implement DispatchIndirect
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nvk: Break the guts of CmdDispatch into a helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Fri, 7 Oct 2022 15:09:19 +0000 (17:09 +0200)]
nvk: advertize KHR_relaxed_block_layout
Test run totals:
Passed: 16/32 (50.0%)
Failed: 0/32 (0.0%)
Not supported: 16/32 (50.0%)
Warnings: 0/32 (0.0%)
Not supported is: "Physical storage buffer pointers not supported", so
waiting for VK_KHR_buffer_device_address.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nvk: Implement VK_EXT/KHR_buffer_device_address
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Emma Anholt [Fri, 28 Oct 2022 22:43:40 +0000 (15:43 -0700)]
nvk: Use depth_clamp_enable to select PIXEL_*_Z_CLAMP.
Fixes most of "-t depth_clamp" (just point_list fails, but other
point_list stuff fails too)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Emma Anholt [Sat, 29 Oct 2022 15:48:19 +0000 (08:48 -0700)]
nvk: Fix missing init of the stages to sync against.
Fixes:
d8a0dcb234cd ("nvk: Events")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Emma Anholt [Fri, 28 Oct 2022 23:19:30 +0000 (16:19 -0700)]
nvk: Remove duplicate (disabled) point sprite setup.
There's another copy of this above, with just slightly different unused
state.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Dave Airlie [Mon, 31 Oct 2022 03:48:43 +0000 (13:48 +1000)]
nvk: fix copy lower address extraction
this was missing an 0xf
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Mon, 24 Oct 2022 00:13:31 +0000 (02:13 +0200)]
nvk: sort extensions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Mon, 24 Oct 2022 00:13:08 +0000 (02:13 +0200)]
nvk: fix initialization override
this is already set a few lines up
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Mon, 24 Oct 2022 00:11:01 +0000 (02:11 +0200)]
nvk: drop dead assignment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Mon, 24 Oct 2022 00:10:19 +0000 (02:10 +0200)]
nvk: drop dead assignment
p_format is not used again after this assignment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:02 +0000 (20:12 -0600)]
nouveau/headers: Add generated headers to dependencies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Mon, 3 Oct 2022 21:54:21 +0000 (23:54 +0200)]
nvk: CmdPushDescriptorSetWithTemplateKHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Add a helper for pushing descriptors
This reduces the boilerplate a bit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Wed, 28 Sep 2022 16:15:35 +0000 (18:15 +0200)]
nvk: KHR_descriptor_update_template
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Fri, 14 Oct 2022 16:24:54 +0000 (18:24 +0200)]
nvk: advertise KHR_sampler_mirror_clamp_to_edge
Test run totals:
Passed: 3162/13944 (22.7%)
Failed: 0/13944 (0.0%)
Not supported: 10782/13944 (77.3%)
Warnings: 0/13944 (0.0%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Sun, 9 Oct 2022 20:40:46 +0000 (22:40 +0200)]
nvk: advertise EXT_private_data
Test run totals:
Passed: 69/112 (61.6%)
Failed: 0/112 (0.0%)
Not supported: 43/112 (38.4%)
Warnings: 0/112 (0.0%)
Waived: 0/112 (0.0%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Sun, 9 Oct 2022 20:40:17 +0000 (22:40 +0200)]
nvk: advertise KHR_image_format_list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Thomas H.P. Andersen [Sun, 9 Oct 2022 20:39:01 +0000 (22:39 +0200)]
nvk: advertise KHR_shader_non_semantic_info
Test run totals:
Passed: 8/8 (100.0%)
Failed: 0/8 (0.0%)
Not supported: 0/8 (0.0%)
Warnings: 0/8 (0.0%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Advertise VK_KHR_storage_buffer_storage_class
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Move more states to dynamic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Advertise VK_EXT_extended_dynamic_state3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Implement VK_EXT_border_color_swizzle
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
vulkan: Add a helper for swizzling color values
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Advertise custom border color features
We were advertising the extension string but not filling out the
features struct. Now we should be properly advertising it "for real".
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nil: Fix include guards in nil_image.h
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Use 2D array views for 3D storage images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Advertise VK_KHR_maintenance1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Support 2D views of 3D images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nil: Add a helper for getting 2D views of 3D images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Support copies between 3D and 2D images
This requires that we unify and only have one layer count for the copy
region so we arbitrarily choose extent_el.depth. We could choose layer
count but we already have a VkExtent3D so we may as well use it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Bind 3D images as 3D for clears
Normally, Vulkan doesn't support binding 3D image views for rendering
but we support it in NVK. If we bind it as a 2D array, that requires
setting 2D_ARRAY_COMPATIBLE_BIT to get a 2D array layout.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Implement VK_EXT_pci_bus_info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nouveau: Add PCI information to nv_device_info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Tell WSI we don't support legacy scanout
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Advertise VK_KHR_separate_depth_stencil_layout
We entirely ignore image layouts on NVIDIA so this is trivial.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Flush the current pushbuf before allocating a new one
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Advertise VK_KHR_imageless_framebuffer
Handled entirely in common code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Enable VK_KHR_create_renderpass2
Handled entirely in common code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Stop leaking command pool BOs
There are a couple of bugs here. First, vk_command_pool_finish() may
destroy command buffers which may end up returning BOs to the pool so we
need to wait to call nvk_cmd_pool_destroy_bos() until after that's
happened. Second, we weren't actually adding allocated BOs to the BO
list in nvk_cmd_buffer so they weren't ever getting returned.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Don't crash if we fail to allocate a push BO
Currently, we continue just fine until nvk_EndCommandBuffer calls
nvk_cmd_buffer_flush_push() and it crashes tring to look at
cmd->push_bo.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Events
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Use poll for BO waits
The nouveau ioctl doesn't support timeouts but poll() does.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:01 +0000 (20:12 -0600)]
nvk: Use mme_load_addr64()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:00 +0000 (20:12 -0600)]
nouveau/parser: Handle 6F methods
These are the methods below 0x100 which exist on all subchannels.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:00 +0000 (20:12 -0600)]
nvk: Use a normal DMA for CmdUpdateBuffer
Sure, inline data is neat and all, but our upload buffers are better set
up for handling large quantities of data.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:00 +0000 (20:12 -0600)]
nvk: Handle large command buffer uploads better
Change our assertion from a < to a <=. Also, if the size of the upload
is greater than the amount of space we have left in the old BO, don't
set cmd->upload_bo to point to the new thing. Instead, let the next
upload carry on with the old buffer since it has more room.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:00 +0000 (20:12 -0600)]
nvk: Implement vkCmdCopyQueryPoolResults()
One day, we may want to make this a compute shader like RADV uses but
this gets us up-and-going without more infra and it's probably what we
want for small numbers of queries anyway.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:00 +0000 (20:12 -0600)]
nvk: Use mme_tu104_read_fifoed()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Faith Ekstrand [Tue, 31 Jan 2023 02:12:00 +0000 (20:12 -0600)]
nouveau/mme: Add a helper for MME_DMA_READ_FIFOED
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>