mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 02:50:09 +01:00
intel/blorp: Internally expose surf_convert_to_uncompressed
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
parent
1e5fd2f839
commit
f395d0abc8
2 changed files with 21 additions and 13 deletions
|
|
@ -2325,8 +2325,8 @@ bitcast_color_value_to_uint(union isl_color_value color,
|
||||||
return bits;
|
return bits;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
surf_convert_to_uncompressed(const struct isl_device *isl_dev,
|
blorp_surf_convert_to_uncompressed(const struct isl_device *isl_dev,
|
||||||
struct brw_blorp_surface_info *info,
|
struct brw_blorp_surface_info *info,
|
||||||
uint32_t *x, uint32_t *y,
|
uint32_t *x, uint32_t *y,
|
||||||
uint32_t *width, uint32_t *height)
|
uint32_t *width, uint32_t *height)
|
||||||
|
|
@ -2356,10 +2356,12 @@ surf_convert_to_uncompressed(const struct isl_device *isl_dev,
|
||||||
*height = DIV_ROUND_UP(*height, fmtl->bh);
|
*height = DIV_ROUND_UP(*height, fmtl->bh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (x || y) {
|
||||||
assert(*x % fmtl->bw == 0);
|
assert(*x % fmtl->bw == 0);
|
||||||
assert(*y % fmtl->bh == 0);
|
assert(*y % fmtl->bh == 0);
|
||||||
*x /= fmtl->bw;
|
*x /= fmtl->bw;
|
||||||
*y /= fmtl->bh;
|
*y /= fmtl->bh;
|
||||||
|
}
|
||||||
|
|
||||||
info->surf.logical_level0_px.width =
|
info->surf.logical_level0_px.width =
|
||||||
DIV_ROUND_UP(info->surf.logical_level0_px.width, fmtl->bw);
|
DIV_ROUND_UP(info->surf.logical_level0_px.width, fmtl->bw);
|
||||||
|
|
@ -2477,13 +2479,14 @@ blorp_copy(struct blorp_batch *batch,
|
||||||
isl_format_get_layout(params.dst.view.format)->channels.r.bits;
|
isl_format_get_layout(params.dst.view.format)->channels.r.bits;
|
||||||
|
|
||||||
if (src_fmtl->bw > 1 || src_fmtl->bh > 1) {
|
if (src_fmtl->bw > 1 || src_fmtl->bh > 1) {
|
||||||
surf_convert_to_uncompressed(batch->blorp->isl_dev, ¶ms.src,
|
blorp_surf_convert_to_uncompressed(batch->blorp->isl_dev, ¶ms.src,
|
||||||
&src_x, &src_y, &src_width, &src_height);
|
&src_x, &src_y,
|
||||||
|
&src_width, &src_height);
|
||||||
wm_prog_key.need_src_offset = true;
|
wm_prog_key.need_src_offset = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dst_fmtl->bw > 1 || dst_fmtl->bh > 1) {
|
if (dst_fmtl->bw > 1 || dst_fmtl->bh > 1) {
|
||||||
surf_convert_to_uncompressed(batch->blorp->isl_dev, ¶ms.dst,
|
blorp_surf_convert_to_uncompressed(batch->blorp->isl_dev, ¶ms.dst,
|
||||||
&dst_x, &dst_y, NULL, NULL);
|
&dst_x, &dst_y, NULL, NULL);
|
||||||
wm_prog_key.need_dst_offset = true;
|
wm_prog_key.need_dst_offset = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,11 @@ brw_blorp_surface_info_init(struct blorp_context *blorp,
|
||||||
void
|
void
|
||||||
blorp_surf_convert_to_single_slice(const struct isl_device *isl_dev,
|
blorp_surf_convert_to_single_slice(const struct isl_device *isl_dev,
|
||||||
struct brw_blorp_surface_info *info);
|
struct brw_blorp_surface_info *info);
|
||||||
|
void
|
||||||
|
blorp_surf_convert_to_uncompressed(const struct isl_device *isl_dev,
|
||||||
|
struct brw_blorp_surface_info *info,
|
||||||
|
uint32_t *x, uint32_t *y,
|
||||||
|
uint32_t *width, uint32_t *height);
|
||||||
|
|
||||||
|
|
||||||
struct brw_blorp_coord_transform
|
struct brw_blorp_coord_transform
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue