return PAN_FORMAT_NATIVE;
}
+/* Convenience method */
+
+static enum pan_format_class
+pan_format_class(const struct util_format_description *desc, unsigned quirks, bool is_store)
+{
+ if (is_store)
+ return pan_format_class_store(desc, quirks);
+ else
+ return pan_format_class_load(desc, quirks);
+}
+
/* Software packs/unpacks, by format class. Packs take in the pixel value typed
* as `pan_unpacked_type_for_format` of the format and return an i32vec4
* suitable for storing (with components replicated to fill). Unpacks do the
if (!(is_load || is_store))
continue;
+ enum pan_format_class fmt_class =
+ pan_format_class(desc, quirks, is_store);
+
+ /* Don't lower */
+ if (fmt_class == PAN_FORMAT_NATIVE)
+ continue;
+
/* Don't worry about MRT */
nir_variable *var = nir_intrinsic_get_var(intr, 0);