Mesa (master): intel/blorp/gen4: Drop cube map flag for single face copy
Topi Pohjolainen
tpohjola at kemper.freedesktop.org
Tue Jul 18 19:27:32 UTC 2017
Module: Mesa
Branch: master
Commit: 0926fb69a4bb81f2c95c1d6acd43887a442d33f5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0926fb69a4bb81f2c95c1d6acd43887a442d33f5
Author: Topi Pohjolainen <topi.pohjolainen at intel.com>
Date: Fri Jul 7 11:33:12 2017 +0300
intel/blorp/gen4: Drop cube map flag for single face copy
This will falsely trigger an assert on number of layers once
isl is used for 3D layouts of Gen4 cube maps.
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/intel/blorp/blorp_blit.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index 0850473eba..973e3ef430 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -1420,6 +1420,12 @@ blorp_surf_convert_to_single_slice(const struct isl_device *isl_dev,
uint32_t tile_x_px, tile_y_px;
surf_get_intratile_offset_px(info, &tile_x_px, &tile_y_px);
+ /* Even for cube maps there will be only single face, therefore drop the
+ * corresponding flag if present.
+ */
+ const isl_surf_usage_flags_t without_cube_map_flag =
+ info->surf.usage & (~ISL_SURF_USAGE_CUBE_BIT);
+
struct isl_surf_init_info init_info = {
.dim = ISL_SURF_DIM_2D,
.format = info->surf.format,
@@ -1430,7 +1436,7 @@ blorp_surf_convert_to_single_slice(const struct isl_device *isl_dev,
.array_len = 1,
.samples = info->surf.samples,
.row_pitch = info->surf.row_pitch,
- .usage = info->surf.usage,
+ .usage = without_cube_map_flag,
.tiling_flags = 1 << info->surf.tiling,
};
More information about the mesa-commit
mailing list