Commit graph

1877 commits

Author SHA1 Message Date
Faith Ekstrand
0bc02eee4b nak: Refactor shader upload math
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27156>
2024-01-19 01:07:30 +00:00
Faith Ekstrand
148971f232 nvk/draw: Map cbuf slots to shaders, not cbuf_maps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27156>
2024-01-19 01:07:30 +00:00
Faith Ekstrand
5b1afb0482 nvk: Advertise VK_NV_shader_sm_builtins
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27154>
2024-01-18 20:20:06 +00:00
Faith Ekstrand
a55b2996ab nak: Add support for SPV_NV_shader_sm_builtins
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27154>
2024-01-18 20:20:06 +00:00
Hans-Kristian Arntzen
4ab6d7e753 wsi/x11: Add drirc option to ignore SUBOPTIMAL.
Talos Principle and related games on that engine fail to handle
SUBOPTIMAL properly. Adds an option to ignore SUBOPTIMAL and pretend
it's SUCCESS.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27037>
2024-01-18 17:23:32 +00:00
Benjamin Lee
30e09d0e98 nak: implement FLO on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27129>
2024-01-18 05:02:27 +00:00
Faith Ekstrand
184bcfdc1c nvk: Implement VK_KHR_zero_initialize_workgroup_memory
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9609
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
6e214f2157 nvk: Properly configure the min/max shared mem size
We don't really understand what these values are supposed to be but this
is a lot closer to what the blob does and lets more compute tests pass.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
eaa7980e15 nvk: Add a #define for max shared memory size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
be0f04f5bd nvk: Unref shaders on pipeline free
Fixes: d6a1e29ccd ("nvk: pipeline shader cache")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
4b0448d8f8 nvk: Set framebufferIntegerColorSampleCounts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Mary Guillemard
531505f8c5 nouveau: mme: Add a dumper
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
cb6d954c67 nouveau: nvidia-headers: Add nv_push_dump tool
Add "nv_push_dump" allowing to dump a human readable version of a
pushbuf blob.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
d9cd3e4c55 nouveau: nvidia-headers: Add compute array parsing to class_parser.py
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
2cc9ad0e5c nouveau: nvidia_header: Add AMPERE_COMPUTE_B in vk_push_print
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
20b3f9521e nouveau: nvidia_header: Add TURING_COMPUTE_A and AMPERE_COMPUTE_A in vk_push_print
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
2d8b9b9160 nouveau: nvidia_header: Add AMPERE_A in vk_push_print
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Faith Ekstrand
32f2a0f1e1 nouveau/mme: Stop using isaspec
We had hand-written decoders for the simulators anyway so it really
isn't gaining us much.  It does, however, make the whole build more
complicated.  Better to just drop it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Faith Ekstrand
a69b7f1b19 nouveau/mme/fermi: Stop truncating iadd immediates
It's better to leave it in signed form so that we can assert that it's
an int18 later if we want.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Benjamin Lee
1593caf610 nak: implement FSWZADD on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27063>
2024-01-16 23:46:19 +00:00
Faith Ekstrand
bb10f7f5da nak: Implement nir_op_bfm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26550>
2024-01-16 23:32:13 +00:00
Faith Ekstrand
c14f4cc052 nak: Rename OpBrev to OpBRev
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26550>
2024-01-16 23:32:13 +00:00
Faith Ekstrand
9b68c77abb nak: Implement nir_op_ufind_msb_rev
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26550>
2024-01-16 23:32:13 +00:00
Faith Ekstrand
a3bceafed5 nak: Implement nir_op_pack_half_2x16_rtz_split
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26550>
2024-01-16 23:32:13 +00:00
Konstantin Seurer
9eb48e8040 nak/repair_ssa: Remap PHI sources as well
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26371>
2024-01-16 20:24:15 +00:00
Benjamin Lee
99720f0564 nak: fix frnd on SM50
Previously we weren't setting bit 42 when encoding frnd as f2f. This
causes it to ignore the rounding mode when src_type == dst_type.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27065>
2024-01-16 19:05:40 +00:00
Benjamin Lee
ff84aef116 nak: support predicate sel on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27064>
2024-01-16 18:28:22 +00:00
Benjamin Lee
9b6a39cfd4 nak: support predicate swaps on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27064>
2024-01-16 18:28:22 +00:00
Faith Ekstrand
f1cf7f0d86 nak: Stop passing --explicit-padding to bindgen
It's apparently broken on 32-bit builds and screws up our NIR bindings.
Instead, using -Wpadded with a pragma to ensure we don't add padding to
the struct.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27078>
2024-01-15 20:45:14 +00:00
Faith Ekstrand
3c7460c023 nvk: Advertise variableMultisampleRate and EDS3RasterizationSamples
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9665
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27025>
2024-01-13 18:25:20 +00:00
Faith Ekstrand
0e33dba625 nvk: Move SET_HYBRID_ANTI_ALIAS_CONTROL to draw time
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27025>
2024-01-13 18:25:20 +00:00
Faith Ekstrand
148ea7792f nvk: Emit SET_ANTI_ALIAS at draw time when no render targets are bound
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27025>
2024-01-13 18:25:20 +00:00
Faith Ekstrand
94d96dac60 nak: Add explicit padding to nak_shader_info
This ensures that the padding bits stay zero, even as we copy the
structure around through multiple languages.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27049>
2024-01-12 23:58:11 +00:00
Faith Ekstrand
d280160a13 nak: Disallow gl_FragData and set MRT correctly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27049>
2024-01-12 23:58:11 +00:00
Faith Ekstrand
005b5b1464 nvk: Set a minimum of one patch control point
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27049>
2024-01-12 23:58:11 +00:00
Faith Ekstrand
2cab67a9f1 nvk: Invalidate state after secondary command buffers
Today, the only thing that this really affects is descriptor sets and
dynamic state as everything else is re-emitted almost every time.
However, as we add more dirtying, we'll need to be more and more careful
about stale state leaking across secondary command buffer executions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27049>
2024-01-12 23:58:11 +00:00
Faith Ekstrand
bc36dfdb5d nvk: Handle missing descriptor sets in nvk_nir_lower_descriptors
For VK_EXT_graphics_pipeline_library, we need to be able to handle
missing descriptor sets.  THis screws up dynamic buffers because we're
no longer guaranteed to be able to statically compute the index into
nvk_root_descriptor_table::dynamic_buffers while lowering descriptors.
Instead, we may need to look up the start index for the set in
nvk_root_descriptor_table::set_dynamic_buffer_start and compute from
there.

We also rework nvk_nir_lower_descriptors to take an array of (possibly
NULL) descriptor sets.  This ensures that we don't make any assumptions
about the pipeline layout.  It's also the interface we'll want for
implementing VK_EXT_shader_object.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27048>
2024-01-12 23:42:39 +00:00
Faith Ekstrand
3197aff4e8 nvk: Make dynamic cbuf indices relative to the descriptor set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27048>
2024-01-12 23:42:38 +00:00
Faith Ekstrand
e0d907f56f nvk: Rework descriptor set binding
This prepares us for VK_EXT_graphics_pipeline_library by allowing null
descriptor sets to be bound and handling holes in pipeline layouts.  We
also add a set_dynamic_buffer_start map to the root descriptor table
which says where in dynamic_buffers each set starts.  This can be used
by the pipeline layout lowering in the case where we can't statically
the dynamic buffer index for a binding.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27048>
2024-01-12 23:42:38 +00:00
Faith Ekstrand
a11adbe408 nvk: Use s instead of set_idx in CmdBindDescriptorSets
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27048>
2024-01-12 23:42:38 +00:00
Faith Ekstrand
2d5c04ee4a nvk: Return an nvk_cbuf_map from nvk_lower_nir()
There's no need to pass in the whole shader when the only part we're
going to write is the cbuf map.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27048>
2024-01-12 23:42:38 +00:00
Faith Ekstrand
f62b5582ea nvk: Add an explicit mapping from shader stages to cbuf bindings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27048>
2024-01-12 23:42:38 +00:00
Karol Herbst
2d3273e388 nak/algebraic: write code to an output file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26999>
2024-01-11 19:02:44 +00:00
Karol Herbst
15785a9bfe nak/algebraic: merge run and main function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26999>
2024-01-11 19:02:43 +00:00
Yonggang Luo
32d2f70742 nouveau: Use align64 instead of ALIGN over input layer_size_B
layer_size_B is uint64_t, so use align64 over it
Because array_stride_B is uint32_t, so cast back to uint32_t

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932>
2024-01-11 17:30:46 +00:00
Yonggang Luo
0b9c96562b treewide: Use util_is_power_of_two_nonzero{64|_uintptr} when needed
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26909>
2024-01-11 16:45:57 +00:00
Thomas H.P. Andersen
83ba2498c2 nvk: VK_EXT_shader_module_identifier
dEQP-VK.pipeline.monolithic.shader_module_identifier.*

Test run totals:
  Passed:        530/1292 (41.0%)
  Failed:        0/1292 (0.0%)
  Not supported: 762/1292 (59.0%)
  Warnings:      0/1292 (0.0%)
  Waived:        0/1292 (0.0%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25550>
2024-01-09 20:27:27 +00:00
Thomas H.P. Andersen
057133927b nvk: VK_EXT_pipeline_creation_cache_control
dEQP-VK.pipeline.monolithic.creation_cache_control.*

Test run totals:
  Passed:        16/18 (88.9%)
  Failed:        0/18 (0.0%)
  Not supported: 2/18 (11.1%)
  Warnings:      0/18 (0.0%)
  Waived:        0/18 (0.0%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25550>
2024-01-09 20:27:27 +00:00
Thomas H.P. Andersen
74647ee45a nvk: VK_EXT_pipeline_creation_feedback
dEQP-VK.*creation_feedback*

Test run totals:
  Passed:        13/73 (17.8%)
  Failed:        0/73 (0.0%)
  Not supported: 60/73 (82.2%)
  Warnings:      0/73 (0.0%)
  Waived:        0/73 (0.0%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25550>
2024-01-09 20:27:27 +00:00
Thomas H.P. Andersen
d6a1e29ccd nvk: pipeline shader cache
dEQP-VK.pipeline.monolithic.cache.*

Test run totals:
  Passed:        773/773 (100.0%)
  Failed:        0/773 (0.0%)
  Not supported: 0/773 (0.0%)
  Warnings:      0/773 (0.0%)
  Waived:        0/773 (0.0%)

Timing these test:
Before:
real    0m11,304s
user    0m9,442s
sys     0m0,477s

After:
real    0m3,470s
user    0m1,962s
sys     0m0,504s

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25550>
2024-01-09 20:27:27 +00:00