pvr: Set SPMSCRATCHBUFFER flag.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21102>
This commit is contained in:
@@ -1203,6 +1203,16 @@ static VkResult pvr_sub_cmd_gfx_job_init(const struct pvr_device_info *dev_info,
|
||||
job->run_frag = true;
|
||||
job->geometry_terminate = true;
|
||||
|
||||
/* TODO: In some cases a PR can be removed by storing to the color attachment
|
||||
* and have the background object load directly from it instead of using the
|
||||
* scratch buffer. In those cases we can also set this to "false" and avoid
|
||||
* extra fw overhead.
|
||||
*/
|
||||
/* The scratch buffer is always needed and allocated to avoid data loss in
|
||||
* case SPM is hit so set the flag unconditionally.
|
||||
*/
|
||||
job->requires_spm_scratch_buffer = true;
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -1679,6 +1679,9 @@ static void pvr_frag_state_flags_init(const struct pvr_render_job *const job,
|
||||
|
||||
if (job->get_vis_results)
|
||||
*flags |= PVR_WINSYS_FRAG_FLAG_GET_VIS_RESULTS;
|
||||
|
||||
if (job->requires_spm_scratch_buffer)
|
||||
*flags |= PVR_WINSYS_FRAG_FLAG_SPMSCRATCHBUFFER;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -45,15 +45,18 @@ struct vk_sync;
|
||||
struct pvr_render_job {
|
||||
struct pvr_rt_dataset *rt_dataset;
|
||||
|
||||
bool run_frag;
|
||||
bool geometry_terminate;
|
||||
bool frag_uses_atomic_ops;
|
||||
bool disable_compute_overlap;
|
||||
bool enable_bg_tag;
|
||||
bool process_empty_tiles;
|
||||
bool get_vis_results;
|
||||
bool has_depth_attachment;
|
||||
bool has_stencil_attachment;
|
||||
struct {
|
||||
bool run_frag : 1;
|
||||
bool geometry_terminate : 1;
|
||||
bool frag_uses_atomic_ops : 1;
|
||||
bool disable_compute_overlap : 1;
|
||||
bool enable_bg_tag : 1;
|
||||
bool process_empty_tiles : 1;
|
||||
bool get_vis_results : 1;
|
||||
bool has_depth_attachment : 1;
|
||||
bool has_stencil_attachment : 1;
|
||||
bool requires_spm_scratch_buffer : 1;
|
||||
};
|
||||
|
||||
uint32_t pds_pixel_event_data_offset;
|
||||
|
||||
|
||||
@@ -339,6 +339,7 @@ struct pvr_winsys_compute_submit_info {
|
||||
#define PVR_WINSYS_FRAG_FLAG_PREVENT_CDM_OVERLAP BITFIELD_BIT(2U)
|
||||
#define PVR_WINSYS_FRAG_FLAG_SINGLE_CORE BITFIELD_BIT(3U)
|
||||
#define PVR_WINSYS_FRAG_FLAG_GET_VIS_RESULTS BITFIELD_BIT(4U)
|
||||
#define PVR_WINSYS_FRAG_FLAG_SPMSCRATCHBUFFER (5U)
|
||||
|
||||
struct pvr_winsys_render_submit_info {
|
||||
struct pvr_winsys_rt_dataset *rt_dataset;
|
||||
|
||||
@@ -662,6 +662,9 @@ static void pvr_srv_fragment_cmd_init(
|
||||
|
||||
if (state->flags & PVR_WINSYS_FRAG_FLAG_GET_VIS_RESULTS)
|
||||
cmd->flags |= ROGUE_FWIF_RENDERFLAGS_GETVISRESULTS;
|
||||
|
||||
if (state->flags & PVR_WINSYS_FRAG_FLAG_SPMSCRATCHBUFFER)
|
||||
cmd->flags |= ROGUE_FWIF_RENDERFLAGS_SPMSCRATCHBUFFER;
|
||||
}
|
||||
|
||||
VkResult pvr_srv_winsys_render_submit(
|
||||
|
||||
Reference in New Issue
Block a user