diff options
author | Jason Ekstrand <[email protected]> | 2016-04-15 17:05:24 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-04-21 20:44:27 -0700 |
commit | 65bd8317e2e5c0369987d0b2e535d427dd2c7a4f (patch) | |
tree | 3fa314965e1a980ca915e50b641ab35a21fe0476 /src/intel/isl/isl_storage_image.c | |
parent | 90576ac96303941ffefe50e56aad15ba09459aa8 (diff) |
isl: Add a helper for determining when a typed load/store can be used
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/intel/isl/isl_storage_image.c')
-rw-r--r-- | src/intel/isl/isl_storage_image.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/intel/isl/isl_storage_image.c b/src/intel/isl/isl_storage_image.c index 8d9bea3f954..590d2e48b05 100644 --- a/src/intel/isl/isl_storage_image.c +++ b/src/intel/isl/isl_storage_image.c @@ -187,6 +187,19 @@ isl_lower_storage_image_format(const struct brw_device_info *devinfo, } } +bool +isl_has_matching_typed_storage_image_format(const struct brw_device_info *devinfo, + enum isl_format fmt) +{ + if (devinfo->gen >= 9) { + return true; + } else if (devinfo->gen >= 8 || devinfo->is_haswell) { + return isl_format_get_layout(fmt)->bs <= 8; + } else { + return isl_format_get_layout(fmt)->bs <= 4; + } +} + static const struct brw_image_param image_param_defaults = { /* Set the swizzling shifts to all-ones to effectively disable * swizzling -- See emit_address_calculation() in |