Skip to content

Commit 56c7420

Browse files
chore: remove separate physical API log and update main physical API log to include patch version
1 parent 349396b commit 56c7420

3 files changed

Lines changed: 128 additions & 7 deletions

File tree

docs/rfc/RFC-0002.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# RFC-0001
2+
3+
**Status:** Draft
4+
**Author:**
5+
**Target:** Internal Engine Architecture
6+
**Date:** March, 2026
7+
8+
## 1. Abstract
9+
10+
## 2. Motivation
11+
12+
## 3. Design Principles
13+
14+
The following principles guide this design:
15+
16+
### 3.1 Shape over semantics
17+
18+
Concepts enforce type shape and API presence.
19+
20+
### 3.2 Minimal Sufficiency
21+
22+
Concepts should require only what is necessary for correctness and interoperability.
23+
24+
### 3.3 Non-intrusiveness
25+
26+
Concepts must not impose unnecessary contraints on layout,
27+
performance, or implementation strategy.
28+
29+
## 4 Concepts
30+
31+
### 4.1 MoveOnlyNoexcept
32+
33+
#### 4.1.1 Definition
34+
35+
A type satisfying MoveOnlyNoexcept:
36+
37+
- Is moveable
38+
- Is not copyable
39+
- Has noexcept move construction and assignment
40+
41+
#### 4.1.2 Rationale
42+
43+
Registries and bundles represent ownership domains and must:
44+
45+
- Avoid accidental copying
46+
- Be safely relocatable
47+
48+
Noexcept move is required to preserve strong exception safety
49+
guarantees in higher-level systems.
50+
51+
#### 4.1.3 Specification
52+
53+
```cpp
54+
template <class T>
55+
concept MoveOnlyNoexcept =
56+
std::moveable<T> &&
57+
!std::copy_constructible<T> &&
58+
!std::copy_assignable_v<T> &&
59+
std::is_nothrow_move_constructible_v<T> &&
60+
std::is_nothrow_move_assignable_v<T>;
61+
```
62+
63+
### 4.2 RegistrySlot
64+
65+
#### 4.2.1 Definition
66+
67+
A type satisfying RegistrySlot:
68+
69+
- Tracks whether the slot is live
70+
- Tracks the current generation of the slot
71+
72+
#### 4.2.2 Rationale
73+
74+
Slots represent storage locations for registry managed objects.
75+
They must:
76+
77+
- Distinguish between live and free states
78+
- Participate in generation-based validation
79+
80+
This enables:
81+
82+
- Detection of stale handles
83+
- Safe reuse of slot indices
84+
85+
#### 4.2.3 Specification
86+
87+
```cpp
88+
template <class S>
89+
concept RegistrySlot =
90+
requires(S slot) {
91+
{ slot.live } -> std::convertible_to<bool>;
92+
{ slot.generation } -> std::convertible_to<uint32_t>;
93+
};
94+
```
95+
96+
Layer 1: common concepts
97+
• BundleLike
98+
99+
The following are explicitly out of scope for these concepts:
100+
• Enforcing transactional creation
101+
• Enforcing correct retirement semantics
102+
• Preventing logical misuse of handles
103+
• Guaranteeing destruction ordering
104+
• Enforcing trivial move or standard layout
105+
106+
Layer 2: registry CRTP base
107+
108+
Responsible for:
109+
• retire_queue_
110+
• slots_
111+
• free_
112+
• alive()
113+
• allocate_handle_()
114+
• get_slot_if_live_()
115+
• retire_slot_()
116+
• clear()
117+
118+
Layer 3: concrete registry
119+
120+
FrameRegistry implements:
121+
• create()
122+
• make_retired_payload_()
123+
• retired payload destroy/cleanup trampolines
124+
• frame-specific accessors

src/backend/vulkan/device/device.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ util::Status Device::create(const Device::CreateInfo &ci) {
3737
capabilities_.supported_features = 0;
3838
capabilities_.enabled_features = 0;
3939

40-
QUARK_LOG_INFO("physical device vulkan version: {}.{}.{}",
41-
VK_VERSION_MAJOR(capabilities_.api_version),
42-
VK_VERSION_MINOR(capabilities_.api_version),
43-
VK_VERSION_PATCH(capabilities_.api_version));
44-
4540
constexpr float queue_priority{1.0F};
4641
const std::set<uint32_t> unique_queue_families{graphics_queue_family_index_,
4742
present_queue_family_index_};

src/backend/vulkan/vulkan_context.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,11 @@ util::Status VulkanContext::create_device() {
309309

310310
VkPhysicalDeviceProperties properties{};
311311
vkGetPhysicalDeviceProperties(device_.vk_physical_device(), &properties);
312-
QUARK_LOG_INFO("Selected GPU: {} (api {}.{})", properties.deviceName,
312+
QUARK_LOG_INFO("Selected GPU: {} (physical device api {}.{}.{})",
313+
properties.deviceName,
313314
VK_VERSION_MAJOR(device_.capabilities().api_version),
314-
VK_VERSION_MINOR(device_.capabilities().api_version));
315+
VK_VERSION_MINOR(device_.capabilities().api_version),
316+
VK_VERSION_PATCH(device_.capabilities().api_version));
315317

316318
QUARK_OK();
317319
}

0 commit comments

Comments
 (0)