mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 05:00:09 +01:00
iris: Refactor modifier_is_supported for gen12
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5420>
This commit is contained in:
parent
c19492bcdb
commit
2305ab6938
1 changed files with 19 additions and 9 deletions
|
|
@ -73,7 +73,22 @@ static bool
|
||||||
modifier_is_supported(const struct gen_device_info *devinfo,
|
modifier_is_supported(const struct gen_device_info *devinfo,
|
||||||
enum pipe_format pfmt, uint64_t modifier)
|
enum pipe_format pfmt, uint64_t modifier)
|
||||||
{
|
{
|
||||||
/* XXX: do something real */
|
/* Check for basic device support. */
|
||||||
|
switch (modifier) {
|
||||||
|
case DRM_FORMAT_MOD_LINEAR:
|
||||||
|
case I915_FORMAT_MOD_X_TILED:
|
||||||
|
case I915_FORMAT_MOD_Y_TILED:
|
||||||
|
break;
|
||||||
|
case I915_FORMAT_MOD_Y_TILED_CCS:
|
||||||
|
if (devinfo->gen <= 8 || devinfo->gen >= 12)
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DRM_FORMAT_MOD_INVALID:
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check remaining requirements. */
|
||||||
switch (modifier) {
|
switch (modifier) {
|
||||||
case I915_FORMAT_MOD_Y_TILED_CCS: {
|
case I915_FORMAT_MOD_Y_TILED_CCS: {
|
||||||
if (unlikely(INTEL_DEBUG & DEBUG_NO_RBC))
|
if (unlikely(INTEL_DEBUG & DEBUG_NO_RBC))
|
||||||
|
|
@ -86,17 +101,12 @@ modifier_is_supported(const struct gen_device_info *devinfo,
|
||||||
if (rt_format == ISL_FORMAT_UNSUPPORTED ||
|
if (rt_format == ISL_FORMAT_UNSUPPORTED ||
|
||||||
!isl_format_supports_ccs_e(devinfo, rt_format))
|
!isl_format_supports_ccs_e(devinfo, rt_format))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return devinfo->gen >= 9 && devinfo->gen <= 11;
|
|
||||||
}
|
}
|
||||||
case I915_FORMAT_MOD_Y_TILED:
|
|
||||||
case I915_FORMAT_MOD_X_TILED:
|
|
||||||
case DRM_FORMAT_MOD_LINEAR:
|
|
||||||
return true;
|
|
||||||
case DRM_FORMAT_MOD_INVALID:
|
|
||||||
default:
|
default:
|
||||||
return false;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t
|
static uint64_t
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue