Last active
February 16, 2022 10:04
-
-
Save matwey/ca7cd778d35f8b41f013e40df4c6aac2 to your computer and use it in GitHub Desktop.
vulkan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vulkan/vulkan.h> | |
#include "sample.h" | |
int main(int argc, char** argv) { | |
VkResult result = VK_SUCCESS; | |
VkApplicationInfo app_info{}; | |
VkInstanceCreateInfo create_info{}; | |
app_info.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; | |
app_info.pNext = nullptr; | |
app_info.pApplicationName = "Application"; | |
app_info.applicationVersion = 1; | |
app_info.pEngineName = nullptr; | |
app_info.engineVersion = 0; | |
app_info.apiVersion = VK_MAKE_VERSION(1, 1, 0); | |
create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; | |
create_info.pNext = nullptr; | |
create_info.flags = 0; | |
create_info.pApplicationInfo = &app_info; | |
create_info.enabledLayerCount = 0; | |
create_info.ppEnabledLayerNames = nullptr; | |
create_info.enabledExtensionCount = 0; | |
create_info.ppEnabledExtensionNames = nullptr; | |
VkInstance instance; | |
result = vkCreateInstance(&create_info, nullptr, &instance); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkCreateInstance " << result << std::endl; | |
return 1; | |
} | |
// vkEnumeratePhysicalDevices(instance, &phys_dev_count, nullptr); | |
VkPhysicalDevice phys_devs[10]; | |
uint32_t phys_dev_count = sizeof(phys_devs) / sizeof(phys_devs[0]); | |
result = vkEnumeratePhysicalDevices(instance, &phys_dev_count, phys_devs); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkEnumeratePhysicalDevices " << result << std::endl; | |
return 1; | |
} | |
for (uint32_t i = 0; i < phys_dev_count; ++i) { | |
VkPhysicalDeviceProperties props{}; | |
vkGetPhysicalDeviceProperties(phys_devs[i], &props); | |
std::cerr << "================" << std::endl; | |
std::cerr << "Device " << i << " " << props.deviceName << std::endl; | |
VkPhysicalDeviceMemoryProperties mem_props{}; | |
vkGetPhysicalDeviceMemoryProperties(phys_devs[i], &mem_props); | |
for (uint32_t i = 0; i < mem_props.memoryTypeCount; ++i) { | |
const auto& memory_type = mem_props.memoryTypes[i]; | |
std::cerr << memory_type.propertyFlags << " " << memory_type.heapIndex << std::endl; | |
} | |
for (uint32_t i = 0; i < mem_props.memoryHeapCount; ++i) { | |
const auto& memory_heap = mem_props.memoryHeaps[i]; | |
std::cerr << i << " " << memory_heap.size << std::endl; | |
} | |
VkQueueFamilyProperties queue_families[10]; | |
uint32_t queue_families_count = sizeof(queue_families) / sizeof(queue_families[0]); | |
vkGetPhysicalDeviceQueueFamilyProperties(phys_devs[i], &queue_families_count, queue_families); | |
for (uint32_t j = 0; j < queue_families_count; ++j) { | |
const auto& queue = queue_families[j]; | |
std::cerr << queue.queueFlags << " " << queue.queueCount << std::endl; | |
} | |
} | |
VkDeviceQueueCreateInfo queue_create_info{}; | |
queue_create_info.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; | |
queue_create_info.pNext = nullptr; | |
queue_create_info.flags = 0; | |
queue_create_info.queueFamilyIndex = 0; | |
queue_create_info.queueCount = 1; | |
queue_create_info.pQueuePriorities = nullptr; | |
VkPhysicalDeviceFeatures required_features{}; | |
VkDeviceCreateInfo dev_create_info{}; | |
dev_create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; | |
dev_create_info.pNext = nullptr; | |
dev_create_info.flags = 0; | |
dev_create_info.queueCreateInfoCount = 1; | |
dev_create_info.pQueueCreateInfos = &queue_create_info; | |
dev_create_info.enabledLayerCount = 0; | |
dev_create_info.ppEnabledLayerNames = nullptr; | |
dev_create_info.enabledExtensionCount = 0; | |
dev_create_info.ppEnabledExtensionNames = nullptr; | |
dev_create_info.pEnabledFeatures = &required_features; | |
VkDevice device; | |
result = vkCreateDevice(phys_devs[0], &dev_create_info, nullptr, &device); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkCreateDevice " << result << std::endl; | |
return 1; | |
} | |
VkShaderModuleCreateInfo shader_create_info{}; | |
shader_create_info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; | |
shader_create_info.pNext = nullptr; | |
shader_create_info.flags = 0; | |
shader_create_info.codeSize = sample_spv_len; | |
shader_create_info.pCode = reinterpret_cast<const uint32_t*>(sample_spv); | |
VkShaderModule shader; | |
result = vkCreateShaderModule(device, &shader_create_info, nullptr, &shader); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkCreateShaderModule " << result << std::endl; | |
return 1; | |
} | |
VkBufferCreateInfo buffer_create_info{}; | |
buffer_create_info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; | |
buffer_create_info.pNext = nullptr; | |
buffer_create_info.flags = 0; | |
buffer_create_info.size = 4 * 16 * 16; | |
buffer_create_info.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; | |
buffer_create_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE; | |
buffer_create_info.queueFamilyIndexCount = 0; | |
buffer_create_info.pQueueFamilyIndices = nullptr; | |
VkBuffer buffer; | |
result = vkCreateBuffer(device, &buffer_create_info, nullptr, &buffer); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkCreateBuffer " << result << std::endl; | |
return 1; | |
} | |
VkMemoryRequirements memory_req; | |
vkGetBufferMemoryRequirements(device, buffer, &memory_req); | |
std::cout << "Memory " << memory_req.size << " align " << memory_req.alignment << std::endl; | |
VkMemoryAllocateInfo allocate_info{}; | |
allocate_info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; | |
allocate_info.pNext = nullptr; | |
allocate_info.allocationSize = memory_req.size; | |
allocate_info.memoryTypeIndex = 0; | |
VkDeviceMemory memory; | |
result = vkAllocateMemory(device, &allocate_info, nullptr, &memory); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkAllocateMemory " << result << std::endl; | |
return 1; | |
} | |
result = vkBindBufferMemory(device, buffer, memory, 0); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkBindBufferMemory " << result << std::endl; | |
return 1; | |
} | |
VkDescriptorPoolSize pool_size{}; | |
pool_size.type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; | |
pool_size.descriptorCount = 1; | |
VkDescriptorPoolCreateInfo dpool_create_info{}; | |
dpool_create_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; | |
dpool_create_info.pNext = nullptr; | |
dpool_create_info.flags = 0; | |
dpool_create_info.maxSets = 1; | |
dpool_create_info.poolSizeCount = 1; | |
dpool_create_info.pPoolSizes = &pool_size; | |
VkDescriptorPool descriptor_pool; | |
result = vkCreateDescriptorPool(device, &dpool_create_info, nullptr, &descriptor_pool); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkCreateDescriptorPool " << result << std::endl; | |
return 1; | |
} | |
VkDescriptorSetLayoutBinding set_layout_binding{}; | |
set_layout_binding.binding = 0; | |
set_layout_binding.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; | |
set_layout_binding.descriptorCount = 1; | |
set_layout_binding.stageFlags = VK_SHADER_STAGE_ALL; | |
set_layout_binding.pImmutableSamplers = nullptr; | |
VkDescriptorSetLayoutCreateInfo set_create_info{}; | |
set_create_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; | |
set_create_info.pNext = nullptr; | |
set_create_info.flags = 0; | |
set_create_info.bindingCount = 1; | |
set_create_info.pBindings = &set_layout_binding; | |
VkDescriptorSetLayout set_layouts[1]; | |
result = vkCreateDescriptorSetLayout(device, &set_create_info, nullptr, &set_layouts[0]); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkCreateDescriptorSetLayout " << result << std::endl; | |
return 1; | |
} | |
VkPipelineLayoutCreateInfo layout_create_info{}; | |
layout_create_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; | |
layout_create_info.pNext = nullptr; | |
layout_create_info.flags = 0; | |
layout_create_info.setLayoutCount = 1; | |
layout_create_info.pSetLayouts = set_layouts; | |
layout_create_info.pushConstantRangeCount = 0; | |
layout_create_info.pPushConstantRanges = nullptr; | |
VkPipelineLayout pipeline_layout; | |
result = vkCreatePipelineLayout(device, &layout_create_info, nullptr, &pipeline_layout); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkCreatePipelineLayout " << result << std::endl; | |
return 1; | |
} | |
VkDescriptorSetAllocateInfo set_allocate_info{}; | |
set_allocate_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; | |
set_allocate_info.pNext = nullptr; | |
set_allocate_info.descriptorPool = descriptor_pool; | |
set_allocate_info.descriptorSetCount = 1; | |
set_allocate_info.pSetLayouts = &set_layouts[0]; | |
VkDescriptorSet descriptor_set; | |
result = vkAllocateDescriptorSets(device, &set_allocate_info, &descriptor_set); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkAllocateDescriptorSets " << result << std::endl; | |
return 1; | |
} | |
VkDescriptorBufferInfo buffer_info{}; | |
buffer_info.buffer = buffer; | |
buffer_info.offset = 0; | |
buffer_info.range = VK_WHOLE_SIZE; | |
VkWriteDescriptorSet descriptor_write{}; | |
descriptor_write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; | |
descriptor_write.pNext = nullptr; | |
descriptor_write.dstSet = descriptor_set; | |
descriptor_write.dstBinding = 0; | |
descriptor_write.dstArrayElement = 0; | |
descriptor_write.descriptorCount = 1; | |
descriptor_write.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; | |
descriptor_write.pImageInfo = nullptr; | |
descriptor_write.pBufferInfo = &buffer_info; | |
descriptor_write.pTexelBufferView = nullptr; | |
vkUpdateDescriptorSets(device, 1, &descriptor_write, 0, nullptr); | |
VkComputePipelineCreateInfo compute_create_info{}; | |
compute_create_info.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO; | |
compute_create_info.pNext = nullptr; | |
compute_create_info.flags = 0; | |
compute_create_info.stage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; | |
compute_create_info.stage.pNext = nullptr; | |
compute_create_info.stage.flags = 0; | |
compute_create_info.stage.stage = VK_SHADER_STAGE_COMPUTE_BIT; | |
compute_create_info.stage.module = shader; | |
compute_create_info.stage.pName = "main"; | |
compute_create_info.stage.pSpecializationInfo = nullptr; | |
compute_create_info.layout = pipeline_layout; | |
compute_create_info.basePipelineHandle = VK_NULL_HANDLE; | |
compute_create_info.basePipelineIndex = 0; | |
VkPipeline pipeline; | |
result = vkCreateComputePipelines(device, VK_NULL_HANDLE, 1, &compute_create_info, nullptr, &pipeline); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkCreateComputePipelines " << result << std::endl; | |
return 1; | |
} | |
VkQueue q; | |
vkGetDeviceQueue(device, 0, 0, &q); | |
if (q == VK_NULL_HANDLE) { | |
std::cerr << "vkGetDeviceQueue" << std::endl; | |
return 1; | |
} | |
VkCommandPoolCreateInfo pool_create_info{}; | |
pool_create_info.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; | |
pool_create_info.pNext = nullptr; | |
pool_create_info.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; | |
pool_create_info.queueFamilyIndex = 0; | |
VkCommandPool pool; | |
result = vkCreateCommandPool(device, &pool_create_info, nullptr, &pool); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkCreateCommandPool " << result << std::endl; | |
return 1; | |
} | |
VkCommandBufferAllocateInfo cb_allocate_info{}; | |
cb_allocate_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; | |
cb_allocate_info.pNext = nullptr; | |
cb_allocate_info.commandPool = pool; | |
cb_allocate_info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; | |
cb_allocate_info.commandBufferCount = 1; | |
VkCommandBuffer cb; | |
result = vkAllocateCommandBuffers(device, &cb_allocate_info, &cb); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkAllocateCommandBuffers " << result << std::endl; | |
return 1; | |
} | |
VkCommandBufferBeginInfo begin_info{}; | |
begin_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; | |
begin_info.pNext = nullptr; | |
begin_info.flags = 0; | |
begin_info.pInheritanceInfo = nullptr; | |
result = vkBeginCommandBuffer(cb, &begin_info); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkBeginCommandBuffer " << result << std::endl; | |
return 1; | |
} | |
vkCmdBindPipeline(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline); | |
vkCmdBindDescriptorSets(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_layout, 0, 1, &descriptor_set, 0, nullptr); | |
vkCmdDispatch(cb, 16, 1, 1); | |
result = vkEndCommandBuffer(cb); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkEndCommandBuffer " << result << std::endl; | |
return 1; | |
} | |
vkDestroyDescriptorSetLayout(device, set_layouts[0], nullptr); | |
vkDestroyPipelineLayout(device, pipeline_layout, nullptr); | |
vkDestroyShaderModule(device, shader, nullptr); | |
VkSubmitInfo submit_info{}; | |
submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; | |
submit_info.pNext = nullptr; | |
submit_info.waitSemaphoreCount = 0; | |
submit_info.pWaitSemaphores = nullptr; | |
submit_info.pWaitDstStageMask = nullptr; | |
submit_info.signalSemaphoreCount = 0; | |
submit_info.pSignalSemaphores = nullptr; | |
submit_info.commandBufferCount = 1; | |
submit_info.pCommandBuffers = &cb; | |
result = vkQueueSubmit(q, 1, &submit_info, VK_NULL_HANDLE); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkQueueSubmit " << result << std::endl; | |
return 1; | |
} | |
result = vkDeviceWaitIdle(device); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkDeviceWaitIdle " << result << std::endl; | |
return 1; | |
} | |
void* data = nullptr; | |
result = vkMapMemory(device, memory, 0, VK_WHOLE_SIZE, 0, &data); | |
if (result != VK_SUCCESS) { | |
std::cerr << "vkMapMemory " << result << std::endl; | |
return 1; | |
} | |
for (int i = 0; i < 16*16; ++i) { | |
const float* it = static_cast<float*>(data) + i; | |
std::cout << *it << std::endl; | |
} | |
/* vkDestroyCommandPool would also free all buffers */ | |
vkFreeCommandBuffers(device, pool, 1, &cb); | |
vkDestroyCommandPool(device, pool, nullptr); | |
vkDestroyPipeline(device, pipeline, nullptr); | |
vkDestroyDescriptorPool(device, descriptor_pool, nullptr); | |
vkDestroyBuffer(device, buffer, nullptr); | |
vkFreeMemory(device, memory, nullptr); | |
vkDestroyDevice(device, nullptr); | |
vkDestroyInstance(instance, nullptr); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 450 core | |
layout (local_size_x = 16, local_size_y = 1, local_size_z = 1) in; | |
layout (set = 0, binding = 0) buffer data_buffer_t { | |
float val[]; | |
} data_buffer; | |
/* | |
uvec3 gl_NumWorkGroups; | |
uvec3 gl_WorkGroupSize; | |
uvec3 gl_WorkGroupID; | |
uvec3 gl_LocalInvocationID; | |
uvec3 gl_GlobalInvocationID; | |
uint gl_LocalInvocationIndex; | |
*/ | |
void main(void) { | |
data_buffer.val[gl_GlobalInvocationID.x] = gl_LocalInvocationID.x; | |
// Hello, world! | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned char sample_spv[] = { | |
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x08, 0x00, | |
0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, | |
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, | |
0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, | |
0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, | |
0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x05, 0x00, 0x00, 0x00, | |
0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, | |
0x10, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x10, 0x00, 0x06, 0x00, | |
0x04, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, | |
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, | |
0x02, 0x00, 0x00, 0x00, 0xc2, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, | |
0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, | |
0x05, 0x00, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x64, 0x61, 0x74, 0x61, | |
0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x74, 0x00, 0x00, 0x00, | |
0x06, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
0x76, 0x61, 0x6c, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x00, 0x00, | |
0x64, 0x61, 0x74, 0x61, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x00, | |
0x05, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x47, | |
0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, | |
0x69, 0x6f, 0x6e, 0x49, 0x44, 0x00, 0x00, 0x00, 0x05, 0x00, 0x08, 0x00, | |
0x15, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x4c, 0x6f, 0x63, 0x61, 0x6c, | |
0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, | |
0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, | |
0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, | |
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, | |
0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x08, 0x00, 0x00, 0x00, | |
0x03, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00, | |
0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, | |
0x0a, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
0x47, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, | |
0x1c, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x15, 0x00, 0x00, 0x00, | |
0x0b, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, | |
0x1d, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, | |
0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, | |
0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, | |
0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x03, 0x00, | |
0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, | |
0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, | |
0x09, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, | |
0x3b, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, | |
0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, | |
0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, | |
0x0b, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
0x15, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, | |
0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, | |
0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, | |
0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, | |
0x3b, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, | |
0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, | |
0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, | |
0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, | |
0x3b, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, | |
0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x19, 0x00, 0x00, 0x00, | |
0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, | |
0x0d, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, | |
0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, | |
0x01, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x00, 0x00, | |
0x1d, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, | |
0x1c, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, | |
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, | |
0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, | |
0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, | |
0x11, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, | |
0x14, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, | |
0x12, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, | |
0x11, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, | |
0x17, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x70, 0x00, 0x04, 0x00, | |
0x06, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, | |
0x41, 0x00, 0x06, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, | |
0x0a, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, | |
0x3e, 0x00, 0x03, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, | |
0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00 | |
}; | |
unsigned int sample_spv_len = 860; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment