case VKVG_OPERATOR_OVER:
CmdBindPipeline(ctx->cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, ctx->pSurf->dev->pipe_OVER);
break;
- case VKVG_OPERATOR_CLEAR:
+ case VKVG_OPERATOR_CLEAR:
CmdBindPipeline(ctx->cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, ctx->pSurf->dev->pipe_CLEAR);
break;
case VKVG_OPERATOR_DIFFERENCE:
//flush ctx in two steps to add the src transitioning in the cmd buff
if (ctx->cmdStarted){//transition of img without appropriate dependencies in subpass must be done outside renderpass.
- //_flush_undrawn_vertices (ctx);//ensure all vertices are flushed
_end_render_pass (ctx);
_flush_vertices_caches (ctx);
}else {
blendAttachmentState.alphaBlendOp = blendAttachmentState.colorBlendOp = VK_BLEND_OP_SUBTRACT;
VK_CHECK_RESULT(vkCreateGraphicsPipelines(dev->vkDev, dev->pipelineCache, 1, &pipelineCreateInfo, NULL, &dev->pipe_SUB));
- //blendAttachmentState.blendEnable = VK_FALSE;
- //rasterizationState.polygonMode = VK_POLYGON_MODE_POINT;
//shaderStages[1].pName = "op_CLEAR";
- blendAttachmentState.srcAlphaBlendFactor = blendAttachmentState.dstAlphaBlendFactor =
- blendAttachmentState.srcColorBlendFactor = blendAttachmentState.dstColorBlendFactor = VK_BLEND_FACTOR_ZERO;
+ blendAttachmentState.colorBlendOp = blendAttachmentState.alphaBlendOp = VK_BLEND_OP_SUBTRACT;
+ blendAttachmentState.srcColorBlendFactor = VK_BLEND_FACTOR_ONE;
+ blendAttachmentState.dstColorBlendFactor = VK_BLEND_FACTOR_ONE;
+ blendAttachmentState.srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE;
+ blendAttachmentState.dstAlphaBlendFactor = VK_BLEND_FACTOR_ONE;
VK_CHECK_RESULT(vkCreateGraphicsPipelines(dev->vkDev, dev->pipelineCache, 1, &pipelineCreateInfo, NULL, &dev->pipe_CLEAR));