Repository: libsdl-org/SDL
File: src/gpu/vulkan/SDL_gpu_vulkan.c (C)

Code before:
    VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE,
    VULKAN_TEXTURE_USAGE_MODE_COLOR_ATTACHMENT,
    VULKAN_TEXTURE_USAGE_MODE_DEPTH_STENCIL_ATTACHMENT,
    VULKAN_TEXTURE_USAGE_MODE_PRESENT
} VulkanTextureUsageMode;

typedef enum VulkanUniformBufferStage
{
    VULKAN_UNIFORM_BUFFER_STAGE_VERTEX,
    VULKAN_UNIFORM_BUFFER_STAGE_FRAGMENT,
    VULKAN_UNIFORM_BUFFER_STAGE_COMPUTE
} VulkanUniformBufferStage;

typedef struct VulkanFramebuffer
{
    VkFramebuffer framebuffer;
    SDL_AtomicInt referenceCount;
} VulkanFramebuffer;

typedef struct WindowData
{
    SDL_Window *window;
    SDL_GPUSwapchainComposition swapchainComposition;
    SDL_GPUPresentMode presentMode;
    bool needsSwapchainRecreate;
#ifdef SDL_PLATFORM_ANDROID
    bool needsSurfaceRecreate;
#endif
    Uint32 swapchainCreateWidth;
    Uint32 swapchainCreateHeight;

    // Window surface
    VkSurfaceKHR surface;

    // Swapchain for window surface
    VkSwapchainKHR swapchain;
    VkFormat format;
    VkColorSpaceKHR colorSpace;
    VkComponentMapping swapchainSwizzle;
    bool usingFallbackFormat;

    // Swapchain images
    VulkanTextureContainer *textureContainers; // use containers so that swapchain textures can use the same API as other textures
    Uint32 imageCount;
    Uint32 width;
    Uint32 height;

    // Synchronization primitives
    VkSemaphore imageAvailableSemaphore[MAX_FRAMES_IN_FLIGHT];
    VkSemaphore *renderFinishedSemaphore;
    SDL_GPUFence *inFlightFences[MAX_FRAMES_IN_FLIGHT];

Review comment (suggestion):
Go ahead and remove `#ifdef SDL_PLATFORM_ANDROID` from around the uses of this variable, except for when it's set below.

Code after:
    VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE,
    VULKAN_TEXTURE_USAGE_MODE_COLOR_ATTACHMENT,
    VULKAN_TEXTURE_USAGE_MODE_DEPTH_STENCIL_ATTACHMENT,
    VULKAN_TEXTURE_USAGE_MODE_PRESENT
} VulkanTextureUsageMode;

typedef enum VulkanUniformBufferStage
{
    VULKAN_UNIFORM_BUFFER_STAGE_VERTEX,
    VULKAN_UNIFORM_BUFFER_STAGE_FRAGMENT,
    VULKAN_UNIFORM_BUFFER_STAGE_COMPUTE
} VulkanUniformBufferStage;

typedef struct VulkanFramebuffer
{
    VkFramebuffer framebuffer;
    SDL_AtomicInt referenceCount;
} VulkanFramebuffer;

typedef struct WindowData
{
    SDL_Window *window;
    SDL_GPUSwapchainComposition swapchainComposition;
    SDL_GPUPresentMode presentMode;
    bool needsSwapchainRecreate;
    bool needsSurfaceRecreate;
    Uint32 swapchainCreateWidth;
    Uint32 swapchainCreateHeight;

    // Window surface
    VkSurfaceKHR surface;

    // Swapchain for window surface
    VkSwapchainKHR swapchain;
    VkFormat format;
    VkColorSpaceKHR colorSpace;
    VkComponentMapping swapchainSwizzle;
    bool usingFallbackFormat;

    // Swapchain images
    VulkanTextureContainer *textureContainers; // use containers so that swapchain textures can use the same API as other textures
    Uint32 imageCount;
    Uint32 width;
    Uint32 height;

    // Synchronization primitives
    VkSemaphore imageAvailableSemaphore[MAX_FRAMES_IN_FLIGHT];
    VkSemaphore *renderFinishedSemaphore;
    SDL_GPUFence *inFlightFences[MAX_FRAMES_IN_FLIGHT];

    Uint32 frameCounter;