nvk: Return os_page_size for minMemoryMapAlignment

Fixes: 8017ac0e79 ("nvk: add some limits/features from binary driver.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28019>
(cherry picked from commit 33bf7ca710)
This commit is contained in:
Faith Ekstrand 2024-03-06 09:51:51 -06:00 committed by Eric Engestrom
parent d92001d59c
commit 2ee94a147c
2 changed files with 5 additions and 2 deletions

View file

@ -314,7 +314,7 @@
"description": "nvk: Return os_page_size for minMemoryMapAlignment",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "8017ac0e7973f2e4d514b05cdf843f7a640293a5",
"notes": null

View file

@ -538,6 +538,9 @@ nvk_get_device_properties(const struct nvk_instance *instance,
VK_SAMPLE_COUNT_4_BIT |
VK_SAMPLE_COUNT_8_BIT;
uint64_t os_page_size = 4096;
os_get_page_size(&os_page_size);
*properties = (struct vk_properties) {
.apiVersion = nvk_get_vk_version(info),
.driverVersion = vk_get_driver_version(),
@ -614,7 +617,7 @@ nvk_get_device_properties(const struct nvk_instance *instance,
.maxViewportDimensions = { 32768, 32768 },
.viewportBoundsRange = { -65536, 65536 },
.viewportSubPixelBits = 8,
.minMemoryMapAlignment = 64,
.minMemoryMapAlignment = os_page_size,
.minTexelBufferOffsetAlignment = NVK_MIN_TEXEL_BUFFER_ALIGNMENT,
.minUniformBufferOffsetAlignment = nvk_min_cbuf_alignment(info),
.minStorageBufferOffsetAlignment = NVK_MIN_SSBO_ALIGNMENT,