Faith Ekstrand
c24db442b1
nvk: Implement nir_intrinsic_load_frag_coord
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
d97397f084
nvk: Use the new headers for samplers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
17ab445930
nvk: Bind texture and sampler header pools for 3D
...
No idea if this has to be done separately for 3D vs. compute but it
shouldn't hurt anything to do it for both.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
c25f0c1dbe
nvk: Zero client memory objects
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
5268ad9b8d
nvk: Use meta for CmdClear*Image
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
a4c1460641
nil: Switch to using the new headers for TIC entries
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
24c0aa3a93
nvk: Use max alignment for descriptor pool sizes
...
Since we only know the number of each descriptor type and not their
groupings, we don't know how alignments will compound. Figure out the
maximum alignment and then use that for everything to ensure that, no
matter how they're combined, we always have enough room.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Dave Airlie
b7acd1030d
nvk: add indexed draw support.
...
This passes the
dEQP-VK.draw.renderpass.basic_draw.draw_indexed* tests for me on Turing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Dave Airlie
8017ac0e79
nvk: add some limits/features from binary driver.
...
These are just copied from nvidia vulkaninfo for my tu104.
I've left geom/tess stuff out for now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Dave Airlie
ba2faab08c
nvk: fix depth emission ordering.
...
dEQP-VK.api.image_clearing.core.clear_depth_stencil_image.single_layer.x8_d24_unorm_pack32_200x180
was hitting
nouveau_push.h:233: nvk_push_val: Assertion `last_method == idx' failed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Dave Airlie
871c587414
nvk: increase graphics cpu push buffer
...
dEQP-VK.pipeline.monolithic.image.suballocation.sampling_type.separate.view_type.1d.format.r8g8_uint.count_4.size.512x1
was hitting 98 dwords
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Dave Airlie
86b05c2750
nvk: fix pipeline pushbuf sizing
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
8dff06aada
nvk: add linear image creation support.
...
the dEQP-VK.draw.* tests use a tiled + linear image and copy between
them.
This fixes the result gathering, not the actual result.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Dave Airlie
f28bf4407d
nvk: add initial 8/16 byte clears.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
3d77175f1d
nouveau: Fix pushbuf ref reset for user command buffers
...
Copy+paste error. Also, we should do the refs reset before potentialy
doing a full reset, otherwise the refs reset will assert.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
150cba46ba
nvk: Enable all the dynamic state features
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
0a9903f778
nvk: Stop using vk_cmd_set_dynamic_graphics_state in meta_end()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
e1c665013b
nvk: Use vk_meta for CmdClearAttachments
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
4746099306
nvk: Expose a bind_vertex_buffer helper
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
b0d007e7de
nvk: Add an addr field to nvk_buffer
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
5b10446a9b
nvk: Add an attachment format even for secondaries
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
b07e2a1049
vulkan/meta: Add implementations of Clear*Image
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
6a25cba792
vulkan/meta: Implement start-of-rendering clears
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
daa4485ecf
vulkan/meta: Implement attachment clears
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
514c10344e
vulkan/meta: Add a concept of rect pipelines
...
Most hardware supports some sort of rectangle primitive. This adds a
new VK_PRIMITIVE_TOPOLOGY_RECT_LIST_MESA which will be used by the vast
majority of (if not all) meta commands. Drivers can key off of of this
to build pipelines differently and implement their own cmd_draw_rects
and cmd_draw_volume hooks or they can map it to TRIANGLE_LIST and use
the provided helpers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
8418d6c97a
vulkan/meta: Add an object tracking list
...
This will let us create objects which get held onto by the command
buffer until it's reset or destroyed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
54366ea922
vulkan/meta: Add the start of a meta framework
...
For now, this just adds some basic object caching.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
8c2f95e3e7
nvk: Color attachments clears via image clears
...
This is a bit of a hack but it's good enough for now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
8ce12f33e2
nvk: Implement vkCmdDraw()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
83598f44a9
nvk: Graphics pipelines
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
c9e28274cc
nouveau: Add CPU push buffers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
8530c3c882
nvk: Implement push constants and descriptors for graphics
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
1e3e85056b
nvk: Emit dynamic graphics state
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
d98a7d0de5
nvk: Misc. additional state setup
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
ff3e099a73
nvk: Add boilerplate for Begin/EndRendering
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
5ee481bf26
nil/format: Add helpers for render formats
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
617532b24e
nvk: Import 3D context init code from nouveau
...
We really should organize this better but at least we have it now.
This should pretty much be equivalent to what nouveau is doing on
screen/context create.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
7315650739
nvk: Add a nvk_cmd_buffer_device() helper
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
abb7f69520
nvk/shader: Populate headers for vertex and fragment shaders
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
8df9d16fb4
nvk/shader: Assign I/O locations and gather info
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
0b179da344
nvk: Make shader_upload take an nvk_device
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
61a91914df
nvk: Expose pipeline alloc/free functions
...
This will provide some commonality between graphics and compute.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
ae0d8edc1d
nvk: Free pipeline shader BOs
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
c2f636861a
nvk: Add an nvk_shader_address helper
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
782d376363
nvk: Don't free the NIR in nvk_compile_nir
...
It's a layering violation and the NIR is currently leaked if we the
compile fails. It's better to make the caller clean up.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
ffc6c3afaf
nvk: Switch to vk_pipeline_shader_stage_to_nir
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
65b1cc3adf
nvk: Split pipeline binding into helpers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
db2cf498ce
nvk: Add graphics state to command buffers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
0f203b2b44
nouveau: Generate 3D headers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00
Faith Ekstrand
b3531276c6
nouveau: Null terminate the debug flag list
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:56 +00:00