diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-11-02 22:27:16 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-11-02 22:27:16 +0000 |
commit | c13b0948130ad775acf3d0ffb1858af11f394af3 (patch) | |
tree | a662cf6dfb8c0de67af58421b30579dc6c3aecb1 | |
parent | 24aa7021a545117ddcdab24ef07e73321bc24f47 (diff) | |
parent | 8a6c7d4f79add19167d8ea37e85ec09678738f19 (diff) | |
download | vulkan-cereal-aml_cbr_341610000.tar.gz |
Snap for 11041982 from 8a6c7d4f79add19167d8ea37e85ec09678738f19 to mainline-cellbroadcast-releaseaml_cbr_341710000aml_cbr_341610000aml_cbr_341510010aml_cbr_341410010aml_cbr_341311010android14-mainline-cellbroadcast-release
Change-Id: I2da01d39469576135e568b5b3a16ab91bfa61426
-rw-r--r-- | stream-servers/vulkan/VkDecoder.cpp | 180 | ||||
-rw-r--r-- | stream-servers/vulkan/VkDecoderGlobalState.cpp | 57 | ||||
-rw-r--r-- | stream-servers/vulkan/VkDecoderGlobalState.h | 9 | ||||
-rw-r--r-- | stream-servers/vulkan/VkDecoderSnapshot.cpp | 28 | ||||
-rw-r--r-- | stream-servers/vulkan/VkDecoderSnapshot.h | 9 | ||||
-rw-r--r-- | stream-servers/vulkan/cereal/common/goldfish_vk_dispatch.cpp | 9 | ||||
-rw-r--r-- | stream-servers/vulkan/cereal/common/goldfish_vk_dispatch.h | 1 | ||||
-rw-r--r-- | stream-servers/vulkan/cereal/common/goldfish_vk_marshaling.cpp | 5 | ||||
-rw-r--r-- | stream-servers/vulkan/cereal/common/goldfish_vk_marshaling.h | 1 | ||||
-rw-r--r-- | stream-servers/vulkan/vulkan_gfxstream.h | 17 |
10 files changed, 315 insertions, 1 deletions
diff --git a/stream-servers/vulkan/VkDecoder.cpp b/stream-servers/vulkan/VkDecoder.cpp index f8e04277..4cc483e5 100644 --- a/stream-servers/vulkan/VkDecoder.cpp +++ b/stream-servers/vulkan/VkDecoder.cpp @@ -35862,6 +35862,186 @@ size_t VkDecoder::Impl::decode(void* buf, size_t len, IOStream* ioStream, android::base::endTrace(); break; } + case OP_vkUpdateDescriptorSetWithTemplateSized2GOOGLE: { + android::base::beginTrace("vkUpdateDescriptorSetWithTemplateSized2GOOGLE decode"); + VkDevice device; + VkDescriptorSet descriptorSet; + VkDescriptorUpdateTemplate descriptorUpdateTemplate; + uint32_t imageInfoCount; + uint32_t bufferInfoCount; + uint32_t bufferViewCount; + uint32_t inlineUniformBlockCount; + const uint32_t* pImageInfoEntryIndices; + const uint32_t* pBufferInfoEntryIndices; + const uint32_t* pBufferViewEntryIndices; + const VkDescriptorImageInfo* pImageInfos; + const VkDescriptorBufferInfo* pBufferInfos; + const VkBufferView* pBufferViews; + const uint8_t* pInlineUniformBlockData; + // Begin global wrapped dispatchable handle unboxing for device; + uint64_t cgen_var_0; + memcpy((uint64_t*)&cgen_var_0, *readStreamPtrPtr, 1 * 8); + *readStreamPtrPtr += 1 * 8; + *(VkDevice*)&device = (VkDevice)(VkDevice)((VkDevice)(*&cgen_var_0)); + uint64_t cgen_var_1; + memcpy((uint64_t*)&cgen_var_1, *readStreamPtrPtr, 1 * 8); + *readStreamPtrPtr += 1 * 8; + *(VkDescriptorSet*)&descriptorSet = + (VkDescriptorSet)unbox_VkDescriptorSet((VkDescriptorSet)(*&cgen_var_1)); + uint64_t cgen_var_2; + memcpy((uint64_t*)&cgen_var_2, *readStreamPtrPtr, 1 * 8); + *readStreamPtrPtr += 1 * 8; + *(VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate = + (VkDescriptorUpdateTemplate)unbox_VkDescriptorUpdateTemplate( + (VkDescriptorUpdateTemplate)(*&cgen_var_2)); + memcpy((uint32_t*)&imageInfoCount, *readStreamPtrPtr, sizeof(uint32_t)); + *readStreamPtrPtr += sizeof(uint32_t); + memcpy((uint32_t*)&bufferInfoCount, *readStreamPtrPtr, sizeof(uint32_t)); + *readStreamPtrPtr += sizeof(uint32_t); + memcpy((uint32_t*)&bufferViewCount, *readStreamPtrPtr, sizeof(uint32_t)); + *readStreamPtrPtr += sizeof(uint32_t); + memcpy((uint32_t*)&inlineUniformBlockCount, *readStreamPtrPtr, sizeof(uint32_t)); + *readStreamPtrPtr += sizeof(uint32_t); + // WARNING PTR CHECK + memcpy((uint32_t**)&pImageInfoEntryIndices, (*readStreamPtrPtr), 8); + android::base::Stream::fromBe64((uint8_t*)&pImageInfoEntryIndices); + *readStreamPtrPtr += 8; + if (pImageInfoEntryIndices) { + vkReadStream->alloc((void**)&pImageInfoEntryIndices, + ((imageInfoCount)) * sizeof(const uint32_t)); + memcpy((uint32_t*)pImageInfoEntryIndices, *readStreamPtrPtr, + ((imageInfoCount)) * sizeof(const uint32_t)); + *readStreamPtrPtr += ((imageInfoCount)) * sizeof(const uint32_t); + } + // WARNING PTR CHECK + memcpy((uint32_t**)&pBufferInfoEntryIndices, (*readStreamPtrPtr), 8); + android::base::Stream::fromBe64((uint8_t*)&pBufferInfoEntryIndices); + *readStreamPtrPtr += 8; + if (pBufferInfoEntryIndices) { + vkReadStream->alloc((void**)&pBufferInfoEntryIndices, + ((bufferInfoCount)) * sizeof(const uint32_t)); + memcpy((uint32_t*)pBufferInfoEntryIndices, *readStreamPtrPtr, + ((bufferInfoCount)) * sizeof(const uint32_t)); + *readStreamPtrPtr += ((bufferInfoCount)) * sizeof(const uint32_t); + } + // WARNING PTR CHECK + memcpy((uint32_t**)&pBufferViewEntryIndices, (*readStreamPtrPtr), 8); + android::base::Stream::fromBe64((uint8_t*)&pBufferViewEntryIndices); + *readStreamPtrPtr += 8; + if (pBufferViewEntryIndices) { + vkReadStream->alloc((void**)&pBufferViewEntryIndices, + ((bufferViewCount)) * sizeof(const uint32_t)); + memcpy((uint32_t*)pBufferViewEntryIndices, *readStreamPtrPtr, + ((bufferViewCount)) * sizeof(const uint32_t)); + *readStreamPtrPtr += ((bufferViewCount)) * sizeof(const uint32_t); + } + // WARNING PTR CHECK + memcpy((VkDescriptorImageInfo**)&pImageInfos, (*readStreamPtrPtr), 8); + android::base::Stream::fromBe64((uint8_t*)&pImageInfos); + *readStreamPtrPtr += 8; + if (pImageInfos) { + vkReadStream->alloc((void**)&pImageInfos, + ((imageInfoCount)) * sizeof(const VkDescriptorImageInfo)); + for (uint32_t i = 0; i < (uint32_t)((imageInfoCount)); ++i) { + reservedunmarshal_VkDescriptorImageInfo( + vkReadStream, VK_STRUCTURE_TYPE_MAX_ENUM, + (VkDescriptorImageInfo*)(pImageInfos + i), readStreamPtrPtr); + } + } + // WARNING PTR CHECK + memcpy((VkDescriptorBufferInfo**)&pBufferInfos, (*readStreamPtrPtr), 8); + android::base::Stream::fromBe64((uint8_t*)&pBufferInfos); + *readStreamPtrPtr += 8; + if (pBufferInfos) { + vkReadStream->alloc((void**)&pBufferInfos, + ((bufferInfoCount)) * sizeof(const VkDescriptorBufferInfo)); + for (uint32_t i = 0; i < (uint32_t)((bufferInfoCount)); ++i) { + reservedunmarshal_VkDescriptorBufferInfo( + vkReadStream, VK_STRUCTURE_TYPE_MAX_ENUM, + (VkDescriptorBufferInfo*)(pBufferInfos + i), readStreamPtrPtr); + } + } + // WARNING PTR CHECK + memcpy((VkBufferView**)&pBufferViews, (*readStreamPtrPtr), 8); + android::base::Stream::fromBe64((uint8_t*)&pBufferViews); + *readStreamPtrPtr += 8; + if (pBufferViews) { + vkReadStream->alloc((void**)&pBufferViews, + ((bufferViewCount)) * sizeof(const VkBufferView)); + if (((bufferViewCount))) { + uint8_t* cgen_var_8_0_ptr = (uint8_t*)(*readStreamPtrPtr); + *readStreamPtrPtr += 8 * ((bufferViewCount)); + for (uint32_t k = 0; k < ((bufferViewCount)); ++k) { + uint64_t tmpval; + memcpy(&tmpval, cgen_var_8_0_ptr + k * 8, sizeof(uint64_t)); + *(((VkBufferView*)pBufferViews) + k) = + (VkBufferView)unbox_VkBufferView((VkBufferView)tmpval); + } + } + } + // WARNING PTR CHECK + memcpy((uint8_t**)&pInlineUniformBlockData, (*readStreamPtrPtr), 8); + android::base::Stream::fromBe64((uint8_t*)&pInlineUniformBlockData); + *readStreamPtrPtr += 8; + if (pInlineUniformBlockData) { + vkReadStream->alloc((void**)&pInlineUniformBlockData, + ((inlineUniformBlockCount)) * sizeof(const uint8_t)); + memcpy((uint8_t*)pInlineUniformBlockData, *readStreamPtrPtr, + ((inlineUniformBlockCount)) * sizeof(const uint8_t)); + *readStreamPtrPtr += ((inlineUniformBlockCount)) * sizeof(const uint8_t); + } + if (pImageInfos) { + for (uint32_t i = 0; i < (uint32_t)((imageInfoCount)); ++i) { + transform_tohost_VkDescriptorImageInfo( + m_state, (VkDescriptorImageInfo*)(pImageInfos + i)); + } + } + if (pBufferInfos) { + for (uint32_t i = 0; i < (uint32_t)((bufferInfoCount)); ++i) { + transform_tohost_VkDescriptorBufferInfo( + m_state, (VkDescriptorBufferInfo*)(pBufferInfos + i)); + } + } + if (m_logCalls) { + fprintf(stderr, + "stream %p: call vkUpdateDescriptorSetWithTemplateSized2GOOGLE 0x%llx " + "0x%llx 0x%llx 0x%llx 0x%llx 0x%llx 0x%llx 0x%llx 0x%llx 0x%llx 0x%llx " + "0x%llx 0x%llx 0x%llx \n", + ioStream, (unsigned long long)device, (unsigned long long)descriptorSet, + (unsigned long long)descriptorUpdateTemplate, + (unsigned long long)imageInfoCount, (unsigned long long)bufferInfoCount, + (unsigned long long)bufferViewCount, + (unsigned long long)inlineUniformBlockCount, + (unsigned long long)pImageInfoEntryIndices, + (unsigned long long)pBufferInfoEntryIndices, + (unsigned long long)pBufferViewEntryIndices, + (unsigned long long)pImageInfos, (unsigned long long)pBufferInfos, + (unsigned long long)pBufferViews, + (unsigned long long)pInlineUniformBlockData); + } + m_state->on_vkUpdateDescriptorSetWithTemplateSized2GOOGLE( + &m_pool, device, descriptorSet, descriptorUpdateTemplate, imageInfoCount, + bufferInfoCount, bufferViewCount, inlineUniformBlockCount, + pImageInfoEntryIndices, pBufferInfoEntryIndices, pBufferViewEntryIndices, + pImageInfos, pBufferInfos, pBufferViews, pInlineUniformBlockData); + vkStream->unsetHandleMapping(); + vkReadStream->setReadPos((uintptr_t)(*readStreamPtrPtr) - + (uintptr_t)snapshotTraceBegin); + size_t snapshotTraceBytes = vkReadStream->endTrace(); + if (m_state->snapshotsEnabled()) { + m_state->snapshot()->vkUpdateDescriptorSetWithTemplateSized2GOOGLE( + snapshotTraceBegin, snapshotTraceBytes, &m_pool, device, descriptorSet, + descriptorUpdateTemplate, imageInfoCount, bufferInfoCount, bufferViewCount, + inlineUniformBlockCount, pImageInfoEntryIndices, pBufferInfoEntryIndices, + pBufferViewEntryIndices, pImageInfos, pBufferInfos, pBufferViews, + pInlineUniformBlockData); + } + vkReadStream->clearPool(); + if (queueSubmitWithCommandsEnabled) + seqnoPtr->fetch_add(1, std::memory_order_seq_cst); + android::base::endTrace(); + break; + } #endif #ifdef VK_EXT_global_priority_query #endif diff --git a/stream-servers/vulkan/VkDecoderGlobalState.cpp b/stream-servers/vulkan/VkDecoderGlobalState.cpp index 477a4d3c..da07609c 100644 --- a/stream-servers/vulkan/VkDecoderGlobalState.cpp +++ b/stream-servers/vulkan/VkDecoderGlobalState.cpp @@ -4145,6 +4145,34 @@ class VkDecoderGlobalState::Impl { info->data.data()); } + void on_vkUpdateDescriptorSetWithTemplateSized2GOOGLE( + android::base::BumpPool* pool, VkDevice boxed_device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, uint32_t imageInfoCount, + uint32_t bufferInfoCount, uint32_t bufferViewCount, uint32_t inlineUniformBlockCount, + const uint32_t* pImageInfoEntryIndices, const uint32_t* pBufferInfoEntryIndices, + const uint32_t* pBufferViewEntryIndices, const VkDescriptorImageInfo* pImageInfos, + const VkDescriptorBufferInfo* pBufferInfos, const VkBufferView* pBufferViews, + const uint8_t* pInlineUniformBlockData) { + auto device = unbox_VkDevice(boxed_device); + auto vk = dispatch_VkDevice(boxed_device); + + std::lock_guard<std::recursive_mutex> lock(mLock); + auto* info = android::base::find(mDescriptorUpdateTemplateInfo, descriptorUpdateTemplate); + if (!info) return; + + memcpy(info->data.data() + info->imageInfoStart, pImageInfos, + imageInfoCount * sizeof(VkDescriptorImageInfo)); + memcpy(info->data.data() + info->bufferInfoStart, pBufferInfos, + bufferInfoCount * sizeof(VkDescriptorBufferInfo)); + memcpy(info->data.data() + info->bufferViewStart, pBufferViews, + bufferViewCount * sizeof(VkBufferView)); + memcpy(info->data.data() + info->inlineUniformBlockStart, pInlineUniformBlockData, + inlineUniformBlockCount); + + vk->vkUpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, + info->data.data()); + } + void hostSyncCommandBuffer(const char* tag, VkCommandBuffer boxed_commandBuffer, uint32_t needHostSync, uint32_t sequenceNumber) { auto nextDeadline = []() { @@ -5852,6 +5880,7 @@ class VkDecoderGlobalState::Impl { size_t imageInfoStart; size_t bufferInfoStart; size_t bufferViewStart; + size_t inlineUniformBlockStart; }; DescriptorUpdateTemplateInfo calcLinearizedDescriptorUpdateTemplateInfo( @@ -5862,6 +5891,7 @@ class VkDecoderGlobalState::Impl { size_t numImageInfos = 0; size_t numBufferInfos = 0; size_t numBufferViews = 0; + size_t numInlineUniformBlocks = 0; for (uint32_t i = 0; i < pCreateInfo->descriptorUpdateEntryCount; ++i) { const auto& entry = pCreateInfo->pDescriptorUpdateEntries[i]; @@ -5873,6 +5903,8 @@ class VkDecoderGlobalState::Impl { numBufferInfos += count; } else if (isDescriptorTypeBufferView(type)) { numBufferViews += count; + } else if (type == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT) { + numInlineUniformBlocks += count; } else { GFXSTREAM_ABORT(FatalError(ABORT_REASON_OTHER)) << "unknown descriptor type 0x" << std::hex << type; @@ -5882,15 +5914,19 @@ class VkDecoderGlobalState::Impl { size_t imageInfoBytes = numImageInfos * sizeof(VkDescriptorImageInfo); size_t bufferInfoBytes = numBufferInfos * sizeof(VkDescriptorBufferInfo); size_t bufferViewBytes = numBufferViews * sizeof(VkBufferView); + size_t inlineUniformBlockBytes = numInlineUniformBlocks; - res.data.resize(imageInfoBytes + bufferInfoBytes + bufferViewBytes); + res.data.resize(imageInfoBytes + bufferInfoBytes + bufferViewBytes + + inlineUniformBlockBytes); res.imageInfoStart = 0; res.bufferInfoStart = imageInfoBytes; res.bufferViewStart = imageInfoBytes + bufferInfoBytes; + res.inlineUniformBlockStart = imageInfoBytes + bufferInfoBytes + bufferViewBytes; size_t imageInfoCount = 0; size_t bufferInfoCount = 0; size_t bufferViewCount = 0; + size_t inlineUniformBlockCount = 0; for (uint32_t i = 0; i < pCreateInfo->descriptorUpdateEntryCount; ++i) { const auto& entry = pCreateInfo->pDescriptorUpdateEntries[i]; @@ -5912,6 +5948,10 @@ class VkDecoderGlobalState::Impl { entryForHost.offset = res.bufferViewStart + bufferViewCount * sizeof(VkBufferView); entryForHost.stride = sizeof(VkBufferView); ++bufferViewCount; + } else if (type == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT) { + entryForHost.offset = res.inlineUniformBlockStart + inlineUniformBlockCount; + entryForHost.stride = 0; + inlineUniformBlockCount += entryForHost.descriptorCount; } else { GFXSTREAM_ABORT(FatalError(ABORT_REASON_OTHER)) << "unknown descriptor type 0x" << std::hex << type; @@ -7086,6 +7126,21 @@ void VkDecoderGlobalState::on_vkUpdateDescriptorSetWithTemplateSizedGOOGLE( pBufferViewEntryIndices, pImageInfos, pBufferInfos, pBufferViews); } +void VkDecoderGlobalState::on_vkUpdateDescriptorSetWithTemplateSized2GOOGLE( + android::base::BumpPool* pool, VkDevice boxed_device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, uint32_t imageInfoCount, + uint32_t bufferInfoCount, uint32_t bufferViewCount, uint32_t inlineUniformBlockCount, + const uint32_t* pImageInfoEntryIndices, const uint32_t* pBufferInfoEntryIndices, + const uint32_t* pBufferViewEntryIndices, const VkDescriptorImageInfo* pImageInfos, + const VkDescriptorBufferInfo* pBufferInfos, const VkBufferView* pBufferViews, + const uint8_t* pInlineUniformBlockData) { + mImpl->on_vkUpdateDescriptorSetWithTemplateSized2GOOGLE( + pool, boxed_device, descriptorSet, descriptorUpdateTemplate, imageInfoCount, + bufferInfoCount, bufferViewCount, inlineUniformBlockCount, pImageInfoEntryIndices, + pBufferInfoEntryIndices, pBufferViewEntryIndices, pImageInfos, pBufferInfos, pBufferViews, + pInlineUniformBlockData); +} + VkResult VkDecoderGlobalState::on_vkBeginCommandBuffer(android::base::BumpPool* pool, VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo, diff --git a/stream-servers/vulkan/VkDecoderGlobalState.h b/stream-servers/vulkan/VkDecoderGlobalState.h index b74f1ab7..f49285f1 100644 --- a/stream-servers/vulkan/VkDecoderGlobalState.h +++ b/stream-servers/vulkan/VkDecoderGlobalState.h @@ -511,6 +511,15 @@ class VkDecoderGlobalState { const VkDescriptorImageInfo* pImageInfos, const VkDescriptorBufferInfo* pBufferInfos, const VkBufferView* pBufferViews); + void on_vkUpdateDescriptorSetWithTemplateSized2GOOGLE( + android::base::BumpPool* pool, VkDevice boxed_device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, uint32_t imageInfoCount, + uint32_t bufferInfoCount, uint32_t bufferViewCount, uint32_t inlineUniformBlockCount, + const uint32_t* pImageInfoEntryIndices, const uint32_t* pBufferInfoEntryIndices, + const uint32_t* pBufferViewEntryIndices, const VkDescriptorImageInfo* pImageInfos, + const VkDescriptorBufferInfo* pBufferInfos, const VkBufferView* pBufferViews, + const uint8_t* pInlineUniformBlockData); + VkResult on_vkBeginCommandBuffer(android::base::BumpPool* pool, VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo, const VkDecoderContext& context); diff --git a/stream-servers/vulkan/VkDecoderSnapshot.cpp b/stream-servers/vulkan/VkDecoderSnapshot.cpp index 81bf8667..6aa323da 100644 --- a/stream-servers/vulkan/VkDecoderSnapshot.cpp +++ b/stream-servers/vulkan/VkDecoderSnapshot.cpp @@ -4711,6 +4711,17 @@ class VkDecoderSnapshot::Impl { VkDeviceMemory memory) { // TODO: Implement } + void vkUpdateDescriptorSetWithTemplateSized2GOOGLE( + const uint8_t* snapshotTraceBegin, size_t snapshotTraceBytes, android::base::BumpPool* pool, + VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, uint32_t imageInfoCount, + uint32_t bufferInfoCount, uint32_t bufferViewCount, uint32_t inlineUniformBlockCount, + const uint32_t* pImageInfoEntryIndices, const uint32_t* pBufferInfoEntryIndices, + const uint32_t* pBufferViewEntryIndices, const VkDescriptorImageInfo* pImageInfos, + const VkDescriptorBufferInfo* pBufferInfos, const VkBufferView* pBufferViews, + const uint8_t* pInlineUniformBlockData) { + // TODO: Implement + } #endif #ifdef VK_EXT_global_priority_query #endif @@ -10919,6 +10930,23 @@ void VkDecoderSnapshot::vkGetBlobGOOGLE(const uint8_t* snapshotTraceBegin, memory); } #endif +#ifdef VK_GOOGLE_gfxstream +void VkDecoderSnapshot::vkUpdateDescriptorSetWithTemplateSized2GOOGLE( + const uint8_t* snapshotTraceBegin, size_t snapshotTraceBytes, android::base::BumpPool* pool, + VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, uint32_t imageInfoCount, + uint32_t bufferInfoCount, uint32_t bufferViewCount, uint32_t inlineUniformBlockCount, + const uint32_t* pImageInfoEntryIndices, const uint32_t* pBufferInfoEntryIndices, + const uint32_t* pBufferViewEntryIndices, const VkDescriptorImageInfo* pImageInfos, + const VkDescriptorBufferInfo* pBufferInfos, const VkBufferView* pBufferViews, + const uint8_t* pInlineUniformBlockData) { + mImpl->vkUpdateDescriptorSetWithTemplateSized2GOOGLE( + snapshotTraceBegin, snapshotTraceBytes, pool, device, descriptorSet, + descriptorUpdateTemplate, imageInfoCount, bufferInfoCount, bufferViewCount, + inlineUniformBlockCount, pImageInfoEntryIndices, pBufferInfoEntryIndices, + pBufferViewEntryIndices, pImageInfos, pBufferInfos, pBufferViews, pInlineUniformBlockData); +} +#endif #ifdef VK_EXT_multi_draw void VkDecoderSnapshot::vkCmdDrawMultiEXT(const uint8_t* snapshotTraceBegin, size_t snapshotTraceBytes, android::base::BumpPool* pool, diff --git a/stream-servers/vulkan/VkDecoderSnapshot.h b/stream-servers/vulkan/VkDecoderSnapshot.h index 55a5483d..0f2bb6ec 100644 --- a/stream-servers/vulkan/VkDecoderSnapshot.h +++ b/stream-servers/vulkan/VkDecoderSnapshot.h @@ -2944,6 +2944,15 @@ class VkDecoderSnapshot { void vkGetBlobGOOGLE(const uint8_t* snapshotTraceBegin, size_t snapshotTraceBytes, android::base::BumpPool* pool, VkResult input_result, VkDevice device, VkDeviceMemory memory); + void vkUpdateDescriptorSetWithTemplateSized2GOOGLE( + const uint8_t* snapshotTraceBegin, size_t snapshotTraceBytes, android::base::BumpPool* pool, + VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, uint32_t imageInfoCount, + uint32_t bufferInfoCount, uint32_t bufferViewCount, uint32_t inlineUniformBlockCount, + const uint32_t* pImageInfoEntryIndices, const uint32_t* pBufferInfoEntryIndices, + const uint32_t* pBufferViewEntryIndices, const VkDescriptorImageInfo* pImageInfos, + const VkDescriptorBufferInfo* pBufferInfos, const VkBufferView* pBufferViews, + const uint8_t* pInlineUniformBlockData); #endif #ifdef VK_EXT_global_priority_query #endif diff --git a/stream-servers/vulkan/cereal/common/goldfish_vk_dispatch.cpp b/stream-servers/vulkan/cereal/common/goldfish_vk_dispatch.cpp index e1cf82da..67dcb798 100644 --- a/stream-servers/vulkan/cereal/common/goldfish_vk_dispatch.cpp +++ b/stream-servers/vulkan/cereal/common/goldfish_vk_dispatch.cpp @@ -2013,6 +2013,9 @@ void init_vulkan_dispatch_from_system_loader(DlOpenFunc dlOpenFunc, DlSymFunc dl (PFN_vkQueueFlushCommandsFromAuxMemoryGOOGLE)dlSymFunc( lib, "vkQueueFlushCommandsFromAuxMemoryGOOGLE"); out->vkGetBlobGOOGLE = (PFN_vkGetBlobGOOGLE)dlSymFunc(lib, "vkGetBlobGOOGLE"); + out->vkUpdateDescriptorSetWithTemplateSized2GOOGLE = + (PFN_vkUpdateDescriptorSetWithTemplateSized2GOOGLE)dlSymFunc( + lib, "vkUpdateDescriptorSetWithTemplateSized2GOOGLE"); #endif #ifdef VK_EXT_multi_draw out->vkCmdDrawMultiEXT = (PFN_vkCmdDrawMultiEXT)dlSymFunc(lib, "vkCmdDrawMultiEXT"); @@ -3852,6 +3855,9 @@ void init_vulkan_dispatch_from_instance(VulkanDispatch* vk, VkInstance instance, instance, "vkQueueFlushCommandsFromAuxMemoryGOOGLE"); out->vkGetBlobGOOGLE = (PFN_vkGetBlobGOOGLE)vk->vkGetInstanceProcAddr(instance, "vkGetBlobGOOGLE"); + out->vkUpdateDescriptorSetWithTemplateSized2GOOGLE = + (PFN_vkUpdateDescriptorSetWithTemplateSized2GOOGLE)vk->vkGetInstanceProcAddr( + instance, "vkUpdateDescriptorSetWithTemplateSized2GOOGLE"); #endif #ifdef VK_EXT_multi_draw out->vkCmdDrawMultiEXT = @@ -5705,6 +5711,9 @@ void init_vulkan_dispatch_from_device(VulkanDispatch* vk, VkDevice device, Vulka (PFN_vkQueueFlushCommandsFromAuxMemoryGOOGLE)vk->vkGetDeviceProcAddr( device, "vkQueueFlushCommandsFromAuxMemoryGOOGLE"); out->vkGetBlobGOOGLE = (PFN_vkGetBlobGOOGLE)vk->vkGetDeviceProcAddr(device, "vkGetBlobGOOGLE"); + out->vkUpdateDescriptorSetWithTemplateSized2GOOGLE = + (PFN_vkUpdateDescriptorSetWithTemplateSized2GOOGLE)vk->vkGetDeviceProcAddr( + device, "vkUpdateDescriptorSetWithTemplateSized2GOOGLE"); #endif #ifdef VK_EXT_multi_draw out->vkCmdDrawMultiEXT = diff --git a/stream-servers/vulkan/cereal/common/goldfish_vk_dispatch.h b/stream-servers/vulkan/cereal/common/goldfish_vk_dispatch.h index 5745cf16..99ca96d4 100644 --- a/stream-servers/vulkan/cereal/common/goldfish_vk_dispatch.h +++ b/stream-servers/vulkan/cereal/common/goldfish_vk_dispatch.h @@ -1224,6 +1224,7 @@ struct VulkanDispatch { PFN_vkQueueSignalReleaseImageANDROIDAsyncGOOGLE vkQueueSignalReleaseImageANDROIDAsyncGOOGLE; PFN_vkQueueFlushCommandsFromAuxMemoryGOOGLE vkQueueFlushCommandsFromAuxMemoryGOOGLE; PFN_vkGetBlobGOOGLE vkGetBlobGOOGLE; + PFN_vkUpdateDescriptorSetWithTemplateSized2GOOGLE vkUpdateDescriptorSetWithTemplateSized2GOOGLE; #endif #ifdef VK_EXT_global_priority_query #endif diff --git a/stream-servers/vulkan/cereal/common/goldfish_vk_marshaling.cpp b/stream-servers/vulkan/cereal/common/goldfish_vk_marshaling.cpp index b26c3462..86804be9 100644 --- a/stream-servers/vulkan/cereal/common/goldfish_vk_marshaling.cpp +++ b/stream-servers/vulkan/cereal/common/goldfish_vk_marshaling.cpp @@ -50057,6 +50057,11 @@ const char* api_opcode_to_string(const uint32_t opcode) { return "OP_vkCmdWaitEvents2"; } #endif +#ifdef VK_GOOGLE_gfxstream + case OP_vkUpdateDescriptorSetWithTemplateSized2GOOGLE: { + return "OP_vkUpdateDescriptorSetWithTemplateSized2GOOGLE"; + } +#endif #ifdef VK_EXT_extended_dynamic_state3 case OP_vkCmdSetRepresentativeFragmentTestEnableNV: { return "OP_vkCmdSetRepresentativeFragmentTestEnableNV"; diff --git a/stream-servers/vulkan/cereal/common/goldfish_vk_marshaling.h b/stream-servers/vulkan/cereal/common/goldfish_vk_marshaling.h index a4643908..56ef57aa 100644 --- a/stream-servers/vulkan/cereal/common/goldfish_vk_marshaling.h +++ b/stream-servers/vulkan/cereal/common/goldfish_vk_marshaling.h @@ -7670,6 +7670,7 @@ void unmarshal_VkCreateBlobGOOGLE(VulkanStream* vkStream, VkStructureType rootTy #define OP_vkQueueSignalReleaseImageANDROIDAsyncGOOGLE 243985229 #define OP_vkQueueFlushCommandsFromAuxMemoryGOOGLE 290633483 #define OP_vkGetBlobGOOGLE 20341 +#define OP_vkUpdateDescriptorSetWithTemplateSized2GOOGLE 244782974 #endif #ifdef VK_EXT_global_priority_query DEFINE_ALIAS_FUNCTION(marshal_VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR, diff --git a/stream-servers/vulkan/vulkan_gfxstream.h b/stream-servers/vulkan/vulkan_gfxstream.h index 060dac5c..53431f82 100644 --- a/stream-servers/vulkan/vulkan_gfxstream.h +++ b/stream-servers/vulkan/vulkan_gfxstream.h @@ -119,6 +119,14 @@ typedef void(VKAPI_PTR* PFN_vkQueueFlushCommandsFromAuxMemoryGOOGLE)(VkQueue que VkDeviceSize dataOffset, VkDeviceSize dataSize); typedef VkResult(VKAPI_PTR* PFN_vkGetBlobGOOGLE)(VkDevice device, VkDeviceMemory memory); +typedef void(VKAPI_PTR* PFN_vkUpdateDescriptorSetWithTemplateSized2GOOGLE)( + VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, uint32_t imageInfoCount, + uint32_t bufferInfoCount, uint32_t bufferViewCount, uint32_t inlineUniformBlockCount, + const uint32_t* pImageInfoEntryIndices, const uint32_t* pBufferInfoEntryIndices, + const uint32_t* pBufferViewEntryIndices, const VkDescriptorImageInfo* pImageInfos, + const VkDescriptorBufferInfo* pBufferInfos, const VkBufferView* pBufferViews, + const uint8_t* pInlineUniformBlockData); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkMapMemoryIntoAddressSpaceGOOGLE(VkDevice device, @@ -208,6 +216,15 @@ VKAPI_ATTR void VKAPI_CALL vkQueueFlushCommandsFromAuxMemoryGOOGLE(VkQueue queue VkDeviceSize dataSize); VKAPI_ATTR VkResult VKAPI_CALL vkGetBlobGOOGLE(VkDevice device, VkDeviceMemory memory); + +VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateSized2GOOGLE( + VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, uint32_t imageInfoCount, + uint32_t bufferInfoCount, uint32_t bufferViewCount, uint32_t inlineUniformBlockCount, + const uint32_t* pImageInfoEntryIndices, const uint32_t* pBufferInfoEntryIndices, + const uint32_t* pBufferViewEntryIndices, const VkDescriptorImageInfo* pImageInfos, + const VkDescriptorBufferInfo* pBufferInfos, const VkBufferView* pBufferViews, + const uint8_t* pInlineUniformBlockData); #endif #ifdef __cplusplus |