Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan: Don't do MoltenVK things on Asahi Linux #13050

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,24 +627,24 @@ bool ObjectCache::ValidatePipelineCache(const u8* data, size_t data_length)
return false;
}

if (header.vendor_id != g_vulkan_context->GetDeviceProperties().vendorID)
if (header.vendor_id != g_vulkan_context->GetDeviceInfo().vendorID)
{
ERROR_LOG_FMT(
VIDEO, "Pipeline cache failed validation: Incorrect vendor ID (file: {:#X}, device: {:#X})",
header.vendor_id, g_vulkan_context->GetDeviceProperties().vendorID);
header.vendor_id, g_vulkan_context->GetDeviceInfo().vendorID);
return false;
}

if (header.device_id != g_vulkan_context->GetDeviceProperties().deviceID)
if (header.device_id != g_vulkan_context->GetDeviceInfo().deviceID)
{
ERROR_LOG_FMT(
VIDEO, "Pipeline cache failed validation: Incorrect device ID (file: {:#X}, device: {:#X})",
header.device_id, g_vulkan_context->GetDeviceProperties().deviceID);
header.device_id, g_vulkan_context->GetDeviceInfo().deviceID);
return false;
}

if (std::memcmp(header.uuid, g_vulkan_context->GetDeviceProperties().pipelineCacheUUID,
VK_UUID_SIZE) != 0)
if (std::memcmp(header.uuid, g_vulkan_context->GetDeviceInfo().pipelineCacheUUID, VK_UUID_SIZE) !=
0)
{
ERROR_LOG_FMT(VIDEO, "Pipeline cache failed validation: Incorrect UUID");
return false;
Expand Down
12 changes: 4 additions & 8 deletions Source/Core/VideoBackends/Vulkan/VKMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ void VideoBackend::InitBackendInfo(const WindowSystemInfo& wsi)
device_index = 0;

VkPhysicalDevice gpu = gpu_list[device_index];
VkPhysicalDeviceProperties properties;
vkGetPhysicalDeviceProperties(gpu, &properties);
VkPhysicalDeviceFeatures features;
vkGetPhysicalDeviceFeatures(gpu, &features);
VulkanContext::PopulateBackendInfoFeatures(&g_Config, gpu, properties, features);
VulkanContext::PhysicalDeviceInfo properties(gpu);
VulkanContext::PopulateBackendInfoFeatures(&g_Config, gpu, properties);
VulkanContext::PopulateBackendInfoMultisampleModes(&g_Config, gpu, properties);
}
}
Expand Down Expand Up @@ -187,10 +184,9 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
// Since VulkanContext maintains a copy of the device features and properties, we can use this
// to initialize the backend information, so that we don't need to enumerate everything again.
VulkanContext::PopulateBackendInfoFeatures(&g_Config, g_vulkan_context->GetPhysicalDevice(),
g_vulkan_context->GetDeviceProperties(),
g_vulkan_context->GetDeviceFeatures());
g_vulkan_context->GetDeviceInfo());
VulkanContext::PopulateBackendInfoMultisampleModes(
&g_Config, g_vulkan_context->GetPhysicalDevice(), g_vulkan_context->GetDeviceProperties());
&g_Config, g_vulkan_context->GetPhysicalDevice(), g_vulkan_context->GetDeviceInfo());
g_Config.backend_info.bSupportsExclusiveFullscreen =
enable_surface && g_vulkan_context->SupportsExclusiveFullscreen(wsi, surface);

Expand Down
4 changes: 2 additions & 2 deletions Source/Core/VideoBackends/Vulkan/VKVertexManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ bool VertexManager::Initialize()
// Prefer an 8MB buffer if possible, but use less if the device doesn't support this.
// This buffer is potentially going to be addressed as R8s in the future, so we assume
// that one element is one byte.
const u32 texel_buffer_size = std::min(
TEXEL_STREAM_BUFFER_SIZE, g_vulkan_context->GetDeviceLimits().maxTexelBufferElements);
const u32 texel_buffer_size =
std::min(TEXEL_STREAM_BUFFER_SIZE, g_vulkan_context->GetDeviceInfo().maxTexelBufferElements);
m_texel_stream_buffer =
StreamBuffer::Create(VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, texel_buffer_size);
if (!m_texel_stream_buffer)
Expand Down
Loading