Skip to content

vkr: implement in-place dispatching of blob args

Juston Li requested to merge justonli/virglrenderer:vkr-in-place-dispatch into main

Instead of temporarily allocating blob arrays for dispatching and then copying to/from shmem, directly pass the offset in the decoder/encoder where the blob is located or will be written for dispatching; saving the extra memory use and copy.

Currently vkGetPipelineCache and vkGetQueryPoolResults have such blob outputs.

vkCmdUpdateBuffer, vkCmdPushConstants, vkCreatePipelineCache, VkWriteDescriptorSetInlineUniformBlock, and commands with VkSpecializationInfo have such blob inputs.

Split up protocol syncs from venus-protocol!85 (merged) to make reviewing easier:

  • Patch 1 adds helper for getting the shmem address. (Just adds the cur and offset that was passed in with a size check) and makes memcpy explicitly skip if copying is not needed.
  • Patch 2 syncs protocol adding sizeof helpers for calculating the offset of where output args should land in the encoder
  • Patch 3 syncs protocol implementing the in-place arg address setting for calls with blob arrays.


Rise of the tomb raider

dEQP mustpass vk-default.txt
Edited by Juston Li

Merge request reports