Faith Ekstrand
7fdb8e247d
nvk: Re-initialize dynamic_graphics_state.vi when recycling
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
26f6458c70
nvk/meta: Save and restore VI state
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
e824cdc0e5
nvk: Drop sample locations structs
...
IDK if NVIDIA hardware even supports setting sample locations. I've not
been able to find the packets. In any case, if and when we implement
the extension, we can wire it up then.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
f498696370
nvk: Implement copies for D24_UNORM_S8_UINT images
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
25fb43475f
nvk/copy: Mape bpp part of nouveau_copy_buffer
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Dave Airlie
33bdd75639
nvk: handle NULL to destroy descriptor pool
...
Fixes dEQP-VK.api.null_handle.destroy_descriptor_pool
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Dave Airlie
51e24cd5b0
nvk: lower io to temps to avoid output reads in vertex shaders
...
fixes a bunch of these
nv50_ir_lowering_nvc0.cpp:2878: void nv50_ir::NVC0LoweringPass::handleLDST(nv50_ir::Instruction*): Assertion `prog->getType() == Program::TYPE_TESSELLATION_CONTROL' failed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Dave Airlie
875d4fe6f2
nvk: assign vertex locations according to input attrib index
...
This copies what lavapipe does. is there a better plan?
Fixes
dEQP-VK.draw.renderpass.simple_draw.simple_draw_triangle_list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
e1b12b49e6
vulkan: Allow scissors or viewports to be set without counts
...
This is unlikely but can happen if you have the following sequence:
1. vkCmdSetScissors()
2. No pipeline bind
3. vkCmdClearImage() which causes a meta save
4. Meta restore with vk_cmd_set_dynamic_graphics_state()
In that case, we don't have scissor counts but need to restore the
scissors set with `vkCmdSetScissors()` before the meta save. We can
safely copy all of them, it's just more memory traffic than maybe we'd
like. Fortunately, this can only happen at the start of a command
buffer and only with a fairly silly sequence of commands.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
a6f8ab2a2c
nvk: Track and reference all device memory objects
...
This way bindless will work properly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
853f454dba
nvk: Don't assert when there are no attachments
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
8cc9c91f67
vulkan/meta_clear: Populate VkRenderingInfo::renderArea
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
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