From 77d2197c185316a735c5994e4fe53d18598cd252 Mon Sep 17 00:00:00 2001 From: Sagar Ghuge Date: Mon, 13 Oct 2025 11:24:19 -0700 Subject: [PATCH] Revert "intel: Always set Cube Face Enables for all surfaces." This reverts commit bf15dc7a1bb6bcb33bac88705725a8e8c3207bb0. All credit goes to Lionel, he spotted this difference. How much effort went in for this god knows. Closes: #12348 #12816 #12446 #12387 #12827 Related #12847 #12520 Cc: mesa-stable Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/isl/isl_surface_state.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index 6c524aaa59a..8abfd1be178 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -560,12 +560,24 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state, s.EnableUnormPathInColorPipe = true; #endif - s.CubeFaceEnablePositiveZ = 1; - s.CubeFaceEnableNegativeZ = 1; - s.CubeFaceEnablePositiveY = 1; - s.CubeFaceEnableNegativeY = 1; - s.CubeFaceEnablePositiveX = 1; - s.CubeFaceEnableNegativeX = 1; + /* + * Bspec 57023, RENDER_SURFACE_STATE, bit fields CubeFaceEnable* + * states that: + * + * This field must be programmed to 1h (enabled) whenever Surface Type is + * programmed to SURFTYPE_CUBE + * + * This used to work fine for non-cube surfaces on older hardware but on + * Xe2+, looks like this restriction is pretty strict. + */ + if (info->view->usage & ISL_SURF_USAGE_CUBE_BIT) { + s.CubeFaceEnablePositiveZ = 1; + s.CubeFaceEnableNegativeZ = 1; + s.CubeFaceEnablePositiveY = 1; + s.CubeFaceEnableNegativeY = 1; + s.CubeFaceEnablePositiveX = 1; + s.CubeFaceEnableNegativeX = 1; + } #if GFX_VER >= 6 /* From the Broadwell PRM for "Number of Multisamples":