summaryrefslogtreecommitdiffstatsci
path: root/src/vkvg_context.c
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.c
parent595d435b5414ae3c52a4f54345dcda49ce3e4d39 (diff)
buggy font cache mutex guarding, multithreaded tests
Diffstat (limited to 'src/vkvg_context.c')
-rw-r--r--src/vkvg_context.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vkvg_context.c b/src/vkvg_context.c
index dca954e..ed073b9 100644
--- a/src/vkvg_context.c
+++ b/src/vkvg_context.c
@@ -132,10 +132,10 @@ VkvgContext vkvg_create(VkvgSurface surf)
_init_ctx (ctx);
- ctx->points = (vec2*)malloc (VKVG_VBO_SIZE*sizeof(vec2));
- ctx->pathes = (uint32_t*)malloc (VKVG_PATHES_SIZE*sizeof(uint32_t));
- ctx->vertexCache = (Vertex*)malloc(ctx->sizeVertices * sizeof(Vertex));
- ctx->indexCache = (VKVG_IBO_INDEX_TYPE*)malloc(ctx->sizeIndices * sizeof(VKVG_IBO_INDEX_TYPE));
+ ctx->points = (vec2*)malloc (VKVG_VBO_SIZE * sizeof(vec2));
+ ctx->pathes = (uint32_t*)malloc (VKVG_PATHES_SIZE * sizeof(uint32_t));
+ ctx->vertexCache = (Vertex*)malloc (ctx->sizeVertices * sizeof(Vertex));
+ ctx->indexCache = (VKVG_IBO_INDEX_TYPE*)malloc (ctx->sizeIndices * sizeof(VKVG_IBO_INDEX_TYPE));
if (!ctx->points || !ctx->pathes || !ctx->vertexCache || !ctx->indexCache) {
dev->status = VKVG_STATUS_NO_MEMORY;
@@ -159,6 +159,7 @@ VkvgContext vkvg_create(VkvgSurface surf)
_create_cmd_buff (ctx);
_createDescriptorPool (ctx);
_init_descriptor_sets (ctx);
+ _font_cache_update_context_descset (ctx);
_update_descriptor_set (ctx, ctx->dev->fontCache->texture, ctx->dsFont);
_update_descriptor_set (ctx, surf->dev->emptyImg, ctx->dsSrc);
_update_gradient_desc_set(ctx);