Mesa (master): intel/blorp_blit: Add split_blorp_blit_debug switch

Jordan Justen jljusten at kemper.freedesktop.org
Wed Dec 7 17:35:40 UTC 2016


Module: Mesa
Branch: master
Commit: d6526d724765e14fc9bb25cd2a53463a4d1c5fff
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d6526d724765e14fc9bb25cd2a53463a4d1c5fff

Author: Jordan Justen <jordan.l.justen at intel.com>
Date:   Tue Nov 22 17:20:42 2016 -0800

intel/blorp_blit: Add split_blorp_blit_debug switch

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 at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/intel/blorp/blorp_blit.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index 280d6e1..8abe3a8 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -28,6 +28,8 @@
 
 #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
  */
@@ -1517,9 +1519,13 @@ can_shrink_surfaces(const struct blorp_params *params)
 }
 
 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 {
@@ -1940,7 +1946,7 @@ do_blorp_blit(struct blorp_batch *batch,
       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;




More information about the mesa-commit mailing list