Update Monado

This commit is contained in:
Patrick Nicolas
2025-09-22 23:35:28 +02:00
parent 6e9afab96b
commit e3356acc16
5 changed files with 33 additions and 9 deletions
+1 -1
View File
@@ -44,7 +44,7 @@
# Keep in sync with CMakeLists.txt monado rev # Keep in sync with CMakeLists.txt monado rev
rev = builtins.readFile ./monado-rev; rev = builtins.readFile ./monado-rev;
# Nix will output the correct hash when it doesn't match # Nix will output the correct hash when it doesn't match
hash = "sha256-K8DbHvyDmNwOxTxhTn9e/6++9wmY14ryVrqDOQCXcsw="; hash = "sha256-f1lcFVH5Ww7v2Mjubtn8/nEnOsRt9gUhFeYgcSXSfeE=";
}; };
}; };
+1 -1
View File
@@ -1 +1 @@
c4417629ac099e24001bb50bd327b769901cbb0a d5cf67f6aa259b2c4ebbc6fa3211e6dde51c8970
@@ -0,0 +1,24 @@
From a17589c9f77a5e5c3a56685017115fe07f9fd9cc Mon Sep 17 00:00:00 2001
From: Patrick Nicolas <patricknicolas@laposte.net>
Date: Mon, 22 Sep 2025 23:33:31 +0200
Subject: [PATCH] vk: fix video encode queue index
---
src/xrt/auxiliary/vk/vk_bundle_init.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/xrt/auxiliary/vk/vk_bundle_init.c b/src/xrt/auxiliary/vk/vk_bundle_init.c
index 01ce0c2f1..c4c63b608 100644
--- a/src/xrt/auxiliary/vk/vk_bundle_init.c
+++ b/src/xrt/auxiliary/vk/vk_bundle_init.c
@@ -1513,6 +1513,7 @@ vk_create_device(struct vk_bundle *vk,
vk->vkGetDeviceQueue(vk->device, vk->main_queue.family_index, 0, &vk->main_queue.queue);
#if defined(VK_KHR_video_encode_queue)
if (vk->encode_queue.family_index != VK_QUEUE_FAMILY_IGNORED) {
+ vk->encode_queue.index = 0;
vk->vkGetDeviceQueue(vk->device, vk->encode_queue.family_index, 0, &vk->encode_queue.queue);
}
#endif
--
2.51.0
+3 -3
View File
@@ -305,7 +305,7 @@ static bool comp_wivrn_init_post_vulkan(struct comp_target * ct, uint32_t prefer
cn->wivrn_bundle->device, cn->wivrn_bundle->device,
{ {
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer, .flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer,
.queueFamilyIndex = vk->queue_family_index, .queueFamilyIndex = vk->main_queue.family_index,
}); });
cn->wivrn_bundle->name(cn->command_pool, "comp target command pool"); cn->wivrn_bundle->name(cn->command_pool, "comp target command pool");
} }
@@ -584,8 +584,8 @@ static VkResult comp_wivrn_present(struct comp_target * ct,
.dstAccessMask = vk::AccessFlagBits::eMemoryWrite, .dstAccessMask = vk::AccessFlagBits::eMemoryWrite,
.oldLayout = vk::ImageLayout::eTransferSrcOptimal, .oldLayout = vk::ImageLayout::eTransferSrcOptimal,
.newLayout = vk::ImageLayout::eVideoEncodeSrcKHR, .newLayout = vk::ImageLayout::eVideoEncodeSrcKHR,
.srcQueueFamilyIndex = vk->queue_family_index, .srcQueueFamilyIndex = vk->main_queue.family_index,
.dstQueueFamilyIndex = vk->encode_queue_family_index, .dstQueueFamilyIndex = vk->encode_queue.family_index,
.image = psc_image.image, .image = psc_image.image,
.subresourceRange = {.aspectMask = vk::ImageAspectFlagBits::eColor, .subresourceRange = {.aspectMask = vk::ImageAspectFlagBits::eColor,
.baseMipLevel = 0, .baseMipLevel = 0,
+4 -4
View File
@@ -89,11 +89,11 @@ wivrn::wivrn_vk_bundle::wivrn_vk_bundle(vk_bundle & vk, std::span<const char *>
.vulkanApiVersion = VK_MAKE_VERSION(1, 3, 0), // FIXME: sync with wivrn_session.cpp .vulkanApiVersion = VK_MAKE_VERSION(1, 3, 0), // FIXME: sync with wivrn_session.cpp
}, },
vk.has_EXT_debug_utils), vk.has_EXT_debug_utils),
queue(device, vk.queue_family_index, vk.queue_index), queue(device, vk.main_queue.family_index, vk.main_queue.index),
queue_family_index(vk.queue_family_index), queue_family_index(vk.main_queue.family_index),
#ifdef VK_KHR_video_encode_queue #ifdef VK_KHR_video_encode_queue
encode_queue(make_queue(device, vk.encode_queue, vk.encode_queue_family_index, vk.encode_queue_index)), encode_queue(make_queue(device, vk.encode_queue.queue, vk.encode_queue.family_index, vk.encode_queue.index)),
encode_queue_family_index(vk.encode_queue_family_index), encode_queue_family_index(vk.encode_queue.family_index),
#else #else
encode_queue(nullptr), encode_queue(nullptr),
encode_queue_family_index(vk::QueueFamilyIgnored), encode_queue_family_index(vk::QueueFamilyIgnored),