Mike Blumenkrantz
0b2b2a4783
zink: remove ZINK_HEAP_HOST_VISIBLE_ANY
...
this was just the coherent heap but splitting the slabs more to make
suballocating worse
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12659 >
2021-09-01 04:24:03 +00:00
Mike Blumenkrantz
a923835afc
zink: clamp lazy pools to 500 descriptors and allocate more slowly
...
now that these can get popped without stalling, they can be much smaller
to avoid exploding available memory or address space
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12658 >
2021-09-01 04:13:07 +00:00
Mike Blumenkrantz
70f1337f63
zink: use compatible renderpass state in pipeline hash
...
this massively deduplicates the number of pipelines
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
8dac288c8d
zink: track compatible render passes
...
Two render passes are compatible if their corresponding color, input, resolve, and depth/stencil
attachment references are compatible and if they are otherwise identical except for:
• Initial and final image layout in attachment descriptions
• Load and store operations in attachment descriptions
• Image layout in attachment references
VK 8.2
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
d7e36a1831
zink: inline gfx pipeline hash table
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
15450d2c2e
zink: incrementally hash all pipeline component hashes
...
not the actual pipeline hash, just the components
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
12cf0099fd
zink: incrementally hash vertex state into pipeline hash
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
6fd5565933
zink: incrementally hash module variants in pipeline
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
7f23c9daca
zink: incrementally hash gfx shader stages
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605 >
2021-09-01 03:28:11 +00:00
Mike Blumenkrantz
07240424ca
zink: don't use dynamic vertex stride with dynamic vertex input
...
avoid spurious validation errors and potential driver fails from updating
stride twice
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12604 >
2021-09-01 03:18:14 +00:00
Mike Blumenkrantz
34abd8761a
zink: dynamic vertex input template
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12604 >
2021-09-01 03:18:14 +00:00
Mike Blumenkrantz
e53e5165b1
zink: create inner scanout object without scanout binds
...
this restores mutable formats to the inner object to work with scanout
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12629 >
2021-09-01 03:07:55 +00:00
Mike Blumenkrantz
63e62af31c
zink: ensure gfx shader module states are updated when doing a partial recalc
...
these are in the pipeline state and must be updated
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12632 >
2021-09-01 02:56:04 +00:00
Mike Blumenkrantz
c71e662ae2
zink: remove refcounting from batch states
...
these are always destroyed by the context, no exceptions
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12633 >
2021-09-01 02:46:00 +00:00
Mike Blumenkrantz
39df394ffe
zink: split out stalling from fence-waiting function
...
stall and flush+stall are not the same; in some cases, the driver must only
stall and never flush, so ensure that this is possible to avoid infinite
recursion
fixes Metro Last Light: Redux benchmark mode
Fixes: d8905446d6 ("zink: rework oom flushing")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12652 >
2021-09-01 02:35:38 +00:00
Mike Blumenkrantz
2aaca02bbf
zink: use tc rebind info for buffer replacements
...
this makes the most common type of replacement more efficient
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12575 >
2021-09-01 02:23:05 +00:00
Mike Blumenkrantz
52a846d147
zink: directly pass resource pointer to descriptor state updates
...
this should cut down a little more overhead
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12575 >
2021-09-01 02:23:05 +00:00
Mike Blumenkrantz
802e43a6b5
gallium/cso: add unbind mask for cso restore
...
this code was duplicated in a bunch of places, so now there can just
be a bitmask passed to simplify and consolidate
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12571 >
2021-09-01 01:59:52 +00:00
Mike Blumenkrantz
7ac2edd555
aux/cso: always restore states in atom order
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12571 >
2021-09-01 01:59:52 +00:00
Mike Blumenkrantz
b7534fe82a
zink: destroy shader modules on program free to avoid leaking
...
it's irrelevant whether the shader pointer is valid, the shader cache
may still exist
Fixes: a92442225c ("zink: split up shader cache per-stage")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12650 >
2021-09-01 01:48:04 +00:00
Tomeu Vizoso
eb7eccc76f
lavapipe: Use generated command queue code
...
Most of the code that implements entry points for commands doesn't need
to be manually written. So just drop it.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369 >
2021-09-01 01:05:22 +00:00
Tomeu Vizoso
997a6ca226
vulkan: Generate entrypoints that enqueue commands
...
For drivers such as Lavapipe that record the commands at the execution
stage.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369 >
2021-09-01 01:05:22 +00:00
Tomeu Vizoso
a7b0946ef0
vulkan: Generate code to place commands in a queue
...
It can be used by lavapipe and also by drivers for GPUs with command
streams that require values related to the framebuffer, thus the command
stream emission for secondary buffers needs to be deferred until the
framebuffer is known (execution time).
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369 >
2021-09-01 01:05:22 +00:00
Tomeu Vizoso
925a8fac17
vulkan: Read len attribute of parameters to functions
...
It will be needed for generating code that needs to know the size of
arrays.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369 >
2021-09-01 01:05:22 +00:00
Tomeu Vizoso
77ad17d022
lavapipe: add xfails for whole of CTS
...
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369 >
2021-09-01 01:05:22 +00:00
Marek Olšák
3362da2c53
ac/gpu_info: fix detection of smart access memory
...
chip_class was 0. Move the code after setting chip_class.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5282
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
e05ad2680c
radeonsi: set gfx10 registers better in si_emit_initial_compute_regs
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
deacef5d43
radeonsi: fix a memory leak in si_get_shader_binary_size
...
Fixes: bf8a1ca902 "radeonsi: use the new run-time linker for shaders"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5272
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
46cb3bb4d1
ac/debug: add an option to disable colors for printed IBs
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
6cb2f07e90
radeonsi: add si_print_current_ib function for debugging
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
f28552b804
radeonsi: don't use SQ_NON_EVENT before GE_PC_ALLOC for better perf on Navi1x
...
SQ_NON_EVENT was originally meant to fix a perf issue on Navi1x, but using
the event actually makes the perf worse.
This improves perf for viewperf/snx.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
9fb77745f5
radeonsi: inline si_need_gfx_cs_space
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
77a0411694
winsys/amdgpu: clean up amdgpu_cs_check_space
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
48632778b9
radeonsi: simplify si_need_gfx_cs_space
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
85742b28ef
radeonsi: inline remaining big functions in draw_vbo for better snx perf
...
This makes compilation slower, but the perf improvement is ~4%
with pipe_vertex_state.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
b15c413947
radeonsi: simplify memory usage checking by merging vram and gtt counters
...
no change in behavior
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
b92e109ac6
radeonsi: correctly use cs instead of gfx_cs in build pm4 helpers
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:58 +00:00
Marek Olšák
b29741906d
radeonsi: use memcmp and radeon_emit_array in radeon_opt_set_context_regn
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
0aed2d0cd3
radeonsi: stop using AC_EXP_PARAM_UNDEFINED because it's not useful
...
Just use AC_EXP_PARAM_DEFAULT_VAL_0000 to keep things simple.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
2027831aaa
radeonsi: inline si_get_alpha_test_func
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
c005b2cd4b
radeonsi: move as_ls/es/ngg setting out of si_shader_selector_key
...
Do it when we bind shaders.
The advantages are:
- no need to memset the fields when any shader variant state is changed
(e.g. culling on/off)
- no need to recompute the fields every time that happens
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
5a8a716168
radeonsi: move si_vgt_stages_key determination into si_update_vgt_shader_config
...
This simplifies si_update_shaders. It also makes it more obvious that
si_update_shaders could become a C++ template one day.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
ec37db756e
radeonsi: remove stages_key parameter from si_shader_selector_key
...
no change in behavior
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
08310f85ae
radeonsi: remove instancing support from the prim discard compute shader
...
It's not important for workstation apps on Vega.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
9ec707ca37
radeonsi: remove unused depth_clamp_any
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656 >
2021-09-01 00:42:57 +00:00
Marek Olšák
6367d8036a
mesa: skip draw calls with unaligned indices
...
GL doesn't say which error we should report. dEQP expects no error and
no crash and allows skipping the call. Some drivers can crash.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5227
Cc: mesa-stable@lists.freedesktop.org
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12533 >
2021-08-31 23:54:51 +00:00
Marek Olšák
614f273ab4
mesa: fix gl_DrawID with indirect multi draws using user indirect buffer
...
The code lowered the draws to direct ones but disregarded gl_DrawID.
We need to pass the draw ID to the driver manually.
gl_DrawID is the 3rd parameter of DrawGallium here.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5274
Cc: mesa-stable@lists.freedesktop.org
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12533 >
2021-08-31 23:54:51 +00:00
Marek Olšák
1f80cd35cb
mesa: remove unused indices parameter from validate functions
...
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12533 >
2021-08-31 23:54:51 +00:00
Dave Airlie
07956bbcae
lavapipe: VK_KHR_depth_stencil_resolve support
...
This adds support for depth stencil resolves to lavapipe.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504 >
2021-08-31 23:26:45 +00:00
Dave Airlie
3235b695b2
u_blitter: add support for sample0 only resolves.
...
This adds support for sample0 only resolves to support lavapipe
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504 >
2021-08-31 23:26:45 +00:00