diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 530ea2c61c8..ab7350e4248 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -584,6 +584,9 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe, st->has_astc_5x5_ldr = screen->is_format_supported(screen, PIPE_FORMAT_ASTC_5x5_SRGB, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW); + st->has_bptc = screen->is_format_supported(screen, PIPE_FORMAT_BPTC_SRGBA, + PIPE_TEXTURE_2D, 0, 0, + PIPE_BIND_SAMPLER_VIEW); st->force_persample_in_shader = screen->get_param(screen, PIPE_CAP_SAMPLE_SHADING) && !screen->get_param(screen, PIPE_CAP_FORCE_PERSAMPLE_INTERP); diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index cf3445d8e7c..7b79b2ffe9c 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -143,6 +143,7 @@ struct st_context boolean transcode_astc; boolean has_astc_2d_ldr; boolean has_astc_5x5_ldr; + boolean has_bptc; boolean prefer_blit_based_texture_transfer; boolean allow_compute_based_texture_transfer; boolean force_persample_in_shader; diff --git a/src/mesa/state_tracker/tests/st_format.c b/src/mesa/state_tracker/tests/st_format.c index 64e6bb1b33c..460a3052c84 100644 --- a/src/mesa/state_tracker/tests/st_format.c +++ b/src/mesa/state_tracker/tests/st_format.c @@ -60,6 +60,7 @@ int main(int argc, char **argv) .has_etc2 = true, .has_astc_2d_ldr = true, .has_astc_5x5_ldr = true, + .has_bptc = true, }; struct st_context *st = &local_st;