#include "main/texcompress_astc.h"
#include "main/texcompress_bptc.h"
#include "main/texcompress_etc.h"
+#include "main/texcompress_s3tc.h"
#include "main/texgetimage.h"
#include "main/teximage.h"
#include "main/texobj.h"
return !st->has_etc1;
case MESA_FORMAT_LAYOUT_ETC2:
return !st->has_etc2;
+ case MESA_FORMAT_LAYOUT_S3TC:
+ return !st->has_s3tc;
case MESA_FORMAT_LAYOUT_BPTC:
return !st->has_bptc;
case MESA_FORMAT_LAYOUT_ASTC:
itransfer->temp_stride,
transfer->box.width, transfer->box.height,
texImage->TexFormat);
+ } else if (_mesa_is_format_s3tc(texImage->TexFormat)) {
+ _mesa_unpack_s3tc(map, transfer->stride,
+ itransfer->temp_data,
+ itransfer->temp_stride,
+ transfer->box.width, transfer->box.height,
+ texImage->TexFormat);
} else if (_mesa_is_format_bptc(texImage->TexFormat)) {
_mesa_unpack_bptc(map, transfer->stride,
itransfer->temp_data,
}
}
+ if (_mesa_is_format_s3tc(mesaFormat) && !st->has_s3tc) {
+ return _mesa_is_format_srgb(mesaFormat) ? PIPE_FORMAT_R8G8B8A8_SRGB :
+ PIPE_FORMAT_R8G8B8A8_UNORM;
+ }
+
if (_mesa_is_format_bptc(mesaFormat) && !st->has_bptc) {
switch (mesaFormat) {
case MESA_FORMAT_BPTC_RGB_SIGNED_FLOAT: