Move the Vulkan loader

This commit is contained in:
2025-04-08 23:18:47 +02:00
parent d10e76d5a1
commit 921d1811ec
8 changed files with 36 additions and 12 deletions

View File

@ -17,7 +17,7 @@ cc_binary(
"@asl//asl/types:option",
"@asl//asl/containers:buffer",
"@sdl3_windows//:sdl3",
"//hk21/vulkan_loader",
"//hk21/vulkan/loader",
],
applicable_licenses = ["//:license"],
)

View File

@ -13,7 +13,7 @@
#include <SDL3/SDL_vulkan.h>
#include "hk21/vulkan_loader/api.hpp"
#include "hk21/vulkan/loader/loader.hpp"
// @Todo Make fences recyclable
// @Todo Make command pool recyclable

16
hk21/vulkan/BUILD.bazel Normal file
View File

@ -0,0 +1,16 @@
# Copyright 2025 Steven Le Rouzic
#
# SPDX-License-Identifier: BSD-3-Clause
cc_library(
name = "vulkan",
hdrs = [
"vulkan.hpp",
],
deps = [
"//vendor/vulkan",
"@asl//asl/base",
],
visibility = ["//:__subpackages__"],
applicable_licenses = ["//:license"],
)

View File

@ -3,16 +3,16 @@
# SPDX-License-Identifier: BSD-3-Clause
cc_library(
name = "vulkan_loader",
name = "loader",
hdrs = [
"api.hpp",
"loader.hpp",
],
srcs = [
"loader.cpp",
"fns.hpp",
],
deps = [
"//vendor/vulkan",
"//hk21/vulkan",
"@asl//asl/base",
"@asl//asl/types:status",
],

View File

@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: BSD-3-Clause
#include "hk21/vulkan_loader/api.hpp"
#include "hk21/vulkan/loader/loader.hpp"
#define FN(NAME) PFN_##NAME NAME;
VULKAN_GLOBAL_FNS

View File

@ -7,12 +7,8 @@
#include <asl/base/integers.hpp>
#include <asl/types/status.hpp>
#define VK_NO_STDDEF_H
#define VK_NO_STDINT_H
#define VK_NO_PROTOTYPES
#include <vulkan.h>
#include "hk21/vulkan_loader/fns.hpp"
#include "hk21/vulkan/vulkan.hpp"
#include "hk21/vulkan/loader/fns.hpp"
#define FN(NAME) extern PFN_##NAME NAME;
VULKAN_GLOBAL_FNS

12
hk21/vulkan/vulkan.hpp Normal file
View File

@ -0,0 +1,12 @@
// Copyright 2025 Steven Le Rouzic
//
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <asl/base/integers.hpp>
#define VK_NO_STDDEF_H
#define VK_NO_STDINT_H
#define VK_NO_PROTOTYPES
#include <vulkan.h>