pass = false;
}
}
-
- /* TODO: type match, etc */
+ else if (get_format_type(rpci->pAttachments[index].format) !=
+ get_fundamental_type(module, use.second.type_id)) {
+ if (log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VkDebugReportObjectTypeEXT(0), 0, __LINE__,
+ SHADER_CHECKER_INPUT_ATTACHMENT_TYPE_MISMATCH, "SC",
+ "Subpass input attachment %u format of %s does not match type used in shader `%s`",
+ use.first, string_VkFormat(rpci->pAttachments[index].format),
+ describe_type(module, use.second.type_id).c_str())) {
+ pass = false;
+ }
+ }
}
}
SHADER_CHECKER_FEATURE_NOT_ENABLED, // Shader uses capability requiring a feature not enabled on device
SHADER_CHECKER_BAD_CAPABILITY, // Shader uses capability not supported by Vulkan (OpenCL features)
SHADER_CHECKER_MISSING_INPUT_ATTACHMENT, // Shader uses an input attachment but not declared in subpass
+ SHADER_CHECKER_INPUT_ATTACHMENT_TYPE_MISMATCH, // Shader input attachment type does not match subpass format
};
// Device Limits ERROR codes