Faith Ekstrand
ffc619b3eb
nouveau/mme: Invoke SET_OBJECT in the tests
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:03 +00:00
Faith Ekstrand
6fd6baa989
nouveau/nil: Use nv_device_info for format queries
...
There's no reason why any of this needs access to the fd or the context.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:03 +00:00
Faith Ekstrand
f23b892a9d
nouveau/nil: Take an nv_device_info for image functions
...
There's no reason why any of this needs access to the fd or the context.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:03 +00:00
Faith Ekstrand
433e742682
nouveau/winsys: Move device type into nv_device_info
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:03 +00:00
Faith Ekstrand
87f946730f
nouveau/winsys: Add an info to nouveau_ws_device
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:03 +00:00
Faith Ekstrand
0d25483101
nouveau/winsys: Take a drmDevicePtr in nouveau_ws_device_new()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:03 +00:00
Rebecca Mckeever
44431f8ee5
nvk: Implement VK_EXT_non_seamless_cube_map
...
Add new bit to VkSamplerCreateFlags and then advertise
VK_EXT_non_seamless_cube_map.
Closes: https://gitlab.freedesktop.org/nouveau/mesa/-/issues/42
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:03 +00:00
Rebecca Mckeever
788ae9b601
nvk: Enable shadow sampling
...
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:02 +00:00
Rebecca Mckeever
53e0bef359
nvk: Advertise EXT_4444_formats
...
The following tests now pass:
dEQP-VK.texture.filtering.2d.formats.a4b4g4r4_unorm.nearest
dEQP-VK.texture.filtering.2d.formats.a4b4g4r4_unorm.linear
dEQP-VK.texture.filtering.2d.formats.a4b4g4r4_unorm.nearest_mipmap_nearest
dEQP-VK.texture.filtering.2d.formats.a4b4g4r4_unorm.linear_mipmap_nearest
dEQP-VK.texture.filtering.2d.formats.a4b4g4r4_unorm.nearest_mipmap_linear
dEQP-VK.texture.filtering.2d.formats.a4b4g4r4_unorm.linear_mipmap_linear
The corresponding tests for a4r4g4b4_unorm are still passing.
Closes: https://gitlab.freedesktop.org/nouveau/mesa/-/issues/36
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:02 +00:00
Rebecca Mckeever
e89a715f4a
nvk: Add A4B4G4R4 formats to nil_format_info table
...
The nil_format_info table contains the following lines, which add
A4R4G4B4 formats.
C4(A, B4G4R4A4_UNORM, NONE, B, G, R, A, UNORM, A4B4G4R4, T),
F3(A, B4G4R4X4_UNORM, NONE, B, G, R, x, UNORM, A4B4G4R4, T),
Add similar lines to the nil_format_info table for A4B4G4R4 formats.
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:02 +00:00
Rebecca Mckeever
115644cbc6
nvk: Add VK_FORMAT_B4G4R4A4_UNORM_PACK16 format to nil_format_info table
...
The following tests now pass:
dEQP-VK.pipeline.monolithic.sampler.view_type.2d_unnormalized.format.b4g4r4a4_unorm_pack16.*
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:02 +00:00
Rebecca Mckeever
44b7d71c65
nvk: Advertise KHR_device_group
...
Closes: https://gitlab.freedesktop.org/nouveau/mesa/-/issues/35
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:02 +00:00
Rebecca Mckeever
d471da3f95
nvk: Implement nvk_CmdDispatchBase and delete nvk_CmdDispatch
...
Implement nvk_CmdDispatchBase() and then delete nvk_CmdDispatch() so that
the vk_common verion with be used instead. This will avoid repeated code.
Update nvk_CmdDispatchIndirect() so that it sets the three base_group
fields of the root descriptor table to 0.
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:02 +00:00
Rebecca Mckeever
3fb732ad7d
nvk: Lower base_workgroup_id
...
Lower load_base_workgroup_id intrinsics to a load_ubo using NIR.
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:02 +00:00
Rebecca Mckeever
668e859255
nvk: Add base_group to root descriptor table
...
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:02 +00:00
Faith Ekstrand
3c5fbfcc30
nvk: Set maxMemoryAllocationCount
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Thomas H.P. Andersen
7bb03cbd7a
nvk: call correct macro to clear views
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Thomas H.P. Andersen
1de2bc6144
nvk: fix maxPushDescriptors
...
maxPushDescriptors was advertised as 0.
Spotted with Sascha Willems pushdescriptors example
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
436171ecf1
nvk: Add a helper for loading resource_index-based descriptors
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
abe806236d
nvk: Drop block_size from the root descriptor table
...
It's unused because Vulkan doesn't support compute dispatches with an
unknown workgroup size. If we ever do, we can add it back in. In case
it ever comes back, add an unreachable() to nvk_nir_lower_descriptors().
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
6411cbc6c5
nvk: Lower load_num_workgroups ourselves
...
Instead of relying on the back-end to put it at a magic offset in a
magic constant buffer, lower it in NIR.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
3a6aeb7caa
nvk: Rename grid_size to group_count
...
That's the Vulkan name for it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
03738819f9
nvk: Capitalize NVK in user exposed strings
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Yusuf Khan
062b8e7477
nvk: expose KHR_driver_properties
...
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
748bc8e487
nvk: Advertise VK_EXT_separate_stencil_usage
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
0a84e58180
nvk: Advertise EXT_index_type_uint8
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
c461c30181
nvk: Advertise KHR_uniform_buffer_standard_layout
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
1bcb8797bc
nvk: Enable KHR_dynamic_rendering
...
We've been dynamic rendering since day 1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
dd044423a2
nvk: Advertise VK_KHR_bind_memory2
...
We already use the entrypoint (via the 1.0 wrappers); we just need to
turn on the extension.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
1e5b6074e0
nvk: Advertise samplerMirrorClampToEdge via 1.2 features
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
b934e98452
nvk: Enable VK_EXT_provoking_vertex
...
We already have it plumbed through. Just need to turn it on.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
d1b9441a8e
nvk: Enable inheritedQueries
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
0e84eb35e2
nvk: Re-order Vulkan 1.0 feature bits
...
Also, leave TODO comments for anything we want to enable but haven't.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Rebecca Mckeever
45c2ebc341
nvk: Convert system values for gl_PointCoord and PointCoord into inputs
...
Currently, any attempt to use gl_PointCoord (GLSL) or PointCoord (SPIR-V)
results in an assert in codegen:
ERROR: unknown nir_intrinsic_op load_point_coord
This patch addresses the error by converting nir_intrinsic_load_point_coord
system value into VARYING_SLOT_PNTC. The following tests now pass:
dEQP-VK.glsl.builtin_var.simple.pointcoord
dEQP-VK.glsl.builtin_var.simple.pointcoord_uniform_frag
dEQP-VK.glsl.builtin_var.simple.pointcoord_uniform_vert
Closes: https://gitlab.freedesktop.org/nouveau/mesa/-/issues/33
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
a08ad59ea6
nvk: Use nvk_buffer_addr_range for buffer descriptors
...
Because the helper checks for buffer == NULL, this should prepare us for
VK_KHR_robustness2 where we need to handle null descriptors.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
08e5a211dc
nvk: Add an nvk_buffer_addr_range helper
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
e0e16a7893
nvk: Fix a comment
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
George Ouzounoudis
d8c21d89e8
nvk: Support large points
...
We just need to enable the shader attribute. With point sprite
rasterization we get correct results on rasterization and draw tests.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
George Ouzounoudis
e6ef49b454
nvk: Switch point rasterization to point sprites
...
It seems for Vulkan we always need square points with shader PointCoords
just like OpenGL point sprites.
From vulkan spec's point rasterization:
"Point rasterization produces a fragment for each fragment area group of
framebuffer pixels with one or more sample points that intersect a region
centered at the point’s (xf,yf).
This region is a square with side equal to the current point size.
... (xf,yf) is the exact, unrounded framebuffer coordinate of the vertex
for the point"
From OpenGL compatibility spec:
Basic point rasterization:
"If point sprites are enabled, then point rasterization produces a
fragment for each framebuffer pixel whose center lies inside a square
centered at the point’s (xw, yw), with side length equal to the current
point size.
... and xw and yw are the exact, unrounded window coordinates of the
vertex for the point"
Also in OpenGL multisampling leads to circle points as we see in the spec:
Point multisample rasterization:
"This region is a circle having diameter equal to the current point width
if POINT_SPRITE is disabled, or a square with side equal to the current
point width if POINT_SPRITE is enabled."
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Faith Ekstrand
4fa8df43ea
nvk: Lower image_size to txs
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Karol Herbst
ae14362ff6
nvk: wire up M2MF for Fermi
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Karol Herbst
970bd70584
nvk: allocate VAB memory area
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Karol Herbst
8633aac584
nvk/device: fix order of error handling
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Karol Herbst
27d6f994ba
nvk: support pre Maxwell Texture Headers
...
GM10x seems to disable it by default, so enable them there.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Karol Herbst
6214bfd139
nvk: bind more subchans in init_context_state
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Karol Herbst
cd48710176
nvk: reduce pitch for FillBuffer
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Karol Herbst
1eb63dd19a
nvk: use remaps for image copies
...
This helps us to get around hardware limitations on the width.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Karol Herbst
a39d22f246
nvk: properly align slm size
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Karol Herbst
cb54c32fee
nvk: Use SET_PIPELINE_PROGRAM pre-Volta
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00
Karol Herbst
f24bd52915
nvk: align desc root table
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:02 +00:00