From 40fcd8ef83d17c4a777f1d351db2dca1405707c6 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 14 Mar 2022 09:34:39 -0400 Subject: [PATCH] lavapipe: enable KHR_memory_model support lavapipe's memory is always coherent, so this is already supported Reviewed-by: Dave Airlie Part-of: --- src/gallium/frontends/lavapipe/ci/lvp-asan-fails.txt | 2 ++ src/gallium/frontends/lavapipe/lvp_device.c | 7 ++++--- src/gallium/frontends/lavapipe/lvp_pipeline.c | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/gallium/frontends/lavapipe/ci/lvp-asan-fails.txt b/src/gallium/frontends/lavapipe/ci/lvp-asan-fails.txt index 716c19834c7..3d6224e8202 100644 --- a/src/gallium/frontends/lavapipe/ci/lvp-asan-fails.txt +++ b/src/gallium/frontends/lavapipe/ci/lvp-asan-fails.txt @@ -13,6 +13,8 @@ dEQP-VK.renderpass.suballocation.formats.r32g32b32a32_sint.input.load.store.self dEQP-VK.renderpass2.dedicated_allocation.formats.a8b8g8r8_sint_pack32.input.clear.store.draw,Fail dEQP-VK.renderpass2.suballocation.formats.r16g16b16a16_unorm.input.dont_care.dont_care.draw,Fail dEQP-VK.renderpass2.suballocation.formats.r8g8b8a8_sint.input.load.dont_care.clear_draw,Fail +dEQP-VK.memory_model.message_passing.ext.u32.noncoherent.atomic_atomic.atomicwrite.device.payload_local.image.guard_local.image.vert,Fail +dEQP-VK.memory_model.write_after_read.ext.u32.noncoherent.fence_fence.atomicwrite.device.payload_local.buffer.guard_local.image.vert,Fail # Direct leak of 24 byte(s) in 1 object(s) allocated from: # #0 0x7f29a36d1e8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145 diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 3f946851c49..7bfabc0de32 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -129,6 +129,7 @@ static const struct vk_device_extension_table lvp_device_extensions_supported = .KHR_timeline_semaphore = true, .KHR_uniform_buffer_standard_layout = true, .KHR_variable_pointers = true, + .KHR_vulkan_memory_model = true, .EXT_4444_formats = true, .EXT_calibrated_timestamps = true, .EXT_color_write_enable = true, @@ -651,9 +652,9 @@ lvp_get_physical_device_features_1_2(struct lvp_physical_device *pdevice, f->bufferDeviceAddress = true; f->bufferDeviceAddressCaptureReplay = false; f->bufferDeviceAddressMultiDevice = false; - f->vulkanMemoryModel = false; - f->vulkanMemoryModelDeviceScope = false; - f->vulkanMemoryModelAvailabilityVisibilityChains = false; + f->vulkanMemoryModel = true; + f->vulkanMemoryModelDeviceScope = true; + f->vulkanMemoryModelAvailabilityVisibilityChains = true; f->shaderOutputViewportIndex = true; f->shaderOutputLayer = true; f->subgroupBroadcastDynamicId = true; diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c index da7179362ab..4a67f6bb8c8 100644 --- a/src/gallium/frontends/lavapipe/lvp_pipeline.c +++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c @@ -638,6 +638,8 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline, .subgroup_ballot = true, .subgroup_quad = true, .subgroup_vote = true, + .vk_memory_model = true, + .vk_memory_model_device_scope = true, .int8 = true, .float16 = true, },