Faith Ekstrand
f0a165799c
nvk: Add an addr field to nvk_image_plane
...
Nothing actually needs the pointer to the memory object so it's better
to not even include it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Dave Airlie
ad37394dfe
nvk: init image fields for requirements
...
Fixes a crash in dEQP-VK.memory.requirements.create_info.*
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Faith Ekstrand
0498eeba32
nvk: Add a buffer alignment helper
...
This consolodates buffer alignment calculations into one place,
including physical device queries, buffer creation, and buffer memory
requirements queries.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Faith Ekstrand
6a0cc93bd4
nvk: Reformat nvk_buffer.c
...
Mostly, using dev instead of device and re-flow the arguments to
nvk_GetDeviceBufferMemoryRequirements().
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Karol Herbst
5fb3298a95
nouveau/winsys: fix SM value for Ada
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Emma Anholt
9ffbd53bb7
nvk: Add support for probing as a platform device.
...
The driver now comes up on gk20a (Jetson TK1).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Emma Anholt
880663c25d
nvk: Clean up redundant vendor checking for physical device creation.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Emma Anholt
826486339b
nvk: Quiet a compiler warning.
...
Looks like it's always set to me, but 🤷
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Emma Anholt
0410054459
nouveau/winsys: Fix an undefined use in the error path.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Dave Airlie
820c03ebee
nvk/query: fix push buffer size for copy pool results.
...
the immediate takes two slots, so bump this by one,
fixes a crash in zink KHR-GL45.transform_feedback.query_vertex_interleaved_test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Faith Ekstrand
4fe57b2d7a
nvk: Enable external memory extensions
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Faith Ekstrand
113b9b00e7
nvk: Support dma-buf export
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Faith Ekstrand
0399999dec
nvk: Support dma-buf import
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Faith Ekstrand
c370260a8f
nouveau/winsys: Add dma-buf import support
...
This requires a lock and a buffer cache on the nouveau_ws_device.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Faith Ekstrand
10ffe8e709
nvk: Require dedicated allocations for external images
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Faith Ekstrand
7f0c06e130
nvk: Dedicated allocations override internal
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Faith Ekstrand
702326d013
nvk: Add external memory queries
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Faith Ekstrand
3d247f447e
nvk: Add device and driver UUIDs
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Faith Ekstrand
cccc044f51
nvk: Use abbreviated names in nvk_device_memory.c
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
Faith Ekstrand
14d35c7048
nvk: Use NVIDIA_VENDOR_ID in pdev try_create()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
George Ouzounoudis
ccfbd94891
nvk: Enable descriptor indexing
...
These values follow the already existing per-stage and descriptor set
limits. If we change these to be similar to the reported values of the
proprietary driver, care must be taken as Turing has bigger limits for
uniform buffers than older generations.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
George Ouzounoudis
edb58c6660
nvk: Add nir non-uniform optimization pass
...
The hardware supports non-uniform access natively so we do not need to
lower most non-uniform access in the shader. Just lower the ubo access
as it should probably be faster when we uniformly load from real hw
ubos in the future.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:06 +00:00
George Ouzounoudis
0dd15199a1
nvk: Handle cases of descriptor bindings with variable counts
...
We need to compute the allocated descriptor buffer size at descriptor allocation
time. So we need to split to a pre-computed size for all the other bindings
except the one with the variable count.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
George Ouzounoudis
6a74b3e311
nvk: Support VkDescriptorSetVariableDescriptorCountLayoutSupport
...
On cases with variable descriptor counts we need to calculate the
maximum supported variable count while taking into account the other existing
descriptors and their alignments in the set.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Faith Ekstrand
81bec8b63b
nvk: Use the max descriptor alignemtn in GetDescriptorSetLayoutSupport
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Benjamin Lee
354fe8fda0
nvk: Fix segfault when opening DRI device file returns error
...
Previously, ver was unitialized on this path, causing UB on the
`if (ver)` branch after the out_err label.
Signed-off-by: Benjamin Lee <benjamin@computer.surgery>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Dave Airlie
3572f5cd7e
nvk: add support for D32_SFLOAT_S8_UINT
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Faith Ekstrand
62fa4ff5e0
nvk: Take an nvk_image_plane in nouveau_copy_rect_image
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Faith Ekstrand
8d712c2e06
nvk: Add helpers for binding image planes
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Faith Ekstrand
fe022d4e87
nvk: s/device/dev in nvk_image.c
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Dave Airlie
ebcac6b81c
nvk: introduce an optimisation loop.
...
This brings in pretty much the radv opt loop.
So for tess ctrl where this a loop we can unroll, this fixes
some dynamic array access later to be non-dynamic.
Fixes:
dEQP-VK.clipping.user_defined.clip_distance_dynamic_index.vert_tess.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Dave Airlie
0b6b59e654
nvk: merge tess info between tcs/tes.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Dave Airlie
136d49054b
nvk: fix transform feedback crash when optimiser removes things.
...
This optimise loop can remove stuff, which causes this to crash,
just exit early.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
George Ouzounoudis
7715aea5aa
nvk: Lower io to temporaries for tessellation evaluation nir
...
This is consistent to what radv does.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
George Ouzounoudis
f561406d38
nvk: Respect tessellation domain origin state
...
When switching to lower left tessellation domain origin we need to
switch the orientation for triangles/quads. The changes are based on
what anv and radv do.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
George Ouzounoudis
93369f1f96
nvk: Fix cases where execution mode is specified in the tesc shader.
...
We need to keep some context for the compilation of the tessellation shaders.
This is required in the case where the domain is specified in the
tessellation control shader instead of the tessellation evaluation
shader, as codegen needs the domain information when compiling the
tessellation evaluation shader.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
George Ouzounoudis
544aadc56b
nvk: Enable multiview with tessellation shader
...
This works by default, we just switch it on.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
George Ouzounoudis
76e02c7f77
nvk: Assign locations correctly for arrayed IO
...
Arrayed IO, encountered in tessellation shaders, should not take up
multiple driver locations.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
George Ouzounoudis
304636297f
nvk: Basic tessellation shader support
...
Based on nvc0 implementation but with added nvidia-headers usage.
Device limits taken from http://www.vulkan.gpuinfo.org/ and minimum
required values.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Thomas H.P. Andersen
ecbcc26a6e
nvk: remove duplicated device features
...
These are already set in the Vulkan 1.2 section
Add status for bufferDeviceAddressCaptureReplayEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Mohamed Ahmed
e41031d8ff
nvk: Enable multiplane images and image views
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Faith Ekstrand
39d8d3811d
nvk: Advertise KHR_spirv_1_4
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Faith Ekstrand
1ea94caab6
nvk: Fix the NO_PREFETCH assert for CmdDrawIndirect
...
The NO_PREFETCH bit gets set on the range. The offset can pretty much
be whatever.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Faith Ekstrand
e2379a2e87
nvk: Advertise shaderStorageImageReadWithoutFormat
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Faith Ekstrand
6334cac288
nvk/heap: Set the right pitch for heap resize copies
...
Otherwise, once we need to grow past 2^17 B, we attempt to copy two
lines, the hardware errors out, and we get left with a junk heap.
While we're here, re-arrange the code a bit so we keep all the P_FOO
together.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Echo J
729b34be8a
nil: Add A4B4G4R4_UNORM format support
...
DXVK versions before v1.5.5 need this format in some cases
I haven't tried running CTS yet, but GTA San Andreas runs
well now on DXVK v1.5.1 (before this change it crashed) so
I think CTS should be happy enough 🐸
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Dave Airlie
ac4073a4ee
nvk: expose EXT_sampler_filter_minmax
...
The sampler bits of this were already hooked up.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Faith Ekstrand
72263d7589
nvk: Only use view_id for layer in multiview
...
I can't prove that this fixes anything but it seems right.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Rebecca Mckeever
3e93173cc9
nvk: Move code inside view mask loops to a helper function
...
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00
Rebecca Mckeever
45001c878f
nvk: Combine CLEAR_VIEWS and CLEAR_LAYERS MME macros
...
Check view_mask inside the macro to determine which loop to run. In
emit_clear_rects(), move code out of if/else that is the same in both
branches.
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:05 +00:00