panvk: Return proper buffer format feature flags

This fixes "dEQP-VK.api.buffer.invalid_buffer_features.*".

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31089>
This commit is contained in:
Mary Guillemard 2024-08-26 10:03:10 +02:00 committed by Marge Bot
parent 569032a47d
commit d8a9a5db32

View file

@ -969,9 +969,6 @@ get_format_properties(struct panvk_physical_device *physical_device,
if (util_format_get_blocksize(pfmt) == 3)
goto end;
buffer |=
VK_FORMAT_FEATURE_TRANSFER_SRC_BIT | VK_FORMAT_FEATURE_TRANSFER_DST_BIT;
/* Reject sRGB formats (see
* https://github.com/KhronosGroup/Vulkan-Docs/issues/2214).
*/
@ -989,7 +986,8 @@ get_format_properties(struct panvk_physical_device *physical_device,
if (!util_format_is_scaled(pfmt) && !util_format_is_pure_integer(pfmt))
tex |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT;
buffer |= VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT;
if (!util_format_is_depth_or_stencil(pfmt))
buffer |= VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT;
tex |= VK_FORMAT_FEATURE_BLIT_SRC_BIT;
}
@ -997,7 +995,6 @@ get_format_properties(struct panvk_physical_device *physical_device,
if (fmt.bind & PAN_BIND_RENDER_TARGET) {
tex |= VK_FORMAT_FEATURE_BLIT_DST_BIT;
tex |= VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT;
buffer |= VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT;
/* SNORM rendering isn't working yet (nir_lower_blend bugs), disable for
* now.
@ -1008,6 +1005,9 @@ get_format_properties(struct panvk_physical_device *physical_device,
tex |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT;
tex |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT;
}
if (!util_format_is_depth_and_stencil(pfmt))
buffer |= VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT;
}
if (pfmt == PIPE_FORMAT_R32_UINT || pfmt == PIPE_FORMAT_R32_SINT) {