pvr: Move PBE START_POS into csb enum helpers header
This commit adds 'pvr_pbestate_source_pos()' and moves `enum pvr_pbe_source_start_pos` into pvr_csb_enum_helpers.h . The enum will be needed in other files in the commits following. 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/21386>
This commit is contained in:
@@ -91,6 +91,49 @@ pvr_pdsinst_doutu_sample_rate_from_rogue(enum rogue_msaa_mode msaa_mode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
PBESTATE
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
enum pvr_pbe_source_start_pos {
|
||||||
|
PVR_PBE_STARTPOS_BIT0,
|
||||||
|
PVR_PBE_STARTPOS_BIT32,
|
||||||
|
PVR_PBE_STARTPOS_BIT64,
|
||||||
|
PVR_PBE_STARTPOS_BIT96,
|
||||||
|
/* The below values are available if has_eight_output_registers feature is
|
||||||
|
* enabled.
|
||||||
|
*/
|
||||||
|
PVR_PBE_STARTPOS_BIT128,
|
||||||
|
PVR_PBE_STARTPOS_BIT160,
|
||||||
|
PVR_PBE_STARTPOS_BIT192,
|
||||||
|
PVR_PBE_STARTPOS_BIT224,
|
||||||
|
};
|
||||||
|
|
||||||
|
static inline enum ROGUE_PBESTATE_SOURCE_POS
|
||||||
|
pvr_pbestate_source_pos(enum pvr_pbe_source_start_pos pos)
|
||||||
|
{
|
||||||
|
switch (pos) {
|
||||||
|
case PVR_PBE_STARTPOS_BIT0:
|
||||||
|
case PVR_PBE_STARTPOS_BIT128:
|
||||||
|
return ROGUE_PBESTATE_SOURCE_POS_START_BIT0;
|
||||||
|
|
||||||
|
case PVR_PBE_STARTPOS_BIT32:
|
||||||
|
case PVR_PBE_STARTPOS_BIT160:
|
||||||
|
return ROGUE_PBESTATE_SOURCE_POS_START_BIT32;
|
||||||
|
|
||||||
|
case PVR_PBE_STARTPOS_BIT64:
|
||||||
|
case PVR_PBE_STARTPOS_BIT192:
|
||||||
|
return ROGUE_PBESTATE_SOURCE_POS_START_BIT64;
|
||||||
|
|
||||||
|
case PVR_PBE_STARTPOS_BIT96:
|
||||||
|
case PVR_PBE_STARTPOS_BIT224:
|
||||||
|
return ROGUE_PBESTATE_SOURCE_POS_START_BIT96;
|
||||||
|
|
||||||
|
default:
|
||||||
|
unreachable("Undefined PBE source pos.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
TA
|
TA
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include "hwdef/rogue_hw_defs.h"
|
#include "hwdef/rogue_hw_defs.h"
|
||||||
#include "hwdef/rogue_hw_utils.h"
|
#include "hwdef/rogue_hw_utils.h"
|
||||||
|
#include "pvr_csb_enum_helpers.h"
|
||||||
#include "pvr_device_info.h"
|
#include "pvr_device_info.h"
|
||||||
#include "pvr_job_common.h"
|
#include "pvr_job_common.h"
|
||||||
#include "pvr_private.h"
|
#include "pvr_private.h"
|
||||||
@@ -201,10 +202,13 @@ void pvr_pbe_pack_state(
|
|||||||
|
|
||||||
state.source_format = surface_params->source_format;
|
state.source_format = surface_params->source_format;
|
||||||
|
|
||||||
pvr_pbe_get_src_pos(dev_info,
|
state.source_pos = pvr_pbestate_source_pos(render_params->source_start);
|
||||||
render_params->source_start,
|
if (PVR_HAS_FEATURE(dev_info, eight_output_registers)) {
|
||||||
&state.source_pos,
|
state.source_pos_offset_128 = render_params->source_start >=
|
||||||
&state.source_pos_offset_128);
|
PVR_PBE_STARTPOS_BIT128;
|
||||||
|
} else {
|
||||||
|
assert(render_params->source_start < PVR_PBE_STARTPOS_BIT128);
|
||||||
|
}
|
||||||
|
|
||||||
/* MRT index (Use 0 for a single render target)/ */
|
/* MRT index (Use 0 for a single render target)/ */
|
||||||
state.mrt_index = render_params->mrt_index;
|
state.mrt_index = render_params->mrt_index;
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
#include <vulkan/vulkan.h>
|
#include <vulkan/vulkan.h>
|
||||||
|
|
||||||
#include "hwdef/rogue_hw_defs.h"
|
#include "hwdef/rogue_hw_defs.h"
|
||||||
|
#include "pvr_csb_enum_helpers.h"
|
||||||
#include "pvr_private.h"
|
#include "pvr_private.h"
|
||||||
#include "pvr_types.h"
|
#include "pvr_types.h"
|
||||||
|
|
||||||
@@ -41,20 +42,6 @@ enum pvr_pbe_gamma {
|
|||||||
PVR_PBE_GAMMA_ENABLED,
|
PVR_PBE_GAMMA_ENABLED,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum pvr_pbe_source_start_pos {
|
|
||||||
PVR_PBE_STARTPOS_BIT0,
|
|
||||||
PVR_PBE_STARTPOS_BIT32,
|
|
||||||
PVR_PBE_STARTPOS_BIT64,
|
|
||||||
PVR_PBE_STARTPOS_BIT96,
|
|
||||||
/* The below ones are available if has_eight_output_registers feature is
|
|
||||||
* enabled.
|
|
||||||
*/
|
|
||||||
PVR_PBE_STARTPOS_BIT128,
|
|
||||||
PVR_PBE_STARTPOS_BIT160,
|
|
||||||
PVR_PBE_STARTPOS_BIT192,
|
|
||||||
PVR_PBE_STARTPOS_BIT224,
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These are parameters specific to the surface being set up and hence can be
|
* These are parameters specific to the surface being set up and hence can be
|
||||||
* typically set up at surface creation time.
|
* typically set up at surface creation time.
|
||||||
|
Reference in New Issue
Block a user