intel/isl: Set null surface format to R32_UINT
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 4 Oct 2019 10:12:44 +0000 (13:12 +0300)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sat, 5 Oct 2019 20:54:33 +0000 (20:54 +0000)
It appears we never had a test in piglit or deqp sampling from a null
surface...

It turns out this triggers a hang on IVB only. Updating the null
surface format to R32_UINT fixes the hang on ivb and doesn't affect
other platforms, so set it by default for all platforms.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1872
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/isl/isl_surface_state.c

index d942d7362903d5943537780ab728a07a21cc4632..30c98945c3f16466c7e705eecb5698172afce28f 100644 (file)
@@ -789,7 +789,12 @@ isl_genX(null_fill_state)(void *state, struct isl_extent3d size)
 {
    struct GENX(RENDER_SURFACE_STATE) s = {
       .SurfaceType = SURFTYPE_NULL,
-      .SurfaceFormat = ISL_FORMAT_B8G8R8A8_UNORM,
+      /* We previously had this format set to B8G8R8A8_UNORM but ran into
+       * hangs on IVB. R32_UINT seems to work for everybody.
+       *
+       * https://gitlab.freedesktop.org/mesa/mesa/issues/1872
+       */
+      .SurfaceFormat = ISL_FORMAT_R32_UINT,
 #if GEN_GEN >= 7
       .SurfaceArray = size.depth > 0,
 #endif