summaryrefslogtreecommitdiffstatsci
path: root/src/vkvg_context_internal.h
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2022-02-18 15:49:55 +0100
committerj-p <jp_bruyere@hotmail.com>2022-02-18 21:09:23 +0100
commite7f0aae994656c2b8893bbf673d3659ea7bd8f7f (patch)
tree247d5863abf0b35b3bb73b7f3a2d7f0aeb54a0ac /src/vkvg_context_internal.h
parent595d435b5414ae3c52a4f54345dcda49ce3e4d39 (diff)
buggy font cache mutex guarding, multithreaded tests
Diffstat (limited to 'src/vkvg_context_internal.h')
-rw-r--r--src/vkvg_context_internal.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/vkvg_context_internal.h b/src/vkvg_context_internal.h
index cf01d58..71017be 100644
--- a/src/vkvg_context_internal.h
+++ b/src/vkvg_context_internal.h
@@ -126,22 +126,25 @@ typedef struct _vkvg_context_save_t {
typedef struct _vkvg_context_t {
//VkvgContext pPrev; //double linked list of contexts
//VkvgContext pNext;
- uint32_t references; //reference count
+ uint32_t references; //reference count
VkvgDevice dev;
- VkvgSurface pSurf; //surface bound to context, set on creation of ctx
- VkFence flushFence; //context fence
- VkhImage source; //source of painting operation
+ VkvgSurface pSurf; //surface bound to context, set on creation of ctx
+ VkFence flushFence; //context fence
+ VkhImage source; //source of painting operation
- VkCommandPool cmdPool; //local pools ensure thread safety
- VkCommandBuffer cmdBuffers[2];//double cmd buff for context operations
- VkCommandBuffer cmd; //current recording buffer
- bool cmdStarted; //prevent flushing empty renderpass
- bool pushCstDirty;//prevent pushing to gpu if not requested
- VkDescriptorPool descriptorPool;//one pool per thread
- VkDescriptorSet dsFont; //fonts glyphs texture atlas descriptor (local for thread safety)
- VkDescriptorSet dsSrc; //source ds
- VkDescriptorSet dsGrad; //gradient uniform buffer
+ VkCommandPool cmdPool; //local pools ensure thread safety
+ VkCommandBuffer cmdBuffers[2]; //double cmd buff for context operations
+ VkCommandBuffer cmd; //current recording buffer
+ bool cmdStarted; //prevent flushing empty renderpass
+ bool pushCstDirty; //prevent pushing to gpu if not requested
+ VkDescriptorPool descriptorPool; //one pool per thread
+ VkDescriptorSet dsFont; //fonts glyphs texture atlas descriptor (local for thread safety)
+ VkDescriptorSet dsSrc; //source ds
+ VkDescriptorSet dsGrad; //gradient uniform buffer
+
+ VkhImage fontCacheImg; //current font cache, may not be the last one, updated only if new glyphs are
+ //uploaded by the current context
VkRect2D bounds;