Files
mafiesto4 5dac5d3f2d Refactor GPU Debug Layers to be manually activated with -gpudebug
Debug builds don't activate it by default. Can be sued in both Debug and Development builds.
`GPU_ENABLE_DIAGNOSTICS` renamed to `GPU_ENABLE_DEBUG_LAYER`
`GPU_ENABLE_WINDOW_SRV` renamed to `GPU_ENABLE_WINDOW_SRV`
`GPU_USE_SHADERS_DEBUG_LAYER` renamed to `GPU_ENABLE_SHADERS_DEBUG_LAYER`
2026-05-19 15:26:01 +02:00

64 lines
1.6 KiB
C

// Copyright (c) Wojciech Figat. All rights reserved.
#pragma once
#include "IncludeVulkanHeaders.h"
#if GRAPHICS_API_VULKAN
// Per platform configuration
#include "VulkanPlatform.h"
// Vulkan API version to target
#ifndef VULKAN_API_VERSION
#define VULKAN_API_VERSION VK_API_VERSION_1_0
#endif
// Amount of back buffers to use
#ifndef VULKAN_BACK_BUFFERS_COUNT
#define VULKAN_BACK_BUFFERS_COUNT 2
#endif
#ifndef VULKAN_BACK_BUFFERS_COUNT_MAX
#define VULKAN_BACK_BUFFERS_COUNT_MAX 4
#endif
/// <summary>
/// Default amount of frames to wait until resource delete.
/// </summary>
#define VULKAN_RESOURCE_DELETE_SAFE_FRAMES_COUNT 20
#define VULKAN_ENABLE_API_DUMP 0
#define VULKAN_RESET_QUERY_POOLS 1
#define VULKAN_HASH_POOLS_WITH_LAYOUT_TYPES 1
#define VULKAN_USE_DEBUG_LAYER GPU_ENABLE_DEBUG_LAYER
#define VULKAN_USE_DEBUG_DATA (GPU_ENABLE_DEBUG_LAYER && COMPILE_WITH_DEV_ENV)
#ifndef VULKAN_USE_PIPELINE_CACHE
#define VULKAN_USE_PIPELINE_CACHE 1
#endif
#ifndef VULKAN_USE_VALIDATION_CACHE
#ifdef VK_EXT_validation_cache
#define VULKAN_USE_VALIDATION_CACHE VK_EXT_validation_cache
#else
#define VULKAN_USE_VALIDATION_CACHE 0
#endif
#endif
#ifndef VULKAN_USE_TIMER_QUERIES
#define VULKAN_USE_TIMER_QUERIES 1
#endif
// Fence wait operation timeout in seconds
#ifndef VULKAN_WAIT_TIMEOUT
#define VULKAN_WAIT_TIMEOUT 5.0f
#endif
// Toggles GPUTimerQueryVulkan to use BeginQuery/EndQuery via GPuContext rather than old custom implementation
#define GPU_VULKAN_QUERY_NEW 1
// Toggles pausing and resuming all GPU timer queries when command buffer is being flushed (for more exact timings)
#define GPU_VULKAN_PAUSE_QUERIES 0
#endif