OSDN Git Service

intel/isl: Allow valign2 for texture-only Y-tiled surfaces on gen7
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 9 Sep 2016 15:57:14 +0000 (08:57 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 13 Sep 2016 02:44:05 +0000 (19:44 -0700)
The restriction that Y-tiled surfaces must have valign == 4 only aplies to
render targets but we were applying it universally.  This causes problems
if ISL_FORMAT_R32G32B32_FLOAT is used because it requires valign == 2; this
should be okay because you can't render to that format.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/intel/isl/isl_gen7.c

index 02273f8..f3d8428 100644 (file)
@@ -354,7 +354,8 @@ gen7_choose_valign_el(const struct isl_device *dev,
     */
    if (isl_surf_usage_is_depth(info->usage) ||
        info->samples > 1 ||
-       tiling == ISL_TILING_Y0) {
+       ((info->usage & ISL_SURF_USAGE_RENDER_TARGET_BIT) &&
+        tiling == ISL_TILING_Y0)) {
       require_valign4 = true;
    }