summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2022-03-14 09:34:39 -0400
committerMarge Bot <emma+marge@anholt.net>2022-03-15 22:17:43 +0000
commit40fcd8ef83d17c4a777f1d351db2dca1405707c6 (patch)
treee3ab3ceaea60c2cb8824d75a79f382a41600918b
parent13d900de0dcf7885972100f2ad36a6bc5cc0eeb1 (diff)
lavapipe: enable KHR_memory_model support
lavapipe's memory is always coherent, so this is already supported Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15377>
-rw-r--r--src/gallium/frontends/lavapipe/ci/lvp-asan-fails.txt2
-rw-r--r--src/gallium/frontends/lavapipe/lvp_device.c7
-rw-r--r--src/gallium/frontends/lavapipe/lvp_pipeline.c2
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 716c19834c74..3d6224e82027 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 3f946851c498..7bfabc0de32d 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 da7179362abd..4a67f6bb8c85 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,
},