Commit Graph

175303 Commits

Author SHA1 Message Date
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
Dave Airlie af823ae71a nvk: port the blit and copy code to new command submission.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Dave Airlie 4cd3d74136 nvk: move to new command stream generator.
This auto generates macros/inlines/structs from the nvidia
class headers using a python for noobs script

v2: use argparse.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Faith Ekstrand b5010e630a nvk/copy: Use nvk_image_base_address()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Faith Ekstrand 13dca99623 nvk/image: Add image address helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Faith Ekstrand 1f42ab6f30 nvk/copy: Use nvk_buffer_address in CmdCopyBuffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Faith Ekstrand 1a906072db nvk/buffer: Add a push_buffer_ref helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Faith Ekstrand d59c6dc4a7 nvk/buffer: Take an offset in nvk_buffer_address
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Karol Herbst b783809270 nvk: report maxMipLevels as 1
the CTS uses that value in some places

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Karol Herbst 242c5ddb67 nvk: add support for blits
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Karol Herbst aa0ac90ed3 nvk: simple format table
this is enough to run the image copy and blit tests on a couple of formats

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Karol Herbst d98540c645 nvk: add basic support for images
enough to get basic operations working

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Karol Herbst 7e2f7e38bf nvk: use fermi class definitions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Karol Herbst 36e5573ef0 nouveau/ws: bind 2D class
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00
Karol Herbst acbd4523a4 nouveau/ws: set GPU object class
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:53 +00:00