Skip to content

Commit 117c68f

Browse files
Raelrjonjondev
authored andcommitted
Fixed VK_KHR_portability_enumeration error on MacOS
1 parent 5e22c2e commit 117c68f

File tree

1 file changed

+9
-2
lines changed
  • engine/render/renderer/platform/vulkan

1 file changed

+9
-2
lines changed

engine/render/renderer/platform/vulkan/Config.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,21 @@
1212
#include <utils/collections/StackArray.h>
1313
#include <volk/volk.h>
1414

15+
#ifdef __APPLE__
16+
#define EXTENSIONS_COUNT 3
17+
#define OS_EXTENSIONS , "VK_KHR_portability_subset"
18+
#else
19+
#define EXTENSIONS_COUNT 2
20+
#define OS_EXTENSIONS
21+
#endif
22+
1523
namespace Siege::Vulkan
1624
{
1725
class Config
1826
{
1927
public:
2028

2129
static constexpr uint32_t VALIDATION_LAYERS_COUNT = 1;
22-
static constexpr uint32_t EXTENSIONS_COUNT = 2;
2330

2431
/**
2532
* An array storing all required validation layers (if enabled).
@@ -33,7 +40,7 @@ class Config
3340
**/
3441
static constexpr SArray<const char*, EXTENSIONS_COUNT> deviceExtensions = {
3542
VK_KHR_SWAPCHAIN_EXTENSION_NAME,
36-
VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME};
43+
VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME OS_EXTENSIONS};
3744
};
3845
} // namespace Siege::Vulkan
3946

0 commit comments

Comments
 (0)