mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 18:50:10 +01:00
isl: Add a helper for determining when a typed load/store can be used
Reviewed-by: Chad Versace <chad.versace@intel.com>
This commit is contained in:
parent
90576ac963
commit
65bd8317e2
2 changed files with 20 additions and 0 deletions
|
|
@ -903,6 +903,13 @@ enum isl_format
|
|||
isl_lower_storage_image_format(const struct brw_device_info *devinfo,
|
||||
enum isl_format fmt);
|
||||
|
||||
/* Returns true if this hardware supports typed load/store on a format with
|
||||
* the same size as the given format.
|
||||
*/
|
||||
bool
|
||||
isl_has_matching_typed_storage_image_format(const struct brw_device_info *devinfo,
|
||||
enum isl_format fmt);
|
||||
|
||||
static inline bool
|
||||
isl_tiling_is_any_y(enum isl_tiling tiling)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue