screen->is_format_supported(screen, PIPE_FORMAT_DXT1_SRGBA,
PIPE_TEXTURE_2D, 0, 0,
PIPE_BIND_SAMPLER_VIEW);
- st->transcode_astc = options->transcode_astc &&
- screen->is_format_supported(screen, PIPE_FORMAT_DXT5_SRGBA,
- PIPE_TEXTURE_2D, 0, 0,
- PIPE_BIND_SAMPLER_VIEW) &&
- screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
- PIPE_TEXTURE_2D, 0, 0,
- PIPE_BIND_SAMPLER_VIEW);
+ st->transcode_astc_to_bptc = options->transcode_astc &&
+ screen->is_format_supported(screen, PIPE_FORMAT_BPTC_SRGBA,
+ PIPE_TEXTURE_2D, 0, 0,
+ PIPE_BIND_SAMPLER_VIEW) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_BPTC_RGBA_UNORM,
+ PIPE_TEXTURE_2D, 0, 0,
+ PIPE_BIND_SAMPLER_VIEW);
+ st->transcode_astc_to_dxt5 = options->transcode_astc &&
+ screen->is_format_supported(screen, PIPE_FORMAT_DXT5_SRGBA,
+ PIPE_TEXTURE_2D, 0, 0,
+ PIPE_BIND_SAMPLER_VIEW) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
+ PIPE_TEXTURE_2D, 0, 0,
+ PIPE_BIND_SAMPLER_VIEW);
st->has_astc_2d_ldr =
screen->is_format_supported(screen, PIPE_FORMAT_ASTC_4x4_SRGB,
PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW);
boolean has_etc1;
boolean has_etc2;
boolean transcode_etc;
- boolean transcode_astc;
+ boolean transcode_astc_to_bptc;
+ boolean transcode_astc_to_dxt5;
boolean has_astc_2d_ldr;
boolean has_astc_5x5_ldr;
boolean prefer_blit_based_texture_transfer;
if (st_astc_format_fallback(st, mesaFormat)) {
if (_mesa_is_format_srgb(mesaFormat)) {
- return st->transcode_astc ? PIPE_FORMAT_DXT5_SRGBA :
- PIPE_FORMAT_R8G8B8A8_SRGB;
+ if (st->transcode_astc_to_bptc)
+ return PIPE_FORMAT_BPTC_SRGBA;
+ else if (st->transcode_astc_to_dxt5)
+ return PIPE_FORMAT_DXT5_SRGBA;
+ else
+ return PIPE_FORMAT_R8G8B8A8_SRGB;
} else {
- return st->transcode_astc ? PIPE_FORMAT_DXT5_RGBA :
- PIPE_FORMAT_R8G8B8A8_UNORM;
+ if (st->transcode_astc_to_bptc)
+ return PIPE_FORMAT_BPTC_RGBA_UNORM;
+ else if (st->transcode_astc_to_dxt5)
+ return PIPE_FORMAT_DXT5_RGBA;
+ else
+ return PIPE_FORMAT_R8G8B8A8_UNORM;
}
}