mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
radv/meta: add missing pipeline lookups
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33405>
This commit is contained in:
parent
662bcc8717
commit
5443c23983
3 changed files with 33 additions and 3 deletions
|
|
@ -217,6 +217,12 @@ get_pipeline(struct radv_device *device, const struct radv_image_view *src_iview
|
|||
if (src_image->vk.aspects == VK_IMAGE_ASPECT_COLOR_BIT)
|
||||
key.fs_key = radv_format_meta_fs_key(device, dst_image->vk.format);
|
||||
|
||||
VkPipeline pipeline_from_cache = vk_meta_lookup_pipeline(&device->meta_state.device, &key, sizeof(key));
|
||||
if (pipeline_from_cache != VK_NULL_HANDLE) {
|
||||
*pipeline_out = pipeline_from_cache;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
nir_shader *fs;
|
||||
nir_shader *vs = build_nir_vertex_shader(device);
|
||||
|
||||
|
|
|
|||
|
|
@ -511,6 +511,12 @@ get_color_pipeline(struct radv_device *device, enum blit2d_src_type src_type, Vk
|
|||
key.log2_samples = log2_samples;
|
||||
key.fs_key = radv_format_meta_fs_key(device, format);
|
||||
|
||||
VkPipeline pipeline_from_cache = vk_meta_lookup_pipeline(&device->meta_state.device, &key, sizeof(key));
|
||||
if (pipeline_from_cache != VK_NULL_HANDLE) {
|
||||
*pipeline_out = pipeline_from_cache;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
texel_fetch_build_func src_func;
|
||||
switch (src_type) {
|
||||
case BLIT2D_SRC_TYPE_IMAGE:
|
||||
|
|
@ -645,6 +651,12 @@ get_depth_only_pipeline(struct radv_device *device, enum blit2d_src_type src_typ
|
|||
key.src_type = src_type;
|
||||
key.log2_samples = log2_samples;
|
||||
|
||||
VkPipeline pipeline_from_cache = vk_meta_lookup_pipeline(&device->meta_state.device, &key, sizeof(key));
|
||||
if (pipeline_from_cache != VK_NULL_HANDLE) {
|
||||
*pipeline_out = pipeline_from_cache;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
texel_fetch_build_func src_func;
|
||||
switch (src_type) {
|
||||
case BLIT2D_SRC_TYPE_IMAGE:
|
||||
|
|
@ -797,6 +809,12 @@ get_stencil_only_pipeline(struct radv_device *device, enum blit2d_src_type src_t
|
|||
key.src_type = src_type;
|
||||
key.log2_samples = log2_samples;
|
||||
|
||||
VkPipeline pipeline_from_cache = vk_meta_lookup_pipeline(&device->meta_state.device, &key, sizeof(key));
|
||||
if (pipeline_from_cache != VK_NULL_HANDLE) {
|
||||
*pipeline_out = pipeline_from_cache;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
texel_fetch_build_func src_func;
|
||||
switch (src_type) {
|
||||
case BLIT2D_SRC_TYPE_IMAGE:
|
||||
|
|
|
|||
|
|
@ -40,13 +40,19 @@ get_pipeline(struct radv_device *device, unsigned fs_key, VkPipeline *pipeline_o
|
|||
struct radv_resolve_key key;
|
||||
VkResult result;
|
||||
|
||||
result = radv_meta_get_noop_pipeline_layout(device, layout_out);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
memset(&key, 0, sizeof(key));
|
||||
key.type = RADV_META_OBJECT_KEY_RESOLVE_HW;
|
||||
key.fs_key = fs_key;
|
||||
|
||||
result = radv_meta_get_noop_pipeline_layout(device, layout_out);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
VkPipeline pipeline_from_cache = vk_meta_lookup_pipeline(&device->meta_state.device, &key, sizeof(key));
|
||||
if (pipeline_from_cache != VK_NULL_HANDLE) {
|
||||
*pipeline_out = pipeline_from_cache;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
nir_shader *vs_module = radv_meta_build_nir_vs_generate_vertices(device);
|
||||
nir_shader *fs_module = build_nir_fs(device);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue