Faith Ekstrand
87956e98c1
nvk: Fix up whitespace in nvk_descriptor_set.c
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
f1611979b4
nvk: Use vk_object_zalloc/free for descriptor pools/sets
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
b6ce5af12b
nvk: Re-indent vk_instance.c
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
ed2898eb2d
nouveau: Drop nouveau_ws_push
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
6315ebf58d
nouveau: Use DRM interfaces directly in MME tests
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
cf7b5de3e1
nvk: Remove remaining references to nouveau_push.h
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
4e58eb39ad
nvk: Implement vkCmdExecuteCommands()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
40eedabd4a
nvk: Use nvk_cmd_bo for push bufs
...
This allows us to recycle them. It also makes implementing secondary
command buffers tractable.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
4998896ae8
nvk: Allocate upload buffers from the command pool
...
Instead of the growing BO thing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
c1b92bdf71
nvk: Add an nvk_cmd_buffer_ref_bo helper
...
We only need this for internal stuff that isn't tracked any other way.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
567148c172
nvk: Add an nvk_cmd_buffer_push helper
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
87686a2220
nvk: Rework side-band data upload
...
Instead of doing magic alignments, it now takes an explicit alignment
parameter. Also, we now have a version of the helper which does the
memcpy. This should encourage users to avoid reading reading upload
maps in case they're ever write-combine in the future.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
56843707c1
nvk: Constant buffer alignment is actually 64B
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
42fb0646a1
nvk: Fully populate QMDs before uploading
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
9ae0a5fb16
nvk: memcpy root descriptors for compute instead of doing a DMA
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
9bc97bc208
nvk: Return VkResult from nvk_cmd_buffer_upload_alloc
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
903c000055
nvk: Add BO recycling to the command pool
...
Command BOs (nvk_cmd_bo) are automatically mapped recyclable BOs to use
for upload and push buffers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
366fa3c7e1
nvk: Use cmd instead of cmd_buffer
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
8b4f441e84
nvk: Break nvk_cmd_pool into its own file
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
4bdeaef7f2
nvk: Use queue_submit_simple for zero_vram
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
4ebb6ca41b
nvk: Use submit_simple for draw state init
...
We also move it to being a queue function. This architecturally makes
more sense even if it seems a bit redundant at first. Worst case, we
initialize multiple times but this guarantees that we're initialized by
the time we try to submit something. It also doesn't matter now because
we only have the one queue.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
a132e18846
nvk: Initialize the queue later in device setup
...
We basically want it at the end but before we set up meta.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
b660d064c2
nvk: Add an nvk_queue_submit_simple helper
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
1094ffa82c
nvk: Use a regular BO for the queue state push
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
08d0231dac
nvk: Use a regular BO for the empty push
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
1cf4eea7b3
nvk: Submit pushbufs directly
...
By getting rid of the winsys stuff we can batch everything into a single
ioctl which should be a bit more efficient. It also simplifies BO
reference handling because we no longer need any of the save/restore
nonsense because we're the ones building the BO list, not the pushbuf
code. This should be a lot more robust.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
3ffa526c04
nvk: Move queue_sumbit to nvk_queue_drm_nouveau.c
...
We're about to start doing nouveau DRM specific stuff in here so let's
move it to a nouveau DRM specific file.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
1832acbac6
nvk: Always allocate empty_push
...
We always allocate it on queue_submit anyway so we may as well allocate
it up-front.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
75a97b6cb7
nvk: Use bo_new_mapped for the zero page
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
b8d092afb1
nouveau: Add a nouveau_ws_bo_new_mapped helper
...
Error handling for allocating a bo and immediately mapping it is a pain.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
dee921f46d
nvk: Use nv_push directly for graphics pipelines
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
5ce9d75701
nouveau: Move push dumping to nv_push.c
...
Because we need access to classes, we also add a basic device info
struct. We'll expand on this a bit later.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
f89f05c94e
nouveau: Move push validate to nv_push.c
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
76edce98f7
nouveau/parser: Take a FILE* in DUMP_*_MTHD_DATA
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
fb9524f5dd
nouveau: Move nv_push and helpers to their own header
...
We put this in nvidia-headers to separate it from the pushbuf stuff.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
ccd670cc2f
nouveau: Rename the fields of vk_push
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
60fa24ee09
nouveau: Add an nv_push struct
...
This encapsulates the minimum we need for the push macros/functions.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
3964457ba0
nvk: Use p for the nouveau_ws_push_buffer in zero_vram
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
e16918df03
nvk: Implement vkCmdDraw[Indexed]Indirect()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
9ceec19adb
nvk: Use MME for vkCmdDraw[Indexed]()
...
This lets us move the instance loop to the MME and stop emitting state
per-instance.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
02783c822c
nouveau/mme: Add helper macros for setting fields
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
d6ac9dcac7
nvk: Use MME for clears
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
d753d0a809
nvk: Add MME infrastructure
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
f50e7cf015
nouveau/mme: Add unit tests for the Turing+ MME simulator
...
These verify that its behavior is the same as the hardware. Very useful
for reverse engineering.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
e4b936d817
nouveau/mme: Make the winsys headers C++ safe
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
58b9108468
nouveau/mme: Add an isaspec-based dumper
...
This actually dumps everything, unlike the pretty printer which tries to
dump something readable and may ignore bits of instructions if it thinks
they're no-ops. Useful for debugging the pretty printer.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
4a5c0b686a
nouveau/mme: Add a tiny simulator for the Turing+ MME
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
51e8194736
nouveau/mme: Add a builder for the Turing+ MME
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
e9170ef452
nouveau/mme: Add an assembler and disassembler for the Turring+ MME
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
01d0c78386
nouveau/mme: Add isaspec XML for the Turing+ MME
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00