Commit Graph

175317 Commits

Author SHA1 Message Date
Faith Ekstrand 8213eaa99f nvk: Make texture descriptors a bit more acceptable to codegen
Codegen assumes that it gets a combined descriptor on both the texture
and sampler handle sources and that it's 64-bit.  It's not too hard to
just give it that in NIR.  We may make codegen a bit more flexible in
future but, for now, this gets things working.  While we're here, do a
quick optimization for combined texture+sampler descriptors because it's
easy.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand c9bf974472 nvk: Add a stub implementation of buffer views
We don't actually populate the TIC entries yet but we can at least
pretend and stick them in descriptor sets.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 8d3f185a4d nvk: Re-format nvk_buffer.c a bit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand da3e5c13c3 nvk: Re-format nvk_image_view.h a bit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 9cd1753a29 nvk: Unify descriptor loading in lower_descriptors
The code we were using for images/textures was broken since it didn't
track with the change to always use root descriptors.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 035a63d8bf nvk: Set b->cursor when lowering image intrinsics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand e120a789d3 nvk: Fill out TIC table entries for image views
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand ff84f8aa48 nvk: Add an image descriptor table to the device
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand e0d445c28d nvk/image_view: Reformat and fix Create/DestroyImageView
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 52565b1e62 nvk: Copy in the nouveau TIC format table
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 108c9dc655 nvk: Add a descriptor table data structure
This will be used for image and sampler descriptors

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 2ec2ce44f3 nvk: Mark nvk_push_descriptor_set_ref() inline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 460a026d72 nvk: Allow R32_UINT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand ecbc820898 nvk: Stop returning VK_ERROR_FORMAT_NOT_SUPPORTED for non-blitable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 6a481d8170 nvk: Drop image_view_init
It's unused.  Drop for now.  If we want it for meta later, we can add it
then.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Dave Airlie a0d64f2770 nvk: add basic nve4+ compute support.
This can do most basic compute execution, except indirect

computeheadless demo runs, and some CTS tests pass.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Dave Airlie f845c72283 nvk: add some compute limits
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Dave Airlie a2d9f95961 nvk: add some basic format wrapping framework
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Dave Airlie 25dc939252 nouveau/winsys: Add m2mf/compute objects
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Dave Airlie 0870cd8719 nvk: add command stream upload buffer.
This is an upload buffer that is kept beside the command buffer.

It can be used to allocate any per command buffer gpu state that
doesn't fit in the cmd stream.

compute dispatches will go in here for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Dave Airlie c8805f4544 nvk: add record result to cmd_buffer.
This keeps track of recording errors so end command buffer
 can report them

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Dave Airlie fa32ee409a nvk: add support for preamble and tls allocation.
This adds support for per-queue allocations that are reallocated
upwards if the submitted cmd needs more space.

This is used to implement the tls allocations for compute.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Dave Airlie a3e5eb1134 nvk: retrieve gpc/mp counts from kernel.
These are needed to size the tls area.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Dave Airlie bd8077bef5 nouveau/vk: add support for compute classes to generator.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Karol Herbst d440084d96 nvk: tiling prep work for VK_EXT_image_2d_view_of_3d
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Karol Herbst b73b91016a nvk: support array blits over multiple layers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Karol Herbst e49a66c40c nvk: support multiple miplevels
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand d8a9d662e4 nvk: Lower load_global_constant_offset
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 1b7ff4b62c nvk: Re-arrange nir_lower_explicit_io a bit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 0c775223da nvk: Fetch descriptor set addresses from the root table
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 5017a3b092 nvk: Add a root descriptor table
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Dave Airlie 935f316eb0 nvk: Basic descriptor binding
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 95cb668051 nvk: Rework whitespace in nvk_cmd_buffer.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand e2e83e68b6 nvk: Move nvk_cmd_pool cast definitions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 6dfb36c636 nvk: Add a couple descriptor set address helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand fca440dcb2 nvk: Reformat nvk_nir_lower_descriptors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 4fbe45ca58 nvk: Re-arrange nvk_descriptor_set.h a bit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Karol Herbst 9230629c03 nvk: reduce pitch even further in CmdFillBuffer
otherwise the coords would overflow hw limits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Karol Herbst 05d969fc2e nouveau/ws: handle 0inc inside nvk_push_val as well
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Karol Herbst 1f8682a1e7 nvk: implicitly reset the command buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand eae2eac3cf nvk: Add a skeleton for pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Dave Airlie c165e5b5b0 nvk: Initial wiring in of the compiler
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Faith Ekstrand 124f2708ef nvk: Add an nvk_device_physical helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Dave Airlie 8050f61b62 nvk: link in codegen without gallium bits.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Karol Herbst 325109122a nvk: advertise VK_KHR_copy_commands2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Karol Herbst eaed2a4340 nvk: implement CmdCopyBuffer2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:54 +00:00
Karol Herbst 198d2da5b1 nvk: implement CmdUpdateBuffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Karol Herbst dc84cf6ccb nvk: implement CmdFillBuffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Karol Herbst fd7d38875d nvk: optimize blit command buffer gen
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Dave Airlie 6df4eda000 nouveau/ws: drop the old push generators.
leave drf.h as it's need for the compute qmd stuff.

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