Tring to fix things
Some checks failed
Build VulkanEngine / nix (push) Has been cancelled
Build VulkanEngine / release (BUNDLE) (push) Has been cancelled
Build VulkanEngine / release (PORTABLE) (push) Has been cancelled
Build VulkanEngine / notify (push) Has been cancelled

This commit is contained in:
Alexandre 2026-10-09 23:17:15 +02:00
parent 4874a49aaa
commit e2a2833aae
5 changed files with 21 additions and 12 deletions

View File

@ -85,6 +85,7 @@ endif()
# Same in every mode: no link-time dependency on libvulkan, all Vulkan # Same in every mode: no link-time dependency on libvulkan, all Vulkan
# functions come from volk (otherwise vk*KHR aliases are undefined at link). # functions come from volk (otherwise vk*KHR aliases are undefined at link).
set(ENGINE_EXTRA_DEFINITIONS set(ENGINE_EXTRA_DEFINITIONS
GLFW_INCLUDE_NONE
VK_NO_PROTOTYPES VK_NO_PROTOTYPES
VMA_STATIC_VULKAN_FUNCTIONS=0 VMA_STATIC_VULKAN_FUNCTIONS=0
VMA_DYNAMIC_VULKAN_FUNCTIONS=1 VMA_DYNAMIC_VULKAN_FUNCTIONS=1

17
flake.lock generated
View File

@ -20,18 +20,15 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1790689126, "lastModified": 1791366222,
"narHash": "sha256-ilerN1WLSvF+HMjziC/Wv99J5y02maDH+6hZPwsORKg=", "narHash": "sha256-/4ezBOv6aldGab7qTb6ls3SDpgzG8kuuSqEAA9zEZ8E=",
"owner": "NixOS", "rev": "39ad350a0602fa0a58a544344e3e9187526ea45c",
"repo": "nixpkgs", "type": "tarball",
"rev": "b4fd65b198c599cbe814fcb9f42d25d021595ec9", "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1087089.39ad350a0602/nixexprs.tar.zst"
"type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "id": "nixpkgs",
"ref": "nixos-unstable", "type": "indirect"
"repo": "nixpkgs",
"type": "github"
} }
}, },
"root": { "root": {

View File

@ -2,7 +2,7 @@
description = "VulkanEngine development environment"; description = "VulkanEngine development environment";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
}; };
@ -88,6 +88,11 @@
"${pkgs.vulkan-validation-layers}"; "${pkgs.vulkan-validation-layers}";
shellHook = '' shellHook = ''
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [
pkgs.vulkan-loader
pkgs.wayland
pkgs.libxkbcommon
]}"
echo "VulkanEngine development environment" echo "VulkanEngine development environment"
echo "CMake: $(cmake --version | head -n1)" echo "CMake: $(cmake --version | head -n1)"
echo "Ninja: $(ninja --version)" echo "Ninja: $(ninja --version)"

View File

@ -22,7 +22,7 @@
#include <vulkan/vk_enum_string_helper.h> #include <vulkan/vk_enum_string_helper.h>
#include <vk_mem_alloc.h> #include <vk_mem_alloc.h>
#define GLFW_INCLUDE_NONE //#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
#define GLM_ENABLE_EXPERIMENTAL #define GLM_ENABLE_EXPERIMENTAL

View File

@ -774,10 +774,16 @@ void Engine::initVulkan() {
volkLoadDevice(_device); volkLoadDevice(_device);
VmaVulkanFunctions vmaFuncs{
.vkGetInstanceProcAddr = vkGetInstanceProcAddr, // Volk pointers
.vkGetDeviceProcAddr = vkGetDeviceProcAddr
};
VmaAllocatorCreateInfo allocatorInfo = { VmaAllocatorCreateInfo allocatorInfo = {
.flags = VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT, .flags = VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT,
.physicalDevice = _choosenGPU, .physicalDevice = _choosenGPU,
.device = _device, .device = _device,
.pVulkanFunctions = &vmaFuncs,
.instance = _instance .instance = _instance
}; };