From e956f6ad305699a7ea2bedefc8c741d24140a2a0 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 21 Feb 2018 19:02:09 -0800 Subject: [PATCH] intel/isl: Allow Ys tiling Ys & Yf are both implemented in ISL now, we still have some Yf issues to investigate. Instead of disabling them in ISL, we disable them in the two drivers. Reviewed-by: Topi Pohjolainen Reviewed-by: Lionel Landwerlin Reviewed-by: Nanley Chery Part-of: --- src/gallium/drivers/iris/iris_resource.c | 4 ++++ src/intel/isl/isl_gfx7.c | 17 ++++++++--------- src/intel/vulkan/anv_image.c | 3 +++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 7bb5b21cb2a..71f299f9efb 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -731,6 +731,10 @@ iris_resource_configure_main(const struct iris_screen *screen, tiling_flags = ISL_TILING_ANY_MASK; } + /* We don't support Yf or Ys tiling yet */ + tiling_flags &= ~ISL_TILING_STD_Y_MASK; + assert(tiling_flags != 0); + isl_surf_usage_flags_t usage = 0; if (res->mod_info && !isl_drm_modifier_has_aux(modifier)) diff --git a/src/intel/isl/isl_gfx7.c b/src/intel/isl/isl_gfx7.c index 57de99ff32f..aeabbfd8752 100644 --- a/src/intel/isl/isl_gfx7.c +++ b/src/intel/isl/isl_gfx7.c @@ -225,13 +225,15 @@ isl_gfx6_filter_tiling(const struct isl_device *dev, ISL_TILING_Y0_BIT; } - /* And... clear the Yf and Ys bits anyway because Anvil doesn't support - * them yet. + /* TODO: Investigate Yf failures (~5000 VK CTS failures at the time of this + * writing). */ - *flags &= ~ISL_TILING_SKL_Yf_BIT; /* FINISHME[SKL]: Support Yf */ - *flags &= ~ISL_TILING_SKL_Ys_BIT; /* FINISHME[SKL]: Support Ys */ - *flags &= ~ISL_TILING_ICL_Yf_BIT; /* FINISHME[ICL]: Support Yf */ - *flags &= ~ISL_TILING_ICL_Ys_BIT; /* FINISHME[ICL]: Support Ys */ + if (isl_format_is_compressed(info->format) || + info->samples > 1 || + info->dim == ISL_SURF_DIM_3D) { + *flags &= ~ISL_TILING_SKL_Yf_BIT; /* FINISHME[SKL]: Support Yf */ + *flags &= ~ISL_TILING_ICL_Yf_BIT; /* FINISHME[ICL]: Support Yf */ + } if (isl_surf_usage_is_depth(info->usage)) { /* Depth requires Y. */ @@ -309,9 +311,6 @@ isl_gfx6_filter_tiling(const struct isl_device *dev, *flags &= (ISL_TILING_LINEAR_BIT | ISL_TILING_X_BIT | ISL_TILING_Y0_BIT); } else if (ISL_GFX_VER(dev) >= 9) { - /* Note we let Yf even though it was cleared above. This is just for - * completeness. - */ *flags &= (ISL_TILING_LINEAR_BIT | ISL_TILING_X_BIT | ISL_TILING_Y0_BIT | ISL_TILING_SKL_Yf_BIT | ISL_TILING_ICL_Yf_BIT); diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 3d36e478188..085dab85d0b 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -307,6 +307,9 @@ choose_isl_tiling_flags(const struct intel_device_info *devinfo, flags &= legacy_mask; } + /* We don't support Yf or Ys tiling yet */ + flags &= ~ISL_TILING_STD_Y_MASK; + assert(flags); return flags;