ctx->curOperator = VKVG_OPERATOR_OVER;
ctx->curFillRule = VKVG_FILL_RULE_NON_ZERO;
ctx->curSavBit = 0x4;
+ ctx->vertCount = 0;
+ ctx->indCount = 0;
+ ctx->curIndStart = 0;
+
push_constants pc = {
{.height=1},
_update_descriptor_set (ctx, surf->dev->emptyImg, ctx->dsSrc);
_update_gradient_desc_set(ctx);
- //add full screen quad at the beginning, recurently used
- _vao_add_rectangle (ctx,0,0,ctx->pSurf->width,ctx->pSurf->height);
-
- _init_cmd_buff (ctx);
_clear_path (ctx);
ctx->references = 1;
*/
void vkvg_flush (VkvgContext ctx){
_flush_cmd_buff(ctx);
- _init_cmd_buff(ctx);
/*
#ifdef DEBUG
vkh_cmd_end (ctx->cmd);
_submit_wait_and_reset_cmd(ctx);
+
+ ctx->vertCount = 0;
+ ctx->indCount = 0;
+ ctx->curIndStart = 0;
}
//bind correct draw pipeline depending on current OPERATOR
break;
}
}
-void _init_cmd_buff (VkvgContext ctx){
- //full surf quad triangles is at the beginning
- ctx->vertCount = 4;
- ctx->indCount = 6;
- ctx->curIndStart = 6;
- //VkClearValue clearValues[2];
- //clearValues[0].color = { { 0.0f, 0.0f, 0.0f, 1.0f } };
- //clearValues[1].depthStencil = { 1.0f, 0 };
-
-}
-
void _start_cmd_for_render_pass (VkvgContext ctx) {
vkh_cmd_begin (ctx->cmd,VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT);
void _bind_draw_pipeline (VkvgContext ctx);
void _create_cmd_buff (VkvgContext ctx);
-void _init_cmd_buff (VkvgContext ctx);
void _check_cmd_buff_state (VkvgContext ctx);
void _flush_cmd_buff (VkvgContext ctx);
void _record_draw_cmd (VkvgContext ctx);
next = next->pPrev;
}
}
-void _init_all_contexes (VkvgDevice dev){
- VkvgContext next = dev->lastCtx;
- while (next != NULL){
- _init_cmd_buff (next);
- next = next->pPrev;
- }
-}
void _create_pipeline_cache(VkvgDevice dev){
void _setupPipelines (VkvgDevice dev);
void _createDescriptorSetLayout (VkvgDevice dev);
void _flush_all_contexes (VkvgDevice dev);
-void _init_all_contexes (VkvgDevice dev);
void _wait_and_reset_device_fence (VkvgDevice dev);
void _submit_cmd (VkvgDevice dev, VkCommandBuffer* cmd, VkFence fence);
#endif
_update_descriptor_set (next, next->source, next->dsSrc);
next = next->pPrev;
}
-
- _init_all_contexes (dev);
}
///Start a new line in font cache, increase texture layer count if needed.
void _init_next_line_in_tex_cache (VkvgDevice dev, _vkvg_font_t* f){