From ba560b09d917cd245c69067f675d68878cb0213a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Wed, 29 Jan 2020 04:06:24 +0100 Subject: [PATCH] add 1 to scissor test for float rounding --- appveyor.yml | 4 ++-- src/vkvg_context_internal.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f48ab56..6916627 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -33,7 +33,7 @@ for: build_script: - msbuild vkvg.sln /p:Configuration=Debug /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" after_build: - - 7z a vkvg.zip %APPVEYOR_BUILD_FOLDER%\build\*.dll %APPVEYOR_BUILD_FOLDER%\build\*.exe %APPVEYOR_BUILD_FOLDER%\build\*.lib + - 7z a vkvg.zip %APPVEYOR_BUILD_FOLDER%/build/*.dll %APPVEYOR_BUILD_FOLDER%/build/*.exe %APPVEYOR_BUILD_FOLDER%/build/*.lib - matrix: @@ -52,7 +52,7 @@ for: build_script: - make after_build: - - 7z a vkvg.zip %APPVEYOR_BUILD_FOLDER%\build\*.so* %APPVEYOR_BUILD_FOLDER%\build\test_* + - 7z a vkvg.zip %APPVEYOR_BUILD_FOLDER%/build/*.so* %APPVEYOR_BUILD_FOLDER%/build/test_* diff --git a/src/vkvg_context_internal.c b/src/vkvg_context_internal.c index f5c78e0..e4e75c1 100644 --- a/src/vkvg_context_internal.c +++ b/src/vkvg_context_internal.c @@ -671,7 +671,7 @@ void _init_descriptor_sets (VkvgContext ctx){ descriptorSetAllocateInfo.pSetLayouts = &dev->dslGrad; VK_CHECK_RESULT(vkAllocateDescriptorSets(dev->vkDev, &descriptorSetAllocateInfo, &ctx->dsGrad)); } - +//populate vertice buff for stroke float _build_vb_step (vkvg_context* ctx, Vertex v, float hw, vec2 pL, vec2 p0, vec2 pR, bool isCurve){ //if two of the three points are equal, normal is null vec2 v0n = vec2_line_norm(pL, p0); @@ -1117,7 +1117,7 @@ void _draw_full_screen_quad (VkvgContext ctx, bool useScissor) { if (ctx->xMin < 0 || ctx->yMin < 0) useScissor = false; if (useScissor && ctx->xMin < FLT_MAX) { - VkRect2D r = {{ctx->xMin, ctx->yMin}, {ctx->xMax - ctx->xMin, ctx->yMax - ctx->yMin}}; + VkRect2D r = {{ctx->xMin, ctx->yMin}, {ctx->xMax - ctx->xMin + 1, ctx->yMax - ctx->yMin + 1}}; CmdSetScissor(ctx->cmd, 0, 1, &r); } CmdPushConstants(ctx->cmd, ctx->pSurf->dev->pipelineLayout, -- 2.47.3