summaryrefslogtreecommitdiffstatsci
path: root/src/vkvg_context_internal.c
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2026-10-24 17:57:43 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2026-10-24 17:57:43 +0200
commitfdf049555e877f16d5d7ac1a7e38f08de6c38cee (patch)
treef17594bf97c2db4d4bfae06fddda652f76b9611a /src/vkvg_context_internal.c
parent86ddd9ba28461dad4cec23f01d2a0e5c1f44b0e8 (diff)
new clipping and save/restore ok, sync need rework and debugnew_save_restore
Diffstat (limited to 'src/vkvg_context_internal.c')
-rw-r--r--src/vkvg_context_internal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vkvg_context_internal.c b/src/vkvg_context_internal.c
index 41a43a4..bcbc609 100644
--- a/src/vkvg_context_internal.c
+++ b/src/vkvg_context_internal.c
@@ -645,9 +645,8 @@ void _start_cmd_for_render_pass(VkvgContext ctx) {
_update_push_constants(ctx);
_bind_draw_pipeline(ctx);
- //CmdSetStencilCompareMask(ctx->cmd, VK_STENCIL_FRONT_AND_BACK, STENCIL_CLIP_BIT);
- CmdSetStencilCompareMask(ctx->cmd, VK_STENCIL_FRONT_AND_BACK, 0xff);
CmdSetStencilReference(ctx->cmd, VK_STENCIL_FRONT_AND_BACK, ctx->curClipRef);
+
ctx->cmdStarted = true;
}
// compute inverse mat used in shader when context matrix has changed
@@ -682,7 +681,7 @@ void _update_cur_pattern(VkvgContext ctx, VkvgPattern pat) {
//if lastpat has only one ref, descriptorSet would be destroyed, so flush context
if (vkvg_pattern_get_reference_count(lastPat) == 1)
vkvg_flush(ctx);
- if (newPatternType != VKVG_PATTERN_TYPE_SURFACE)
+ else if (newPatternType != VKVG_PATTERN_TYPE_SURFACE)
CmdBindDescriptorSets(ctx->cmd, VK_PIPELINE_BIND_POINT_GRAPHICS,
ctx->dev->pipelineLayout, 1, 1, &ctx->dev->dummySrcSet, 0, NULL);
break;
@@ -1494,6 +1493,7 @@ void _poly_fill(VkvgContext ctx, vec4* bounds) {
}
CmdBindPipeline(ctx->cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, ctx->pSurf->surfClass->pipelinePolyFill);
+ CmdSetStencilReference(ctx->cmd, VK_STENCIL_FRONT_AND_BACK, ctx->curClipRef);
Vertex v = {{0}, ctx->curColor, {0, 0, -1}};
uint32_t ptrPath = 0;