9b29e681feMerge commit 'e426319' into orca (integrate fix to mg_image_size(), which doesn't need a current canvas anymore)Martin Fouilleul2023-05-10 11:20:30 +0200
e426319723Fix mg_image_size() (doesn't need a current canvas anymore)Martin Fouilleul2023-05-10 11:18:36 +0200
3f1447f729Always put arena pointer in mem_arena_marker, to avoid possible DEBUG value discrepancy between lib and client codeMartin Fouilleul2023-05-09 18:29:32 +0200
569b05526bupdate milepost: fix image data not storing surface handle in mg_image_create()Martin Fouilleul2023-05-08 13:05:42 +0200
1ab1d70df2Fix image data not storing surface handle in mg_image_create()Martin Fouilleul2023-05-08 13:01:45 +0200
39e96e0739Added xxhash64 hash function and use that instead of x64-specific aes hash, until we get an arm versionMartin Fouilleul2023-04-29 19:25:40 +0200
3874e798c3Compile canvas command buffer into wasm and bind host surface/render APIMartin Fouilleul2023-04-26 14:57:12 +0200
b27dc615d1Finish separating graphics_common and graphics_surface + add platform_math, so that we can compile graphics_common to wasm in orcaMartin Fouilleul2023-04-26 14:56:02 +0200
ca1caf8537splitting graphics_surface and graphics_common in order to isolate surface dispatch stuff from orca appsMartin Fouilleul2023-04-25 22:15:56 +0200
346979a21a[canvas] change surface/canvas APIs to treat canvas a 'just another kind of surface', and split canvas implementation (managed by surface) from canvas _command buffer_ and implicit context (represented by mg_canvas)Martin Fouilleul2023-04-25 19:13:15 +0200
32d7d91893[wip] changed ui_begin_frame() to take explicit canvas sizeMartin Fouilleul2023-04-25 15:10:05 +0200
3769b70753[wip] changing backend enum to api enum, and adding canvas api in hereMartin Fouilleul2023-04-25 14:54:52 +0200
58effcb413fixed using wrong length when copying debug entries function nameMartin Fouilleul2023-04-21 10:02:17 +0200
7c273f494b[ui, logging] - Changed workings of ui_panel() and scrolling to make it easier for usage code to control scrolling. - Renamed logging functionsMartin Fouilleul2023-04-20 15:40:00 +0200
eb09d73fa8[milepost] changes to event system that allows using events with payloads (eg file paths) across threadsMartin Fouilleul2023-04-19 16:19:13 +0200
bb6b68ad73[event system] allocate events and additional payload (e.g. file paths) directly in ring buffer, and copy them to user-supplied arena in mp_next_event()Martin Fouilleul2023-04-19 16:16:36 +0200
81ead1ba91[in-app console] - splitting input state from app structures in milepost, so that it can be used from another thread than main event thread. - Adding a collapsable debug overlay to orca window (wip)Martin Fouilleul2023-04-19 11:28:53 +0200
ab150f94f2separating input state from app, so that it can be used in different threads that main thread. E.g. ui context uses its own input state that can be fed events in a second threadMartin Fouilleul2023-04-19 11:28:20 +0200
03b5802529[canvas] replace simple shape helpers with normal paths operations instead of having dedicated primitives for rounded rects/ellipses and so onMartin Fouilleul2023-04-11 11:16:23 +0200
65b5a4b52a[mtl renderer] Fixed curve slicing which used matrix operation and re-parameterization, which could create gaps in path. Now use blossoms, which ensure endpoints of subcurves matchMartin Fouilleul2023-04-07 17:17:55 +0200
f6a992e5f4[mtl canvas] very first draft of new canvas backend based on edge-counting instead of triangle overlapMartin Fouilleul2023-03-28 13:09:48 +0200
faf024a63a[mtl canvas] reorganizing the loop in render kernel to allow different commandsMartin Fouilleul2023-03-22 16:40:43 +0100
e9ecd9d521[mtl canvas] Fix artifacts on tiger that was due to epsilon comparison for cubics equation in draw kernel. Removed that (now do <= 0), but then we need to weed out false negatives for solid triangles. So we compute if the triangle is solid in the triangle kernel and store it in the mg_triangle_data struct for now.Martin Fouilleul2023-03-22 15:02:04 +0100
b0be21795e[mtl canvas] prevent tiles entirely covered by textured shapes to be treated as solid (as the texture could be non-uniformly transparent)Martin Fouilleul2023-03-22 12:02:13 +0100
26f669f3c1[mtl canvas] adding a color command for fully covered, solid color tiles. This is not much of an improvement for now because the tile array just got bigger, but maybe we can use the same scheme and compact it into an intMartin Fouilleul2023-03-22 10:46:56 +0100
0d8bc824a2[mtl canvas] bucket triangles into per-shape tile queues, then gather into tile arrays. This somewhat improves perf for perf_text test and avoids an awful degradation due to sorting in tiger test (tiger now runs at ~20fps, which is still much slower than it could be, but the triangle coverage method we're using just incurs too much cross product computations...)Martin Fouilleul2023-03-21 10:22:37 +0100
a4ef58f2d8[mtl canvas] Tiling per rectangles into per-shape tile queues (linked lists of triangle indices) to avoid sortingMartin Fouilleul2023-03-20 16:46:12 +0100
11113f597c[mtl canvas, exp] try tiling per tile and avoiding sorting pass (worse on simple shapes and text, but degrades slower with complex scenes (eg tiger). Not great though)Martin Fouilleul2023-03-20 10:08:17 +0100
92f4909d63[mtl canvas] testing the metal canvas rendering the ghostscript tiger, and acknowledging it's painfully slowMartin Fouilleul2023-03-18 14:35:51 +0100
1d36088302[mtl canvas] render to an intermediate texture and acquire the drawable and blit to it only at the end of all compute passesMartin Fouilleul2023-03-16 10:25:56 +0100
f14f397c99[mtl surface] don't re-acquire drawable if there's already a valid one acquiredMartin Fouilleul2023-03-15 18:51:50 +0100
0c74e997ae[mtl surface] fix crash on exit when metal GPU frame capture is enabled. Apparently, if we release resources (on exit) before all GPU work is completed, libMetalCapture crashes on bad access. To work around that, in mg_mtl_surface_destroy(), we enqueue a last (empty) command buffer and call waitUntilCompleted on it, to ensure all previous command buffers are also completedMartin Fouilleul2023-03-15 13:02:18 +0100
5ce53001e2[canvas, mtl] clear resets command count and stores clear color. Ccanvas' backend begin proc now takes a clearColor parameter and clears final surface to that color before drawing any batchMartin Fouilleul2023-03-15 11:09:42 +0100
5c1a220f1f[mtl canvas] don't reorder point to make clockwise triangles. Instead, store triangle orientation in triangle struct and multiply orientation in raster testMartin Fouilleul2023-03-14 15:08:39 +0100
221fcbeb6b[mtl canvas] store uv transform and color in triangle data (don't pass vertex or shape buffer to draw kernel)Martin Fouilleul2023-03-14 12:20:39 +0100
c9a5b3d52d[mtl canvas] rearranged triangle data for better packingMartin Fouilleul2023-03-13 20:20:09 +0100
cee294d8ad[mtl canvas] fixed setBuffer that was being called on the wrong encoderMartin Fouilleul2023-03-14 09:20:51 +0100
e9d64166a3[mtl canvas] fixed bug where tiles left and below screen where all bucketed to the first row/column (same as gl version, see 4a8c77f02)Martin Fouilleul2023-03-13 16:53:12 +0100