hk: disable mods on funny float formats

Honeykrisp version of b78a691ce2 ("nil,nvk: Disable modifiers for
B10G11R11_UFLOAT and E5B9G9R9_UFLOAT").

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
This commit is contained in:
Alyssa Rosenzweig 2024-09-03 20:06:11 -04:00 committed by Marge Bot
parent 3a3a0c97f6
commit 52fcd0412a

View file

@ -8,6 +8,7 @@
* SPDX-License-Identifier: MIT
*/
#include "drm-uapi/drm_fourcc.h"
#include "vulkan/vulkan_core.h"
#include "hk_buffer_view.h"
#include "hk_entrypoints.h"
@ -27,6 +28,12 @@ static VkFormatFeatureFlags2
hk_modifier_features(uint64_t mod, VkFormat vk_format,
const VkFormatProperties *props)
{
/* There's no corresponding fourcc, so don't advertise modifiers */
if (vk_format == VK_FORMAT_B10G11R11_UFLOAT_PACK32 ||
vk_format == VK_FORMAT_E5B9G9R9_UFLOAT_PACK32) {
return 0;
}
if (mod == DRM_FORMAT_MOD_LINEAR)
return props->linearTilingFeatures;
else