mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-20 23:10:30 +01:00
intel/brw: Define ptl_register_blocks() helper.
Since this calculation will be needed in many places to set up the state of each shader stage. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
This commit is contained in:
parent
70fecb1483
commit
fb40b449cd
1 changed files with 11 additions and 0 deletions
|
|
@ -569,6 +569,17 @@ struct brw_stage_prog_data {
|
|||
u_printf_info *printf_info;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert a number of GRF registers used (grf_used in prog_data) into
|
||||
* a number of GRF register blocks supported by the hardware on PTL+.
|
||||
*/
|
||||
static inline unsigned
|
||||
ptl_register_blocks(unsigned grf_used)
|
||||
{
|
||||
const unsigned n = DIV_ROUND_UP(grf_used, 32) - 1;
|
||||
return (n < 6 ? n : 7);
|
||||
}
|
||||
|
||||
static inline uint32_t *
|
||||
brw_stage_prog_data_add_params(struct brw_stage_prog_data *prog_data,
|
||||
unsigned nr_new_params)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue