diff options
| author | lizzie <lizzie@eden-emu.dev> | 2026-06-04 05:49:07 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-06-04 05:49:07 +0200 |
| commit | 89199f4d279bff0c664fb9142b1945d0c6d93ee8 (patch) | |
| tree | f7223e46b4d1ecf0355adc5fc9363bae093dcf89 /src/video_core/vulkan_common | |
| parent | 978d9d935d50fd09af5c6173582b1d63792900bd (diff) | |
[*] basic in-house cpp linting (#4039)
- add `#pragma once` to remainder files
- "correcter" defines (ANDROID), see https://groups.google.com/g/android-ndk/c/cf9_f1SLXls
- extra miscelly fixups
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4039
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
Diffstat (limited to 'src/video_core/vulkan_common')
4 files changed, 7 insertions, 7 deletions
diff --git a/src/video_core/vulkan_common/vulkan_debug_callback.cpp b/src/video_core/vulkan_common/vulkan_debug_callback.cpp index d1bd009c8f..8d59a74a30 100644 --- a/src/video_core/vulkan_common/vulkan_debug_callback.cpp +++ b/src/video_core/vulkan_common/vulkan_debug_callback.cpp @@ -27,7 +27,7 @@ VkBool32 DebugUtilCallback(VkDebugUtilsMessageSeverityFlagBitsEXT severity, [[maybe_unused]] void* user_data) { // Skip logging known false-positive validation errors switch (static_cast<u32>(data->messageIdNumber)) { -#ifdef ANDROID +#ifdef __ANDROID__ case 0xbf9cf353u: // VUID-vkCmdBindVertexBuffers2-pBuffers-04111 // The below are due to incorrect reporting of extendedDynamicState case 0x1093bebbu: // VUID-vkCmdSetCullMode-None-03384 diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 59985067db..bb80895b97 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -26,7 +26,7 @@ #include "video_core/vulkan_common/vulkan_wrapper.h" #include "video_core/gpu_logging/gpu_logging.h" -#if defined(ANDROID) && defined(ARCHITECTURE_arm64) +#if defined(__ANDROID__) && defined(ARCHITECTURE_arm64) #include <adrenotools/bcenabler.h> #include <android/api-level.h> #endif @@ -294,7 +294,7 @@ ankerl::unordered_dense::map<VkFormat, VkFormatProperties> GetFormatProperties(v return format_properties; } -#if defined(ANDROID) && defined(ARCHITECTURE_arm64) +#if defined(__ANDROID__) && defined(ARCHITECTURE_arm64) void OverrideBcnFormats(ankerl::unordered_dense::map<VkFormat, VkFormatProperties>& format_properties) { // These properties are extracted from Adreno driver 512.687.0 constexpr VkFormatFeatureFlags tiling_features{VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT | @@ -504,7 +504,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR features.shader_atomic_int64.shaderSharedInt64Atomics = false; features.features.shaderInt64 = false; -#if defined(ANDROID) && defined(ARCHITECTURE_arm64) +#if defined(__ANDROID__) && defined(ARCHITECTURE_arm64) // BCn patching only safe on Android 9+ (API 28+). Older versions crash on driver load. const auto major = (properties.properties.driverVersion >> 24) << 2; const auto minor = (properties.properties.driverVersion >> 12) & 0xFFFU; diff --git a/src/video_core/vulkan_common/vulkan_library.cpp b/src/video_core/vulkan_common/vulkan_library.cpp index 271b622e65..d174a9d3c8 100644 --- a/src/video_core/vulkan_common/vulkan_library.cpp +++ b/src/video_core/vulkan_common/vulkan_library.cpp @@ -16,7 +16,7 @@ namespace Vulkan { std::shared_ptr<Common::DynamicLibrary> OpenLibrary( [[maybe_unused]] Core::Frontend::GraphicsContext* context) { LOG_DEBUG(Render_Vulkan, "Looking for a Vulkan library"); -#if defined(ANDROID) && defined(ARCHITECTURE_arm64) +#if defined(__ANDROID__) && defined(ARCHITECTURE_arm64) // Android manages its Vulkan driver from the frontend. return context->GetDriverLibrary(); #else diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h index 860cdff20e..87870893c5 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.h +++ b/src/video_core/vulkan_common/vulkan_wrapper.h @@ -453,7 +453,7 @@ public: return handle != Type{}; } -#ifndef ANDROID +#ifndef __ANDROID__ /** * Releases ownership of the managed handle. * The caller is responsible for managing the lifetime of the returned handle. @@ -535,7 +535,7 @@ public: return handle != Type{}; } -#ifndef ANDROID +#ifndef __ANDROID__ /** * Releases ownership of the managed handle. * The caller is responsible for managing the lifetime of the returned handle. |
