radv: hard code format features for emulated formats
The format features are known. No need to rely on radv_is_sampler_format_supported which will not work for ASTC. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25071>
This commit is contained in:
@@ -649,8 +649,13 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical
|
||||
return;
|
||||
}
|
||||
|
||||
if (desc->layout == UTIL_FORMAT_LAYOUT_ETC && !radv_device_supports_etc(physical_device) &&
|
||||
!physical_device->emulate_etc2) {
|
||||
if (desc->layout == UTIL_FORMAT_LAYOUT_ETC && !radv_device_supports_etc(physical_device)) {
|
||||
if (radv_is_format_emulated(physical_device, format)) {
|
||||
/* required features for compressed formats */
|
||||
tiled = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT | VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT |
|
||||
VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT | VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT |
|
||||
VK_FORMAT_FEATURE_2_BLIT_SRC_BIT;
|
||||
}
|
||||
out_properties->linearTilingFeatures = linear;
|
||||
out_properties->optimalTilingFeatures = tiled;
|
||||
out_properties->bufferFeatures = buffer;
|
||||
|
Reference in New Issue
Block a user