Faith Ekstrand
2a2076b0d2
nvk: Don't advertise tiling on non-power-of-two formats
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
60f41aca47
nvk: Use a UINT format to clear non-renderable images
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
177c968cd1
nvk: Implement vkCmdClear*Image directly
...
Instead of invoking the meta code, implement it ourselves so we get the
HW clear path. We could probably put these implementations somewhere
common since they only set up a few things and invoke Begin/EndRendering
but there's not that much point for now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
f1aa12d596
nvk: Add image_view_init/finish functions
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
7b7bfbcc61
nvk: Use hardware clears for attachment clears
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
10d16dce1c
nouveau/parser: Add array and float tags for clear values
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Mauro Rossi
4d02d9d796
vulkan/meta: fix gnu-empty-initializer build error
...
Fixes the following building error:
../src/vulkan/runtime/vk_meta_clear.c:213:42: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
struct vk_meta_clear_push_data push = { };
^
1 error generated.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
b877922b07
nvk: Save/restore push constants around meta ops
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
a1652525e2
nvk: Wire up early z and post depth coverage
...
Was crawling through header bits and found that we weren't plumbing
these through.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Dave Airlie
b5beae5777
nvk: add basic primitive restart
...
fixes crucible
func.draw-index16-restart
func.draw-index32-restart
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Yusuf Khan
8e052c311f
nvk: support GetImageSparseMemoryRequirements2
...
KHR_get_memory_requirements2 was enabled but GetImageMemoryRequirem
ents2 was not. This stubs out GetImageMemoryRequirements2 to fix it.
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
v2: remove the v1 version of the command as its provided by the
common runtime
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Yusuf Khan
8271228289
nvk: implement GetDeviceMemoryCommitment
...
vulkan spec says:
If the memory object is allocated from a heap with the
VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set, that object’s
backing memory may be provided by the implementation lazily. The
actual committed size of the memory may initially be as small as
zero (or as large as the requested size), and monotonically
increases as additional memory is needed.
As far as I can tell we ignore the bit meaning that we allocate the
requested size so return that as the size.
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
f3d43c2a86
nvk: Allocate descriptors for input attachments
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
d2b30362eb
nvk: Assert samples == 1
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
e3afa1e3c2
nvk: Re-flow a couple function prototypes
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
0252b000de
nvk: Align descriptor buffers to NVK_MIN_UBO_ALIGNMENT
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
8fff829b0b
nvk: Add nvk_queue_init/finish() helpers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
Faith Ekstrand
1410100ebe
nil: Add a PTE kind for Z32_FLOAT
...
This values was found by trial-and-error poking at the hardware until it
stopped complaining. It's not clear if we need separate values for
compressed vs. not. This appears to work on Turing regardless of what
we set for SET_Z_COMPRESSION.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:58 +00:00
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