vk_shader_util: Make use of designated initializers where applicable

This commit is contained in:
Lioncash 2020-07-16 19:17:41 -04:00
parent 97e7663004
commit 2025f847bb
1 changed files with 7 additions and 7 deletions

View File

@ -19,13 +19,13 @@ vk::ShaderModule BuildShader(const VKDevice& device, std::size_t code_size, cons
const auto data = std::make_unique<u32[]>(code_size / sizeof(u32)); const auto data = std::make_unique<u32[]>(code_size / sizeof(u32));
std::memcpy(data.get(), code_data, code_size); std::memcpy(data.get(), code_data, code_size);
VkShaderModuleCreateInfo ci; return device.GetLogical().CreateShaderModule({
ci.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; .sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,
ci.pNext = nullptr; .pNext = nullptr,
ci.flags = 0; .flags = 0,
ci.codeSize = code_size; .codeSize = code_size,
ci.pCode = data.get(); .pCode = data.get(),
return device.GetLogical().CreateShaderModule(ci); });
} }
} // namespace Vulkan } // namespace Vulkan