intel/aux_map: add helper to compute offset in aux data
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26822>
This commit is contained in:

committed by
Marge Bot

parent
c0889a127b
commit
bd197c6bcf
@@ -248,6 +248,13 @@ intel_aux_get_main_to_aux_ratio(struct intel_aux_map_context *ctx)
|
||||
return ctx->format->main_to_aux_ratio;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
intel_aux_main_to_aux_offset(struct intel_aux_map_context *ctx,
|
||||
uint64_t main_offset)
|
||||
{
|
||||
return main_offset / ctx->format->main_to_aux_ratio;
|
||||
}
|
||||
|
||||
static const struct aux_format_info *
|
||||
get_format(enum intel_aux_map_format format)
|
||||
{
|
||||
|
@@ -84,6 +84,14 @@ intel_aux_get_meta_address_mask(struct intel_aux_map_context *ctx);
|
||||
uint64_t
|
||||
intel_aux_get_main_to_aux_ratio(struct intel_aux_map_context *ctx);
|
||||
|
||||
/**
|
||||
* Takes a relative offset in the main surface and returns a relative offset
|
||||
* in the aux surface that maps to the main offset.
|
||||
*/
|
||||
uint64_t
|
||||
intel_aux_main_to_aux_offset(struct intel_aux_map_context *ctx,
|
||||
uint64_t main_offset);
|
||||
|
||||
/**
|
||||
* Fill an array of exec_object2 with aux-map buffer handles
|
||||
*
|
||||
|
Reference in New Issue
Block a user