Get the vulkan backend working again (flutter/engine#39103)

* Enable Vulkan to be developed on macOS host

* Disables modern features as SSBOs are wired on Vulkan yet.
* Sub-optimal presentation mode must not be a fatal issue.
* Allow for shader outputs not to be consumed.

* remove enabling macOS
This commit is contained in:
Kaushik Iska
2023-01-25 13:51:16 -08:00
committed by GitHub
parent 0699029706
commit 68a9f036b7
2 changed files with 8 additions and 2 deletions

View File

@@ -40,6 +40,12 @@ VKAPI_ATTR VkBool32 VKAPI_CALL DebugUtilsMessengerCallback(
const auto prefix = impeller::vk::to_string(
impeller::vk::DebugUtilsMessageSeverityFlagBitsEXT{severity});
// There isn't stable messageIdNumber for this validation failure.
if (strstr(pCallbackData->pMessageIdName,
"CoreValidation-Shader-OutputNotConsumed") != nullptr) {
return VK_FALSE;
}
FML_DCHECK(false) << prefix << "[" << pCallbackData->messageIdNumber << "]["
<< pCallbackData->pMessageIdName
<< "] : " << pCallbackData->pMessage;
@@ -596,7 +602,7 @@ PixelFormat ContextVK::GetColorAttachmentPixelFormat() const {
}
const BackendFeatures& ContextVK::GetBackendFeatures() const {
return kModernBackendFeatures;
return kLegacyBackendFeatures;
}
vk::Queue ContextVK::GetGraphicsQueue() const {

View File

@@ -74,7 +74,7 @@ vk::PresentModeKHR SwapchainDetailsVK::PickPresentationMode() const {
}
}
VALIDATION_LOG << "Picking a sub-optimal presentation mode.";
FML_LOG(ERROR) << "Picking a sub-optimal presentation mode.";
// Vulkan spec dictates that FIFO is always available.
return vk::PresentModeKHR::eFifo;
}