Fixes for macOS
This commit is contained in:
@@ -366,7 +366,7 @@ void GPUDeviceVulkan::GetInstanceLayersAndExtensions(Array<const char*>& outInst
|
||||
}
|
||||
|
||||
#if VK_EXT_debug_utils
|
||||
if (!vkTrace && outDebugUtils && FindLayerExtension(globalLayerExtensions, VK_EXT_DEBUG_UTILS_EXTENSION_NAME))
|
||||
if (!vkTrace && FindLayerExtension(globalLayerExtensions, VK_EXT_DEBUG_UTILS_EXTENSION_NAME))
|
||||
{
|
||||
outInstanceExtensions.Add(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
|
||||
}
|
||||
|
||||
@@ -270,6 +270,11 @@ bool GPUTextureVulkan::OnInit()
|
||||
imageInfo.usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
|
||||
if (useUAV)
|
||||
imageInfo.usage |= VK_IMAGE_USAGE_STORAGE_BIT;
|
||||
#if PLATFORM_MAC
|
||||
// MoltenVK: VK_ERROR_FEATURE_NOT_PRESENT: vkCreateImageView(): 2D views on 3D images can only be used as color attachments.
|
||||
if (IsVolume() && _desc.HasPerSliceViews())
|
||||
imageInfo.usage &= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
|
||||
#endif
|
||||
imageInfo.tiling = optimalTiling ? VK_IMAGE_TILING_OPTIMAL : VK_IMAGE_TILING_LINEAR;
|
||||
imageInfo.samples = (VkSampleCountFlagBits)MultiSampleLevel();
|
||||
// TODO: set initialLayout to VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL for IsRegularTexture() ???
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
void MacVulkanPlatform::GetInstanceExtensions(Array<const char*>& extensions, Array<const char*>& layers)
|
||||
{
|
||||
extensions.Add(VK_KHR_SURFACE_EXTENSION_NAME);
|
||||
extensions.Add(VK_MVK_MACOS_SURFACE_EXTENSION_NAME);
|
||||
}
|
||||
|
||||
|
||||
@@ -837,8 +837,8 @@ DragDropEffect MacWindow::DoDragDrop(const StringView& data)
|
||||
void MacWindow::SetCursor(CursorType type)
|
||||
{
|
||||
WindowBase::SetCursor(type);
|
||||
if (!_isMouseOver)
|
||||
return;
|
||||
//if (!_isMouseOver)
|
||||
// return;
|
||||
NSCursor* cursor = nullptr;
|
||||
switch (type)
|
||||
{
|
||||
@@ -875,6 +875,7 @@ void MacWindow::SetCursor(CursorType type)
|
||||
if (cursor)
|
||||
{
|
||||
[cursor set];
|
||||
[NSCursor unhide];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user