diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-08-12 14:21:00 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-08-12 14:21:00 +0200 |
| commit | 8d315a14d503549a6c5baf18f37f0e90df1635fb (patch) | |
| tree | 2f141ddfdd565791b34bc28d70afcfa230cbacf9 /src/vkvg_context_internal.c | |
| parent | a27433e1513d92dbffa6edee1fbba19650022f6b (diff) | |
implement several sse2 intrinsics inside vec2d, __m128d in vec2d uniontest_double_simd
Diffstat (limited to 'src/vkvg_context_internal.c')
| -rw-r--r-- | src/vkvg_context_internal.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vkvg_context_internal.c b/src/vkvg_context_internal.c index 694b952..03d9ec0 100644 --- a/src/vkvg_context_internal.c +++ b/src/vkvg_context_internal.c @@ -87,11 +87,11 @@ bool _check_point_array (VkvgContext ctx){ if (ctx->sizePoints - ctx->pointCount > VKVG_ARRAY_THRESHOLD) return false; ctx->sizePoints += VKVG_PTS_SIZE; - vec2* tmp = (vec2*) realloc (ctx->points, (size_t)ctx->sizePoints * sizeof(vec2)); + vec2d* tmp = (vec2d*) realloc (ctx->points, (size_t)ctx->sizePoints * sizeof(vec2d)); LOG(VKVG_LOG_DBG_ARRAYS, "resize Points: new size(point): %u Ptr: %p -> %p\n", ctx->sizePoints, ctx->points, tmp); if (tmp == NULL){ ctx->status = VKVG_STATUS_NO_MEMORY; - LOG(VKVG_LOG_ERR, "resize PATH failed: new size(byte): %zu\n", ctx->sizePoints * sizeof(vec2)); + LOG(VKVG_LOG_ERR, "resize PATH failed: new size(byte): %zu\n", ctx->sizePoints * sizeof(vec2d)); _clear_path (ctx); return true; } @@ -733,7 +733,7 @@ void _init_descriptor_sets (VkvgContext ctx){ VK_CHECK_RESULT(vkAllocateDescriptorSets(dev->vkDev, &descriptorSetAllocateInfo, &ctx->dsGrad)); } //populate vertice buff for stroke -float _build_vb_step (vkvg_context* ctx, double hw, vec2d pL, vec2d p0, vec2d pR, bool isCurve){ +float _build_vb_step (vkvg_context* restrict ctx, double hw, vec2d pL, vec2d p0, vec2d pR, bool isCurve){ Vertex v = {{0},ctx->curColor, {0,0,-1}}; vec2d v0 = vec2d_sub(p0, pL); @@ -868,7 +868,7 @@ bool ptInTriangle(vec2d p, vec2d p0, vec2d p1, vec2d p2) { return (s>=0) && (t>=0) && (s+t<=D); } -void _free_ctx_save (vkvg_context_save_t* sav){ +void _free_ctx_save (vkvg_context_save_t* restrict sav){ if (sav->dashCount > 0) free (sav->dashes); free(sav->selectedFontName); @@ -885,7 +885,7 @@ void _free_ctx_save (vkvg_context_save_t* sav){ #define CURVE_ANGLE_TOLERANCE_EPSILON 0.001 //no floating point arithmetic operation allowed in macro. #pragma warning(disable:4127) -void _recursive_bezier (VkvgContext ctx, +void _recursive_bezier (VkvgContext restrict ctx, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, unsigned level) { |