MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / load_shader

Method load_shader

framework/api_vulkan_sample.cpp:444–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444VkPipelineShaderStageCreateInfo ApiVulkanSample::load_shader(const std::string &file, VkShaderStageFlagBits stage)
445{
446 VkPipelineShaderStageCreateInfo shader_stage = {};
447 shader_stage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
448 shader_stage.stage = stage;
449 shader_stage.module = vkb::load_shader(file.c_str(), get_device().get_handle(), stage);
450 shader_stage.pName = "main";
451 assert(shader_stage.module != VK_NULL_HANDLE);
452 shader_modules.push_back(shader_stage.module);
453 return shader_stage;
454}
455
456VkPipelineShaderStageCreateInfo ApiVulkanSample::load_shader(const std::string &sample_folder_name, const std::string &shader_filename, VkShaderStageFlagBits stage)
457{

Callers

nothing calls this directly

Calls 2

load_shaderFunction · 0.50
get_handleMethod · 0.45

Tested by

no test coverage detected