mesa/src/panfrost/vulkan
Olivia Lee 781d3162e4 panfrost: pass blend constants to blend shaders dynamically
This is similar to the approach in panvk, where we pass blend constants
to the blend shader in fixed FAU slots instead of specializing the
shader on blend constants. TODO: explain midgard stuff

This eliminates the blend shader variant cache, which performed very
badly when the working set of blend constants in an application was >32
(the maximum number of variants stored). Just increasing the cache size
like we did in f1f39fa645 ("panfrost: Increase the limit for blend
shader variants") would help for applications with a larger static set,
but we would still have cache thrashing on applications which change the
blend constants dynamically.

For gfxbench gl_driver, which uses 386 blend constant values, this
improves FPS on a G610 from 6.06 to 40.48. Most applications are
unaffected, because they don't use enough constant values to cause
thrashing.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34666>
2025-05-07 07:55:44 +00:00
..
avalon panvk: Add v12 support 2025-04-15 13:36:07 +02:00
bifrost panfrost: invert and rename no_ubo_to_push flag 2025-04-10 08:05:21 +00:00
csf panvk: Implement CmdDraw[Indexed]IndirectCount for v10+ 2025-04-28 10:33:32 +00:00
jm panvk: Prepare cmd_prepare_push_uniforms() for multiDrawIndirect 2025-04-28 06:38:09 +00:00
valhall panvk: Overhaul the Bifrost descriptor set implementation 2024-06-14 20:52:21 +00:00
meson.build panvk: Add v13 support 2025-04-15 13:36:07 +02:00
panvk_android.c panvk: Add missing headers to android platform 2024-10-14 23:09:03 +00:00
panvk_blend.h panvk: Support color attachment remapping 2025-04-10 13:17:53 +00:00
panvk_buffer.c panvk: Use the new buffer device address infrastructure 2025-03-06 09:46:00 +00:00
panvk_buffer.h panvk: Use the new buffer device address infrastructure 2025-03-06 09:46:00 +00:00
panvk_buffer_view.h panvk: Use memory pools for internal GPU data attached to vulkan objects 2024-06-17 07:31:50 +00:00
panvk_cmd_alloc.h panvk: Catch indirect allocation failures 2024-10-01 14:36:38 +00:00
panvk_cmd_desc_state.h panvk: Prepare cmd_prepare_shader_res_table() for multiDrawIndirect 2025-04-28 06:38:09 +00:00
panvk_cmd_dispatch.h panvk: Move TLS preparation logic to cmd_dispatch_prepare_tls 2025-02-11 12:33:23 +00:00
panvk_cmd_draw.h panvk: Implement CmdDraw[Indexed]IndirectCount for v10+ 2025-04-28 10:33:32 +00:00
panvk_cmd_fb_preload.h panvk: Build cmd_fb_preload on explicit fb_info 2024-11-26 11:58:28 +01:00
panvk_cmd_meta.h panfrost: Kill the mali_ptr typedef 2025-01-07 11:10:55 +00:00
panvk_cmd_oq.h panvk/csf: Rework the occlusion query logic to avoid draw flushes 2025-01-15 14:07:37 +00:00
panvk_cmd_pool.c panvk: Catch indirect allocation failures 2024-10-01 14:36:38 +00:00
panvk_cmd_pool.h panvk: Prepare panvk_cmd_pool for CSF 2024-08-23 14:38:59 +00:00
panvk_cmd_precomp.h panvk: Implement precomp dispatch 2025-02-11 12:33:23 +00:00
panvk_cmd_push_constant.h panvk: Prepare cmd_prepare_push_uniforms() for multiDrawIndirect 2025-04-28 06:38:09 +00:00
panvk_descriptor_set.h panvk: Overhaul the Bifrost descriptor set implementation 2024-06-14 20:52:21 +00:00
panvk_descriptor_set_layout.h panvk: Use multiple sampler planes and one texture descriptor per plane 2025-02-08 07:48:41 +00:00
panvk_device.h panvk: Remove dependency on vk_device::drm_fd 2025-04-08 15:38:39 +00:00
panvk_device_memory.c panvk: do not leak mapped memory 2024-11-14 18:45:44 +00:00
panvk_device_memory.h panvk: Conditionally register an host address when tracking user memory 2024-08-23 14:39:00 +00:00
panvk_image.c panvk: Implement GetImageSubresourceLayout2 and GetDeviceImageSubresourceLayoutKHR() 2025-04-23 11:31:40 +00:00
panvk_image.h panvk: Support D32_S8 as a multiplanar format 2024-12-02 20:18:43 +00:00
panvk_image_view.h panvk: Use multiple sampler planes and one texture descriptor per plane 2025-02-08 07:48:41 +00:00
panvk_instance.c panvk: Enable VK_EXT_direct_mode_display 2025-04-24 12:11:32 +00:00
panvk_instance.h panvk: add basic driconf infrastructure 2025-03-31 09:24:04 +00:00
panvk_macros.h panvk: Add v13 support 2025-04-15 13:36:07 +02:00
panvk_mempool.c panvk: Make panvk_pool_free_mem() error proof 2024-10-15 13:16:07 +00:00
panvk_mempool.h panvk: Fix panvk_priv_mem_bo() on 32-bit platforms 2025-01-10 15:53:36 +00:00
panvk_meta.h panvk: Switch JM clear queries to CLC 2025-02-13 11:50:06 +00:00
panvk_physical_device.c panvk: Advertise VK_EXT_depth_bias_control 2025-04-29 14:08:37 +00:00
panvk_physical_device.h panfrost: Take tiler memory budget into account in pan_select_tiler_hierarchy_mask 2025-04-21 19:55:59 +02:00
panvk_precomp_cache.h panvk: Implement precomp dispatch 2025-02-11 12:33:23 +00:00
panvk_priv_bo.c panvk: Catch indirect allocation failures 2024-10-01 14:36:38 +00:00
panvk_priv_bo.h panfrost: Kill the mali_ptr typedef 2025-01-07 11:10:55 +00:00
panvk_query_pool.h panvk: widen type before multiplying 2024-11-28 10:22:22 +00:00
panvk_sampler.h panvk: Use multiple sampler planes and one texture descriptor per plane 2025-02-08 07:48:41 +00:00
panvk_shader.h panvk: Add v12 support 2025-04-15 13:36:07 +02:00
panvk_tracepoints.py panvk: add u_trace perfetto support 2024-12-17 23:14:26 +00:00
panvk_utrace.c u_trace: pass tracepoint flags to the read_timestamp callback 2025-02-24 08:08:02 +00:00
panvk_utrace.h u_trace: pass tracepoint flags to the read_timestamp callback 2025-02-24 08:08:02 +00:00
panvk_utrace_perfetto.cc perfetto/android: align datasource names with tooling expectations 2025-04-08 18:29:10 +00:00
panvk_utrace_perfetto.h panvk: add u_trace perfetto support 2024-12-17 23:14:26 +00:00
panvk_vX_blend.c panfrost: pass blend constants to blend shaders dynamically 2025-05-07 07:55:44 +00:00
panvk_vX_buffer_view.c pan/genxml: Enforce explicit packed types on pan_[un]pack 2025-01-10 18:27:27 +00:00
panvk_vX_cmd_desc_state.c panvk: Prepare cmd_prepare_shader_res_table() for multiDrawIndirect 2025-04-28 06:38:09 +00:00
panvk_vX_cmd_dispatch.c panvk: Isolate CS specific bits in panvk_shader 2025-04-10 13:17:53 +00:00
panvk_vX_cmd_draw.c panvk: Implement CmdBindVertexBuffers2() 2025-04-25 09:02:51 +02:00
panvk_vX_cmd_fb_preload.c panvk: Add v13 support 2025-04-15 13:36:07 +02:00
panvk_vX_cmd_meta.c panvk: Emit sample count and tile size when emitting framebuffer/tiler descriptors 2025-04-24 10:11:21 +00:00
panvk_vX_cmd_push_constant.c panvk: Prepare cmd_prepare_push_uniforms() for multiDrawIndirect 2025-04-28 06:38:09 +00:00
panvk_vX_descriptor_set.c panvk: Use multiple sampler planes and one texture descriptor per plane 2025-02-08 07:48:41 +00:00
panvk_vX_descriptor_set_layout.c vulkan/runtime: store flags on descriptor set layouts 2025-02-27 13:26:58 +02:00
panvk_vX_device.c panvk: Remove dependency on vk_device::drm_fd 2025-04-08 15:38:39 +00:00
panvk_vX_image_view.c panvk: Enable YCbCr support for v10+ 2025-02-08 07:48:41 +00:00
panvk_vX_nir_lower_descriptors.c panvk: reset dyn_bufs map count to 0 in create_copy_table 2025-04-22 17:33:02 +00:00
panvk_vX_precomp_cache.c panvk: Implement precomp dispatch 2025-02-11 12:33:23 +00:00
panvk_vX_query_pool.c panvk: no need to zero results on query reset 2025-01-14 05:43:46 +00:00
panvk_vX_sampler.c panvk: Use multiple sampler planes and one texture descriptor per plane 2025-02-08 07:48:41 +00:00
panvk_vX_shader.c panvk: Implement multiDrawIndirect for v10+ 2025-04-28 06:38:09 +00:00
panvk_wsi.c panvk: add basic driconf infrastructure 2025-03-31 09:24:04 +00:00
panvk_wsi.h panvk: Move panvk_wsi definitions to panvk_wsi.h 2024-03-27 09:47:34 +00:00