Enabling this debug switch causes surface shrinking to happen by
default, and lowers the surface size limit which causes blorp blits to
be split.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
#define FILE_DEBUG_FLAG DEBUG_BLORP
+static const bool split_blorp_blit_debug = false;
+
/**
* Enum to specify the order of arguments in a sampler message
*/
}
static unsigned
-get_max_surface_size()
+get_max_surface_size(const struct gen_device_info *devinfo,
+ const struct blorp_params *params)
{
- return 16384;
+ if (split_blorp_blit_debug && can_shrink_surfaces(params))
+ return 16384 >> 4; /* A smaller restriction when debug is enabled */
+ else
+ return 16384;
}
struct blt_axis {
y_scale = -y_scale;
bool x_done, y_done;
- bool shrink = false;
+ bool shrink = split_blorp_blit_debug && can_shrink_surfaces(orig_params);
do {
params = *orig_params;
blit_coords = split_coords;