Commit graph

338 commits

Author SHA1 Message Date
msiglreith b38e43f0c2 Initial work for surface support
surface: handle extensions

Implement swapchain creation and blit image to screen
2020-05-04 16:24:42 +02:00
Raph Levien 4db4b3b87d
Merge pull request #8 from linebender/fill
Fills
2020-05-04 06:55:46 -07:00
Raph Levien 1797914ac8 Fix artifacts
We were overwriting `end` when clipping, then reusing it when reading
the path, for continuity.
2020-05-02 16:20:04 -07:00
Raph Levien dcdd35e0b8 Implement solid color cmd
Avoids empty fill segment list, which was a minor bug.

Also increase tolerance to 0.25 to juice performance.
2020-05-02 10:53:16 -07:00
Raph Levien aa83d782ed Fills
Adds fills, and has more or less working tiger render (with artifacts).
2020-05-01 19:42:20 -07:00
Raph Levien 064ee86a45
Merge pull request #7 from linebender/fix_item_ref
Clear item ref on empty segments
2020-05-01 19:41:35 -07:00
Raph Levien 9539d8871f Clear item ref on empty segments 2020-05-01 09:13:16 -07:00
Raph Levien 19ecd0a158
Merge pull request #3 from linebender/chunk_segments
Use linked list strategy for segments
2020-04-30 21:40:04 -07:00
Raph Levien 1cecde348b
Merge pull request #5 from msiglreith/reelase_build
Fix release build
2020-04-30 07:30:42 -07:00
Raph Levien d22c68b609
Merge pull request #4 from linebender/reset_query_pool
Reset query pool before use
2020-04-30 07:27:21 -07:00
msiglreith f0c514a667 Fix release build 2020-04-30 15:48:01 +02:00
Raph Levien aa8b71e922 Reset query pool before use
Quiets validation errors now that we can see them :)
2020-04-29 18:18:04 -07:00
Brian Merchant 144f46c5fa
Merge pull request #2 from bzm3r/validation-layer
Set up validation layers and debug reporting.
2020-04-29 18:03:22 -07:00
Brian Merchant 2e3335f049 Set up validation layers and debug reporting. 2020-04-29 17:59:14 -07:00
Raph Levien b23fe25177 Use linked list strategy for segments
Trying to allocate them contiguously wasn't good.
2020-04-28 22:25:57 -07:00
Raph Levien cb06b1bc3d Implement stroked polylines
This version seems to work but the allocation of segments has low
utilization. Probably best to allocate in chunks rather than try to
make them contiguous.
2020-04-28 18:45:59 -07:00
Raph Levien 55e35dd879 Dynamic allocation of intermediate buffers
When the initial allocation is exceeded, do an atomic bump allocation.
This is done for both tilegroup instances and per tile command lists.
2020-04-25 10:45:47 -07:00
Raph Levien e1c0e448ef Encode stroke in scene
This just adds the first step of polyline stroking, which is adding it
to the scene. Also just a bit of cleaning up of dimensions into one
header file.
2020-04-25 08:24:46 -07:00
Raph Levien 7528eaff22 Add piet trait
Use piet render context to encode into scene buffer.

This is adapted from piet-dx12.
2020-04-22 12:07:56 -07:00
Brian Merchant 4aaa6f1f29
Add f16 support. 2020-04-21 23:45:24 -07:00
Raph Levien 8d51ccbc74 Add draft kernel 4
Render from ptcl rather than original scene.
2020-04-21 19:30:14 -07:00
Raph Levien 6976f877e0 Add first draft of kernel 3
A fairly simple approach, but it adds the translation (not tested yet
in scene encoding) and does bounding box culling.
2020-04-21 18:49:50 -07:00
Brian Merchant 818d5b2047
Merge branch 'master' into master 2020-04-21 15:18:51 -07:00
Brian Merchant 3270ee64c2 Add f16 support.
Handling f16 requires special work, compared to other scalars, as the minimum conversion operation for u32->f16 in GLSL (unpackHalf2x16) loads two f16s from one u32. This means that in order to minimize unnecessary calls to unpackHalf2x16, we should look-ahead to see if the current f16 has already been extracted in the process of dealing with the last f16. Similar considerations exist for write operations, where we want to pack, when possible, two f16s in one go (using packHalf2x16).
2020-04-21 15:03:06 -07:00
Raph Levien 2ed89dd65e First draft of kernel 1
Output of kernel 1 is validated by simple inspection, next step is to
wire it up properly.
2020-04-20 18:07:18 -07:00
Raph Levien 5adb703936 Staging buffers
Add hal methods to clear and copy buffers, so work happens in device
local buffers.
2020-04-18 07:46:59 -07:00
Raph Levien 957f710b91 Render random circles
Poor performance but it renders something.
2020-04-17 21:18:39 -07:00
Raph Levien 3c35899a2f Render circles
WIP
2020-04-17 16:01:37 -07:00
Raph Levien 228bfc88cd Add scene types
This patch adds a module that contains both scene and ptcl types (very
lightly adapted from piet-metal), as well as infrastructure for encoding
Rust-side.

WIP, it's not wired up in either the shader or on the Rust side.
2020-04-16 18:19:58 -07:00
Raph Levien 86e52a3f47 Start image rendering
Populates the piet-gpu subdir, with an extremely simple renderer. The
main program saves the image to a PNG.

Contains a few fixes (I was confused about the need for multiple
bindings, as opposed to multiple descriptors within a binding).
2020-04-16 14:04:40 -07:00
Raph Levien 5c147b8576 Licenses and README 2020-04-15 08:56:39 -07:00
Raph Levien 6a3f890b58 [derive] Add Rust encoding of structs
This also requires some traits and structs in an `encode` module (the
one in piet-metal/piet-gpu-types works, and was used to test).
2020-04-14 20:47:41 -07:00
Raph Levien e86ea9eff4 [derive] Add writers, enums
This adds shader generation of writers (and cleans up some other
things) and much better support for enums.
2020-04-14 15:06:49 -07:00
Raph Levien 487d948217 [hal] Add timer queries
Note: also make dispatch size programmable.
2020-04-12 22:28:27 -07:00
Raph Levien 265d990cbe [derive] Add layout
Add a layout pass to the struct derive logic.
2020-04-12 16:44:28 -07:00
Raph Levien afd47a7edd Start piet-gpu-derive
This version will be similar but somewhat different to what's in
piet-metal now. Hopefully a little simpler to use (no distinction
between packed and unpacked structs) and better structured.
2020-04-07 21:44:48 -07:00
Raph Levien 1e1b9ff319 Get Collatz example working
Rework Collatz example to use new traits.
2020-04-06 12:11:37 -07:00
Raph Levien 1b0248fbbf Starting piet-gpu repo
This brings in a bunch of code from vk-toy but doesn't yet do anything.
2020-04-05 15:17:26 -07:00