#include "pipe/p_compiler.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
enum util_format_dxtn {
UTIL_FORMAT_DXT1_RGB = 0x83F0,
void
util_format_dxt5_srgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j);
+#ifdef __cplusplus
+}
+#endif
#endif /* U_FORMAT_S3TC_H_ */
#include "util/u_format.h"
#include "util/u_inlines.h"
#include "util/u_cpu_detect.h"
+#include "util/u_format_s3tc.h"
#include "state_tracker/sw_winsys.h"
return FALSE;
}
+ if (format_desc->layout == UTIL_FORMAT_LAYOUT_BPTC ||
+ format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC) {
+ return FALSE;
+ }
+
+ if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC &&
+ format != PIPE_FORMAT_ETC1_RGB8) {
+ return FALSE;
+ }
+
+ if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
+ return util_format_s3tc_enabled;
+ }
+
return TRUE;
}
swr_fence_init(&screen->base);
+ util_format_s3tc_init();
+
return &screen->base;
}