From 14d7c16e50f88720fa27722522d4ff89972a4f9d Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 6 Jun 2016 18:21:17 -0700 Subject: [PATCH] isl/state: Only set cube face enables if usage includes CUBE_BIT It seems safe to set it all the time, but this reduces the diff between the way i965 does it and what ISL does. Reviewed-by: Chad Versace Cc: "12.0" --- src/intel/isl/isl_surface_state.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index b2ab46b9e08..5e512ac0c4a 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -330,16 +330,18 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state, s.RenderCacheReadWriteMode = 0; #endif + if (info->view->usage & ISL_SURF_USAGE_CUBE_BIT) { #if GEN_GEN >= 8 - s.CubeFaceEnablePositiveZ = 1; - s.CubeFaceEnableNegativeZ = 1; - s.CubeFaceEnablePositiveY = 1; - s.CubeFaceEnableNegativeY = 1; - s.CubeFaceEnablePositiveX = 1; - s.CubeFaceEnableNegativeX = 1; + s.CubeFaceEnablePositiveZ = 1; + s.CubeFaceEnableNegativeZ = 1; + s.CubeFaceEnablePositiveY = 1; + s.CubeFaceEnableNegativeY = 1; + s.CubeFaceEnablePositiveX = 1; + s.CubeFaceEnableNegativeX = 1; #else - s.CubeFaceEnables = 0x3f; + s.CubeFaceEnables = 0x3f; #endif + } s.MultisampledSurfaceStorageFormat = isl_to_gen_multisample_layout[info->surf->msaa_layout]; -- 2.30.2