diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index df9a7c0ab7f..84454666b1c 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -554,6 +554,9 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, return pscreen->get_driver_query_info && pscreen->get_driver_query_group_info && pscreen->get_driver_query_group_info(pscreen, 0, NULL) != 0; + case PIPE_CAP_TRANSCODE_ASTC_WORK_WELL: + return 1; + default: unreachable("bad PIPE_CAP_*"); } diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index 5d8c3b49da6..6557ef81663 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -441,6 +441,9 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_ASTC_VOID_EXTENTS_NEED_DENORM_FLUSH: return devinfo->ver == 9 && !intel_device_info_is_9lp(devinfo); + case PIPE_CAP_TRANSCODE_ASTC_WORK_WELL: + return !intel_device_info_is_mtl(devinfo); + default: return u_pipe_screen_get_param_defaults(pscreen, param); } diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 11328563a54..f2a65e8dae2 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -936,6 +936,7 @@ enum pipe_cap PIPE_CAP_VALIDATE_ALL_DIRTY_STATES, PIPE_CAP_HAS_CONST_BW, PIPE_CAP_PERFORMANCE_MONITOR, + PIPE_CAP_TRANSCODE_ASTC_WORK_WELL, PIPE_CAP_LAST, /* XXX do not add caps after PIPE_CAP_LAST! */ }; diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 81409737559..312ef930927 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -2241,7 +2241,8 @@ anv_physical_device_try_create(struct vk_instance *vk_instance, isl_format_supports_sampling(&device->info, ISL_FORMAT_ASTC_LDR_2D_4X4_FLT16); if (!device->has_astc_ldr && - driQueryOptionb(&device->instance->dri_options, "vk_require_astc")) + (driQueryOptionb(&device->instance->dri_options, "vk_require_astc") || + !intel_device_info_is_mtl(&devinfo))) device->emu_astc_ldr = true; if (devinfo.ver == 9 && !intel_device_info_is_9lp(&devinfo)) { device->flush_astc_ldr_void_extent_denorms = diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index ad0608c2d6f..c6ef942252f 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -546,7 +546,8 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe, screen->is_format_supported(screen, PIPE_FORMAT_DXT1_SRGBA, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW); - st->transcode_astc = options->transcode_astc && + st->transcode_astc = (options->transcode_astc || + screen->get_param(screen, PIPE_CAP_TRANSCODE_ASTC_WORK_WELL)) && screen->is_format_supported(screen, PIPE_FORMAT_DXT5_SRGBA, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW) && diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf index ba42e550260..907801a9146 100644 --- a/src/util/00-mesa-defaults.conf +++ b/src/util/00-mesa-defaults.conf @@ -1122,6 +1122,9 @@ TODO: document the other workarounds. + + @@ -1229,6 +1232,10 @@ TODO: document the other workarounds. + + +