freedreno/a6xx: fix hang with large render target
[mesa.git] / src / gallium / drivers / freedreno / a6xx / fd6_gmem.c
index 236151e01a7a8498ad8c7cefb0b7e4437cb8bc7d..eb4cbbf52df5d80cdf10d2818df8a1f53dff247f 100644 (file)
@@ -254,7 +254,8 @@ use_hw_binning(struct fd_batch *batch)
 {
        const struct fd_gmem_stateobj *gmem = batch->gmem_state;
 
-       // TODO figure out hw limits for binning
+       if ((gmem->maxpw * gmem->maxph) > 32)
+               return false;
 
        return fd_binning_enabled && ((gmem->nbins_x * gmem->nbins_y) >= 2) &&
                        (batch->num_draws > 0);