nvk: Disable shaderStorageImageReadWithoutFormat pre-Maxwell.

On Kepler and earlier, image loads must get lowered based on the declared
format, since we don't have a SULDP op.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Emma Anholt 2023-07-18 11:37:14 -07:00 committed by Marge Bot
parent 1bbfdccc9f
commit 758973fb62
2 changed files with 5 additions and 2 deletions

View file

@ -8,6 +8,7 @@
#include "nil_format.h"
#include "vulkan/util/vk_format.h"
#include "clb097.h"
#include "clb197.h"
VkFormatFeatureFlags2
@ -62,8 +63,9 @@ nvk_get_image_format_features(struct nvk_physical_device *pdev,
if (nil_format_supports_storage(&pdev->info, p_format)) {
features |= VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT |
VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT |
VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT;
if (pdev->info.cls_eng3d >= MAXWELL_A)
features |= VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT;
}
if (p_format == PIPE_FORMAT_R32_UINT || p_format == PIPE_FORMAT_R32_SINT)

View file

@ -22,6 +22,7 @@
#include "cla097.h"
#include "cla0c0.h"
#include "cla1c0.h"
#include "clb097.h"
#include "clb0c0.h"
#include "clb197.h"
#include "clb1c0.h"
@ -438,7 +439,7 @@ nvk_get_device_features(const struct nv_device_info *info,
.shaderImageGatherExtended = true,
.shaderStorageImageExtendedFormats = true,
/* TODO: shaderStorageImageMultisample */
.shaderStorageImageReadWithoutFormat = true,
.shaderStorageImageReadWithoutFormat = info->cls_eng3d >= MAXWELL_A,
.shaderStorageImageWriteWithoutFormat = true,
.shaderUniformBufferArrayDynamicIndexing = true,
.shaderSampledImageArrayDynamicIndexing = true,