Faith Ekstrand
cbb14e5483
nvk: Return OUT_OF_DEVICE_MEMORY if bo_new fails
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
91c1be22ed
nvk: Set GEOMETRY_SHADER_SELECTS_LAYER properly
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
2d108bb672
nvk: Call nir_lower_input_attachments
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
da0ad121bf
nvk: Don't destroy NULL descriptor pool BOs
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
226c152f55
nvk: Advertise depth/stencil support
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
5570e2c06b
nvk: Flip the front-face setting
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
6ab9fe31fe
nvk: Enable two-sided stencil
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
c6a50c2745
nvk: Fix viewport Z scale
...
Because Z needs to end up in [0, 1] and not [-1, 1], we don't want to
divide by 2.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
9deab8f139
nvk: Fix depth/stencil render pass clears
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
78009a1a9a
nvk: Do internal dedicated allocations for ZS images
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
ba70017f68
nvk: Add internal helpers for device memory allocation
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
ac8bbb355a
nouveau: Add a function to allocate a tiled buffer
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
71420b4c7d
nil: Compute PTE kinds and tile modes for images
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
3ef84bc1e0
nvk: Disable sparse Z on Maxwell+
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
99248274b4
nvk: Depth buffers don't allow Z-tiling
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
90b94828dd
vulkan/meta: Make stencil reference dynamic for clears
...
We call CmdSetStencilReference() but don't set it to dynamic in the
pipeline.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
6b7ee96391
nvk: Clear dynamic state dirty after flushing it all
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
6909155346
nvk: Advertise more format features
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
77db3e99dd
nil: Add more format support helpers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
0af169b86b
nil: Re-introduce the format capabilities
...
The bits are already in the table we copied from the nouveau GL drivers,
we just need to set up some enums and plumb it through. With that,
we're now properly advertising which formats are renderable.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
0c6c2fe2cf
nil: Rename rendering to color_target
...
Also, add a helper for depth/stencil formats and use
nil_format_supports_color_targets() helper to compute Vulkan format
features rather than checking for a non-zero color format.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
e6866593d5
nil: Rename rt to czt in the format info struct
...
It's used for both depth/stencil and color so rt isn't quite the name we
want. Also, add a comment.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
db0a63c909
nil: Use nvidia headers for ZS format enums
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
56ad7b57a4
nil: Use the nvidia headers for render target format enums
...
Two notable changes here:
1. BITMAP no longer exists
2. B10G10R10A2_UINT was wrongly mapped to RGB10_A2_UINT before
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
312e9a3eb0
nil: Use nvidia headers for texture format enums
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
6eaa45933e
nil: Properly depend on nouveau winsys and nvidia-headers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
53215c98bb
nouveau: Add class information to nouveau_ws_device
...
Annoyingly, with the current uAPI, this requires creating a dummy
context and throwing it away. Fortunately, we should only do this once
on driver load so it's really not that big a problem.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
58bf9ff90e
nvk: Depth bounds need fui()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
1d4c6cee45
nouveau/parser: Dump more fields as float
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
6d1babc9a0
nvk: Clean up try_create_physical_device error handling
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
673bb5c8b7
nvk: Advertise vertex buffer format featues
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
Faith Ekstrand
db4efa14df
nvk: Move the vertex format table into nvk_format.h
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:57 +00:00
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