[Mesa-dev] [PATCH 2/2] isl: apply RENDER_SURFACE_STATE::Shader Channel assertions to gen>=8

Juan A. Suarez Romero jasuarez at igalia.com
Wed Feb 8 12:31:55 UTC 2017


We are applying several assertions to RENDER_SURFACE_STATE's shader
channels selection to gen>=8 and haswell devices.

But this assertions are not listed in Haswell PRMs.

Signed-off-by: Juan A. Suarez Romero <jasuarez at igalia.com>
---
 src/intel/isl/isl_surface_state.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index 29ec289..fd683e4 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -452,7 +452,7 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
 #endif
 #endif
 
-#if (GEN_GEN >= 8 || GEN_IS_HASWELL)
+#if GEN_GEN >= 8
    if (info->view->usage & ISL_SURF_USAGE_RENDER_TARGET_BIT) {
       /* From the Sky Lake PRM Vol. 2d,
        * RENDER_SURFACE_STATE::Shader Channel Select Red
@@ -485,6 +485,9 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
        */
       assert(info->view->swizzle.a == ISL_CHANNEL_SELECT_ALPHA);
    }
+#endif
+
+#if (GEN_GEN >= 8 || GEN_IS_HASWELL)
    s.ShaderChannelSelectRed = info->view->swizzle.r;
    s.ShaderChannelSelectGreen = info->view->swizzle.g;
    s.ShaderChannelSelectBlue = info->view->swizzle.b;
-- 
2.9.3



More information about the mesa-dev mailing list