diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles2/shaders/scene.glsl | 3 | ||||
-rw-r--r-- | drivers/unix/ip_unix.cpp | 3 | ||||
-rw-r--r-- | drivers/vulkan/vulkan_context.cpp | 13 |
3 files changed, 11 insertions, 8 deletions
diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index 84aadcbbc3..b720c71cec 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -1128,7 +1128,8 @@ float SchlickFresnel(float u) { } float GTR1(float NdotH, float a) { - if (a >= 1.0) return 1.0 / M_PI; + if (a >= 1.0) + return 1.0 / M_PI; float a2 = a * a; float t = 1.0 + (a2 - 1.0) * NdotH * NdotH; return (a2 - 1.0) / (M_PI * log(a2) * t); diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index 5e3dedfc2f..56be9a2f74 100644 --- a/drivers/unix/ip_unix.cpp +++ b/drivers/unix/ip_unix.cpp @@ -248,7 +248,8 @@ void IP_Unix::get_local_interfaces(Map<String, Interface_Info> *r_interfaces) co info.ip_addresses.push_front(_sockaddr2ip(ifa->ifa_addr)); } - if (ifAddrStruct != nullptr) freeifaddrs(ifAddrStruct); + if (ifAddrStruct != nullptr) + freeifaddrs(ifAddrStruct); } #endif diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index d293abdee3..a7eb3e53b9 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -601,12 +601,13 @@ Error VulkanContext::_initialize_queues(VkSurfaceKHR surface) { _create_device(); static PFN_vkGetDeviceProcAddr g_gdpa = nullptr; -#define GET_DEVICE_PROC_ADDR(dev, entrypoint) \ - { \ - if (!g_gdpa) g_gdpa = (PFN_vkGetDeviceProcAddr)vkGetInstanceProcAddr(inst, "vkGetDeviceProcAddr"); \ - fp##entrypoint = (PFN_vk##entrypoint)g_gdpa(dev, "vk" #entrypoint); \ - ERR_FAIL_COND_V_MSG(fp##entrypoint == nullptr, ERR_CANT_CREATE, \ - "vkGetDeviceProcAddr failed to find vk" #entrypoint); \ +#define GET_DEVICE_PROC_ADDR(dev, entrypoint) \ + { \ + if (!g_gdpa) \ + g_gdpa = (PFN_vkGetDeviceProcAddr)vkGetInstanceProcAddr(inst, "vkGetDeviceProcAddr"); \ + fp##entrypoint = (PFN_vk##entrypoint)g_gdpa(dev, "vk" #entrypoint); \ + ERR_FAIL_COND_V_MSG(fp##entrypoint == nullptr, ERR_CANT_CREATE, \ + "vkGetDeviceProcAddr failed to find vk" #entrypoint); \ } GET_DEVICE_PROC_ADDR(device, CreateSwapchainKHR); |