mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-16 04:00:33 +01:00
panvk: Add a version of fb_preload which takes the new structs
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Acked-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39759>
This commit is contained in:
parent
951cce705c
commit
dca1c1b5b4
4 changed files with 43 additions and 7 deletions
|
|
@ -1256,7 +1256,7 @@ prepare_incremental_rendering_fbinfos(
|
|||
|
||||
/* Middle and last shaders have a different preload */
|
||||
struct pan_fb_frame_shaders fs;
|
||||
VkResult result = panvk_per_arch(cmd_fb_preload)(
|
||||
VkResult result = panvk_per_arch(cmd_fb_preload_fbinfo)(
|
||||
cmdbuf, &ir_fbinfos[PANVK_IR_MIDDLE_PASS], &fs);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
|
@ -1333,7 +1333,8 @@ get_fb_descs(struct panvk_cmd_buffer *cmdbuf)
|
|||
fbinfo->first_provoking_vertex = get_first_provoking_vertex(cmdbuf);
|
||||
|
||||
struct pan_fb_frame_shaders fs;
|
||||
VkResult result = panvk_per_arch(cmd_fb_preload)(cmdbuf, fbinfo, &fs);
|
||||
VkResult result = panvk_per_arch(cmd_fb_preload_fbinfo)(cmdbuf,
|
||||
fbinfo, &fs);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,8 @@ panvk_per_arch(cmd_close_batch)(struct panvk_cmd_buffer *cmdbuf)
|
|||
cmdbuf->state.gfx.render.first_provoking_vertex != U_TRISTATE_NO;
|
||||
|
||||
struct pan_fb_frame_shaders fs;
|
||||
VkResult result = panvk_per_arch(cmd_fb_preload)(cmdbuf, fbinfo, &fs);
|
||||
VkResult result = panvk_per_arch(cmd_fb_preload_fbinfo)(cmdbuf,
|
||||
fbinfo, &fs);
|
||||
if (result != VK_SUCCESS)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,14 @@
|
|||
#include "pan_desc.h"
|
||||
#include "pan_fb.h"
|
||||
|
||||
VkResult
|
||||
panvk_per_arch(cmd_fb_preload_fbinfo)(struct panvk_cmd_buffer *cmdbuf,
|
||||
const struct pan_fb_info *fbinfo,
|
||||
struct pan_fb_frame_shaders *fs_out);
|
||||
|
||||
VkResult panvk_per_arch(cmd_fb_preload)(struct panvk_cmd_buffer *cmdbuf,
|
||||
const struct pan_fb_info *fbinfo,
|
||||
const struct pan_fb_layout *fb,
|
||||
const struct pan_fb_load *load,
|
||||
struct pan_fb_frame_shaders *fs_out);
|
||||
|
||||
static inline struct pan_fb_bifrost_info
|
||||
|
|
|
|||
|
|
@ -827,9 +827,9 @@ cmd_preload_color_attachments(struct panvk_cmd_buffer *cmdbuf,
|
|||
}
|
||||
|
||||
VkResult
|
||||
panvk_per_arch(cmd_fb_preload)(struct panvk_cmd_buffer *cmdbuf,
|
||||
const struct pan_fb_info *fbinfo,
|
||||
struct pan_fb_frame_shaders *fs_out)
|
||||
panvk_per_arch(cmd_fb_preload_fbinfo)(struct panvk_cmd_buffer *cmdbuf,
|
||||
const struct pan_fb_info *fbinfo,
|
||||
struct pan_fb_frame_shaders *fs_out)
|
||||
{
|
||||
*fs_out = (struct pan_fb_frame_shaders) { .dcd_pointer = 0 };
|
||||
struct mali_draw_packed *dcds = NULL;
|
||||
|
|
@ -841,3 +841,31 @@ panvk_per_arch(cmd_fb_preload)(struct panvk_cmd_buffer *cmdbuf,
|
|||
|
||||
return cmd_preload_zs_attachments(cmdbuf, fbinfo, fs_out, &dcds);
|
||||
}
|
||||
|
||||
VkResult
|
||||
panvk_per_arch(cmd_fb_preload)(struct panvk_cmd_buffer *cmdbuf,
|
||||
const struct pan_fb_layout *fb,
|
||||
const struct pan_fb_load *load,
|
||||
struct pan_fb_frame_shaders *fs_out)
|
||||
{
|
||||
/* We only really care about the formats here */
|
||||
struct pan_fb_store store = { };
|
||||
for (unsigned rt = 0; rt < PAN_MAX_RTS; rt++) {
|
||||
if (load->rts[rt].iview)
|
||||
store.rts[rt] = pan_fb_store_iview(load->rts[rt].iview);
|
||||
}
|
||||
if (load->z.iview)
|
||||
store.zs = pan_fb_store_iview(load->z.iview);
|
||||
if (load->s.iview)
|
||||
store.s = pan_fb_store_iview(load->s.iview);
|
||||
|
||||
struct pan_fb_desc_info fbd_info = {
|
||||
.fb = fb,
|
||||
.load = load,
|
||||
.store = &store,
|
||||
};
|
||||
struct pan_fb_info fbinfo;
|
||||
GENX(pan_fill_fb_info)(&fbd_info, &fbinfo);
|
||||
|
||||
return panvk_per_arch(cmd_fb_preload_fbinfo)(cmdbuf, &fbinfo, fs_out);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue