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
Faith Ekstrand
af961f9aec
nouveau/mme: Add basic structures 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
a6c62732da
nouveau/parser: Add more arrays
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
9db0c9fb2d
nouveau/push: Fix a void pointer arithmetic bug
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
33ed4b9bc5
nil: Don't claim texture support for 2-bit SNORM
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
1e3e00dad7
nvk: Increase the graphics pipeline push space
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
82fc528773
nvk: Use VK_IMAGE_USAGE_*_ATTACHMENT_BIT for image clears
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
46f54d53e8
nvk: Drop a TODO
...
Dynamic buffer bindings work fine
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
8825d8effe
nvk: Use f for extension features
...
It's shorter and more ergonamic and the driver is still small so we can
pick a reasonable convention before things get out-of-hand.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Emma Anholt
e96c3cb965
nvk: Fix unused result warnings in pushbuf resets.
...
We know we aren't hitting the resize paths here, so errors can't be
thrown.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Emma Anholt
2773e55e86
nvk: Fix uninitialized result usage in NVK_DEBUG_ZERO_MEMORY.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Emma Anholt
5d0aa694ee
nvk: Avoid strict aliasing warning in the pushbuffer encoding.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Karol Herbst
5c853ed300
nvk: fix zero page refing
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
7f413ef104
nouveau/parser: Put the dump helpers in C files
...
This should make the build faster since we don't have to compile those
giant functions with giant switch statements constantly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
7e1291d7be
nouveau/parser: Use more idiomatic python
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
9855b80a7a
nouveau/parser: Convert to mako
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Karol Herbst
309c6cfd99
nvk: alloc a zero page and use it for vertex runouts
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
c87a7b87fa
nvk: Initialize fixed draw/default state once
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
daa6f9c700
nvk: Start every command buffer with a nop
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
7cdb86a843
nvk: Split nvk_queue into its own file
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Thomas H.P. Andersen
adb71cace7
nvk: fix mem leaks
...
device would leak in various situations.
Separate out lables were needed in the earlier
versions of this function but now we can just
use a single label
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Thomas H.P. Andersen
c9f0ec90fc
nvk: delete commented code
...
nvk_CmdClearColorImage first lived in nvk_cmd_copy,
then moved to nvk_cmd_meta, and finally in nvk_cmd_clear
I seems that this was left behind in one of the moves
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Thomas H.P. Andersen
c086d60466
nvk: fix implicit-fallthrough warnings with clang
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00