[Mesa-dev] [PATCH] isl: Validate row pitch of stencil surfaces.

Kenneth Graunke kenneth at whitecape.org
Wed Aug 9 20:09:06 UTC 2017


Also, silence an obnoxious finishme that started occurring for all
GL applications which use stencil after the i965 ISL conversion.
---
 src/intel/isl/isl.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index 6b4203d79d2..c35116214c8 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -1367,8 +1367,10 @@ isl_calc_row_pitch(const struct isl_device *dev,
        !pitch_in_range(row_pitch, _3DSTATE_HIER_DEPTH_BUFFER_SurfacePitch_bits(dev->info)))
       return false;
 
-   if (surf_info->usage & ISL_SURF_USAGE_STENCIL_BIT)
-      isl_finishme("validate row pitch of stencil surfaces");
+   if (dev->use_separate_stencil &&
+       (surf_info->usage & ISL_SURF_USAGE_STENCIL_BIT) &&
+       !pitch_in_range(row_pitch, _3DSTATE_STENCIL_BUFFER_SurfacePitch_bits(dev->info)))
+      return false;
 
  done:
    *out_row_pitch = row_pitch;
-- 
2.14.0



More information about the mesa-dev mailing list