コード例 #1
0
ファイル: vksBuffer.cs プロジェクト: bitzhuwei/vk.other
        /**
         * Invalidate a memory range of the buffer to make it visible to the host
         *
         * @note Only required for non-coherent memory
         *
         * @param size (Optional) Size of the memory range to invalidate. Pass WholeSize to invalidate the complete buffer range.
         * @param offset (Optional) Byte offset from beginning
         *
         * @return VkResult of the invalidate call
         */
        public VkResult invalidate(VkDeviceSize size = WholeSize, VkDeviceSize offset = 0)
        {
            VkMappedMemoryRange mappedRange = VkMappedMemoryRange.New();

            mappedRange.memory = memory;
            mappedRange.offset = offset;
            mappedRange.size   = size;
            return(vkInvalidateMappedMemoryRanges(device, 1, &mappedRange));
        }
コード例 #2
0
ファイル: Initializers.cs プロジェクト: gomson/vk
        public static VkMappedMemoryRange mappedMemoryRange()
        {
            VkMappedMemoryRange mappedMemoryRange = VkMappedMemoryRange.New();

            return(mappedMemoryRange);
        }