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

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));
std::memcpy(data.get(), code_data, code_size);
VkShaderModuleCreateInfo ci;
ci.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
ci.pNext = nullptr;
ci.flags = 0;
ci.codeSize = code_size;
ci.pCode = data.get();
return device.GetLogical().CreateShaderModule(ci);
return device.GetLogical().CreateShaderModule({
.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,
.pNext = nullptr,
.flags = 0,
.codeSize = code_size,
.pCode = data.get(),
});
}
} // namespace Vulkan