31 if (device == VK_NULL_HANDLE) {
32 throw mxvk::Exception(
"Cannot create shader module with a null device");
34 if (spv_bytes.empty() || (spv_bytes.size() % 4U) != 0U) {
38 VkShaderModuleCreateInfo create_info{};
39 create_info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
40 create_info.codeSize = spv_bytes.size();
41 create_info.pCode =
reinterpret_cast<const uint32_t *
>(spv_bytes.data());
43 VkShaderModule module = VK_NULL_HANDLE;
44 if (vkCreateShaderModule(device, &create_info,
nullptr, &module) != VK_SUCCESS) {