summaryrefslogtreecommitdiff
path: root/src/window.hpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-02-04 19:17:59 -0500
committerJonathan Bradley <jcb@pikum.xyz>2025-02-04 19:17:59 -0500
commit61e179f9580c985cb5ca80ea732fc7572d31c489 (patch)
tree122ff15c6d94ce5aebff4ff6f1fc6d13317abe16 /src/window.hpp
parenta3fb454f9935960dc2d367455f891d8fedfb9016 (diff)
pke: chkpt: text rendering, no errors but blank
Diffstat (limited to 'src/window.hpp')
-rw-r--r--src/window.hpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/window.hpp b/src/window.hpp
index 5cb346f..f511d80 100644
--- a/src/window.hpp
+++ b/src/window.hpp
@@ -60,23 +60,20 @@ struct DebugHitbox {
VkDescriptorSet *vkDescriptorSets = nullptr;
};
extern DebugHitbox pkeDebugHitbox;
-struct ImplementedPipelines {
- union {
- VkDescriptorSetLayout arr[2] = { VK_NULL_HANDLE, VK_NULL_HANDLE };
- struct ImplementedPipelineLayoutsByName {
+struct ImplementedPKVK {
+ struct ImplementedDescrSetLayouts {
+ struct ImplementedDescrSetLayoutsByName {
VkDescriptorSetLayout texture;
VkDescriptorSetLayout glyph;
} named;
} descr_layouts;
- union {
- VkPipelineLayout arr[2] = { VK_NULL_HANDLE, VK_NULL_HANDLE };
+ struct ImplementedPipelineLayouts {
struct ImplementedPipelineLayoutsByName {
VkPipelineLayout texture;
VkPipelineLayout glyph;
} named;
} pipe_layouts;
- union {
- VkPipeline arr[3] = { VK_NULL_HANDLE, VK_NULL_HANDLE, VK_NULL_HANDLE };
+ struct ImplementedPipelines {
struct ImplementedPipelinesByName {
VkPipeline texture;
VkPipeline texture_wireframe;
@@ -84,7 +81,7 @@ struct ImplementedPipelines {
} named;
} pipelines;
};
-extern ImplementedPipelines pkePipelines;
+extern ImplementedPKVK pkePipelines;
void CreateWindow(PKEWindowProperties wp);
void DestroyWindow();
@@ -94,6 +91,11 @@ void Render();
unsigned int FindMemoryTypeIndex(uint32_t typeFilter, VkMemoryPropertyFlags memPropertyFlags);
void CalculateCombinedMemReqs(uint64_t memReqsCount, VkMemoryRequirements *memReqs, VkMemoryRequirements &combinedMemReqs);
+enum PKVK_TmpBufferFlags : uint8_t {
+ PKVK_TmpBufferFlags_NONE = 0,
+ PKVK_TmpBufferFlags_MAP_MEMORY = 1,
+ PKVK_TmpBufferFlags_ALL = 0xFF,
+};
struct PKVK_TmpBufferDetails {
VkQueue queue = VK_NULL_HANDLE;
VkCommandBuffer cmdBuffer = VK_NULL_HANDLE;
@@ -101,7 +103,7 @@ struct PKVK_TmpBufferDetails {
VkDeviceMemory deviceMemory = VK_NULL_HANDLE;
void *deviceData = nullptr;
};
-void PKVK_BeginBuffer(unsigned int family_index, VkDeviceSize requestedMemorySize, PKVK_TmpBufferDetails &tmpBufferDetails);
-void PKVK_EndBuffer(PKVK_TmpBufferDetails &tmpBufferDetails);
+void PKVK_BeginBuffer(unsigned int family_index, VkDeviceSize requestedMemorySize, PKVK_TmpBufferDetails &tmpBufferDetails, PKVK_TmpBufferFlags flags = PKVK_TmpBufferFlags_ALL);
+void PKVK_EndBuffer(PKVK_TmpBufferDetails &tmpBufferDetails, PKVK_TmpBufferFlags flags = PKVK_TmpBufferFlags_ALL);
#endif /* PKE_WINDOW_HPP */