mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 20:58:31 +09:00
[Fix] (MG_Backend/DirectVulkan): disable pipeline cache on PowerVR
This commit is contained in:
@@ -26,6 +26,10 @@
|
||||
#include <vulkan/vulkan_core.h>
|
||||
|
||||
namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
static Bool IsPowerVRDevice(const VkPhysicalDeviceProperties& properties) {
|
||||
return std::strstr(properties.deviceName, "PowerVR") != nullptr;
|
||||
}
|
||||
|
||||
static VkPipelineColorBlendAttachmentState MakeColorBlendAttachmentState(
|
||||
Bool blendEnable,
|
||||
VkBlendFactor srcColorBlendFactor,
|
||||
@@ -1762,6 +1766,11 @@ void main() {
|
||||
|
||||
const Uint32 maxProgramBindings = ComputeMaxProgramBindings(m_physicalDevice.properties);
|
||||
MGLOG_I("DirectVulkan: using %u program descriptor bindings", maxProgramBindings);
|
||||
if (IsPowerVRDevice(m_physicalDevice.properties)) {
|
||||
m_config.DisablePipelineCache = true;
|
||||
MGLOG_W("DirectVulkan: disabling pipeline cache on PowerVR device %s",
|
||||
m_physicalDevice.properties.deviceName);
|
||||
}
|
||||
|
||||
RecreateSwapchain();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user