]>
git.nega.tv - josh/narcissus/log
Joshua Simmons [Wed, 12 Jul 2023 22:30:22 +0000 (00:30 +0200)]
narcissus: Avoid some useless allocations
Joshua Simmons [Wed, 12 Jul 2023 21:52:49 +0000 (23:52 +0200)]
narcissus-gpu: Move all the magic constants into VULKAN_CONSTANTS
Joshua Simmons [Wed, 12 Jul 2023 21:52:12 +0000 (23:52 +0200)]
narcissus-gpu: Move libc module into its own file
Joshua Simmons [Tue, 11 Jul 2023 20:27:23 +0000 (22:27 +0200)]
narcissus-gpu: Tidy up transient allocators
Joshua Simmons [Tue, 11 Jul 2023 19:15:06 +0000 (21:15 +0200)]
narcissus-gpu: Cleanup suboptimal hash set on swapchain destruction
Joshua Simmons [Tue, 11 Jul 2023 19:10:51 +0000 (21:10 +0200)]
narcissus-gpu: Split WSI into its own module
Joshua Simmons [Tue, 11 Jul 2023 07:25:44 +0000 (09:25 +0200)]
vulkan-sys: Add device extension enumeration
Joshua Simmons [Mon, 10 Jul 2023 17:53:14 +0000 (19:53 +0200)]
narcissus-gpu: Reset transient uniform buffers
Joshua Simmons [Sun, 9 Jul 2023 22:07:48 +0000 (00:07 +0200)]
narcissus-gpu: Add transient buffer allocator
Joshua Simmons [Sun, 9 Jul 2023 21:22:03 +0000 (23:22 +0200)]
narcissus-core: Elide lifetime in svg text fn
Joshua Simmons [Sun, 9 Jul 2023 21:21:17 +0000 (23:21 +0200)]
narcissus-core: Use explicit order of operations
Joshua Simmons [Sun, 9 Jul 2023 17:53:59 +0000 (19:53 +0200)]
narcissus-core: Fix potentially misaligned pointer
If `new_page_size` was not aligned to the size of PageFooter, then we
could create misaligned references to the PageFooter.
Joshua Simmons [Sun, 9 Jul 2023 17:50:09 +0000 (19:50 +0200)]
narcissus-core: Improve align_offset
Joshua Simmons [Tue, 13 Jun 2023 17:37:22 +0000 (19:37 +0200)]
narcissus-gpu: Use explict `vk::WHOLE_SIZE` const
Joshua Simmons [Sun, 11 Jun 2023 09:12:48 +0000 (11:12 +0200)]
narcissus-gpu: Lock once when writing descriptors
Joshua Simmons [Sun, 11 Jun 2023 08:02:32 +0000 (10:02 +0200)]
narcissus-gpu: Improve TLSF alignment handling
Adjust bucket sizes to ensure all allocations are aligned on a 16b
boundary.
Simplify and derive some constants rather than using magical values.
Change signature of `search_non_empty_bin` since the starting bin isn't
required anywhere else.
Joshua Simmons [Sun, 11 Jun 2023 07:58:06 +0000 (09:58 +0200)]
narcissus-core: Add extra svg helpers
Joshua Simmons [Wed, 7 Jun 2023 21:37:52 +0000 (23:37 +0200)]
narcissus-core: Add title to svg rect elements
Joshua Simmons [Wed, 7 Jun 2023 21:34:43 +0000 (23:34 +0200)]
narcissus-core: Add `lower_bound` and `upper_bound`
Calculates the range of values that will be attributed to a given
bin.
Joshua Simmons [Sat, 1 Jul 2023 09:13:23 +0000 (11:13 +0200)]
narcissus-gpu: Fix slice size mismatch
It's possible that returned memory is larger than the requested size, so
we need to truncate the destination slice to match the input data.
Joshua Simmons [Sun, 4 Jun 2023 09:07:08 +0000 (11:07 +0200)]
stb_truetype: Fix clippy lints
Joshua Simmons [Sun, 4 Jun 2023 09:06:47 +0000 (11:06 +0200)]
narcissus-core: Fix clippy lints
Joshua Simmons [Sun, 4 Jun 2023 09:06:14 +0000 (11:06 +0200)]
narcissus: Fix clippy lints
Joshua Simmons [Sun, 4 Jun 2023 08:54:51 +0000 (10:54 +0200)]
narcissus-math: Use tan_pi for projection matrix
Joshua Simmons [Sun, 4 Jun 2023 08:24:21 +0000 (10:24 +0200)]
narcissus-core: Add integer widening helper trait.
Joshua Simmons [Mon, 29 May 2023 18:09:24 +0000 (20:09 +0200)]
narcissus-gpu: Document block splitting behavior
A relatively subtle part of the TLSF paper is the choice of size when
splitting blocks as part of an allocation. Add a short comment and test.
Joshua Simmons [Mon, 29 May 2023 07:10:03 +0000 (09:10 +0200)]
narcissus-gpu: Add TLSF Allocator
Joshua Simmons [Mon, 29 May 2023 07:05:36 +0000 (09:05 +0200)]
core: Add helper for linear-log binning
A method for sub-dividing a range into bins that is fast to compute and
minimizes fragmentation.
See Paul Khuong's [linear-log bucketing](https://pvk.ca/Blog/2015/06/27/linear-log-bucketing-fast-versatile-simple/)
Joshua Simmons [Mon, 29 May 2023 07:04:39 +0000 (09:04 +0200)]
core: Fix wrapping assert when seeding Pcg64
Joshua Simmons [Sun, 23 Apr 2023 11:09:18 +0000 (13:09 +0200)]
Revert "build: Enable debug info compression"
This reverts commit
e915e8e8494a6a8bfb11387259bc67b8dec5fb29 .
Joshua Simmons [Thu, 20 Apr 2023 20:28:24 +0000 (22:28 +0200)]
core: Add svg debug output helper
Joshua Simmons [Thu, 20 Apr 2023 19:22:20 +0000 (21:22 +0200)]
misc: Improve cstr! macro implementation
Joshua Simmons [Sat, 15 Apr 2023 10:29:46 +0000 (12:29 +0200)]
build: Enable debug info compression
This is not really useful since our binary is so small, and just makes
linking slower. But it seemed cool so I wanted to turn it on.
Joshua Simmons [Wed, 15 Mar 2023 22:58:28 +0000 (23:58 +0100)]
narcissus-gpu: Add support for dedicated allocations
Joshua Simmons [Wed, 15 Mar 2023 21:57:30 +0000 (22:57 +0100)]
vulkan-sys: Add dedicated allocation structs
Joshua Simmons [Sun, 12 Mar 2023 11:35:49 +0000 (12:35 +0100)]
Use uniform std430 layout and row_major attribute
Joshua Simmons [Sat, 11 Mar 2023 08:55:36 +0000 (09:55 +0100)]
Tidy text shader
Joshua Simmons [Sat, 4 Mar 2023 14:28:34 +0000 (15:28 +0100)]
Improve cos_pi polynomial
Optimising for absolute error rather than relative error performs
slightly better for the cos_pi polynomial.
Joshua Simmons [Sat, 4 Mar 2023 13:11:49 +0000 (14:11 +0100)]
Fix doc comments
Joshua Simmons [Sat, 4 Mar 2023 12:39:21 +0000 (13:39 +0100)]
Comment tidying
Joshua Simmons [Sat, 4 Mar 2023 09:51:59 +0000 (10:51 +0100)]
Improve comment formatting
Joshua Simmons [Fri, 3 Mar 2023 22:30:50 +0000 (23:30 +0100)]
Fix redundant lifetime annotation clippy lint
Joshua Simmons [Fri, 3 Mar 2023 22:30:11 +0000 (23:30 +0100)]
Fix clippy lint
It doesn't like it when you implement Ord and Eq without also
implementing PartialOrd and PartialEq manually.
Joshua Simmons [Fri, 3 Mar 2023 22:28:03 +0000 (23:28 +0100)]
Improve font cache
Don't do so much work on kerning.
Clean and simplify up cache API.
Improve comments a little.
Joshua Simmons [Wed, 1 Mar 2023 19:25:09 +0000 (20:25 +0100)]
Add `select` and `shuffle` functions to `Pcg64`
Joshua Simmons [Tue, 28 Feb 2023 21:56:38 +0000 (22:56 +0100)]
Clean up main
Joshua Simmons [Tue, 28 Feb 2023 21:56:20 +0000 (22:56 +0100)]
Clean up font cache
Joshua Simmons [Tue, 28 Feb 2023 20:24:05 +0000 (21:24 +0100)]
Improve font cache
Always write the information for touched glyphs every frame, to try and
avoid accidently depending on those being stable across atlas updates.
When the font cache is out of space, perform an emergency repack,
recreating the atlas with only the glyphs touched in the current frame.
This should address both changing requirements on the font cache over
time from the application, as well as inefficient packing from
incrementally building the atlas.
Joshua Simmons [Mon, 27 Feb 2023 20:19:15 +0000 (21:19 +0100)]
Reformat imports
Joshua Simmons [Mon, 27 Feb 2023 20:15:43 +0000 (21:15 +0100)]
Move a bunch of helper code out of main.rs
Re-organize the pipeline structures as well.
Joshua Simmons [Mon, 27 Feb 2023 19:18:48 +0000 (20:18 +0100)]
Cache glyphs instead of re-drawing
Joshua Simmons [Sun, 26 Feb 2023 22:43:00 +0000 (23:43 +0100)]
Small improvements for font handling
Automatically determine whether to use oversampling.
Expand glyph capacity slightly.
Draw a range of font sizes.
Joshua Simmons [Sun, 26 Feb 2023 20:02:51 +0000 (21:02 +0100)]
Re-use glyph cache internal structures
Joshua Simmons [Sun, 26 Feb 2023 18:23:07 +0000 (19:23 +0100)]
Add support for basic text drawing
Move pipelines out of main.rs and into their own module.
Add new text pipeline.
Add new text shader.
Update main.rs to draw nice text. :)
Joshua Simmons [Sun, 26 Feb 2023 18:21:45 +0000 (19:21 +0100)]
First pass on narcissus-font library
Joshua Simmons [Sun, 26 Feb 2023 18:20:29 +0000 (19:20 +0100)]
Improve and expand stb_truetype wrappers
Joshua Simmons [Sun, 26 Feb 2023 18:17:50 +0000 (19:17 +0100)]
Add FiniteF32 and FiniteF64 wrappers
Ensures at creation time that the floating point values are neither NaN
nor infinities, so that we can implement `Hash`, `Eq` and `Ord` traits.
Joshua Simmons [Sun, 26 Feb 2023 18:16:59 +0000 (19:16 +0100)]
Improve Box's MaybeUninit helpers
Joshua Simmons [Sun, 26 Feb 2023 18:15:46 +0000 (19:15 +0100)]
Add support for `R8_UNORM` and `R8_SRGB` formats
Joshua Simmons [Sun, 26 Feb 2023 18:14:59 +0000 (19:14 +0100)]
Add Noto Sans Japanese font
Joshua Simmons [Sun, 26 Feb 2023 09:47:01 +0000 (10:47 +0100)]
Make rect_height_compare a stable sort
stb_rect_pack was producing different results on different platforms due to differing qsort implementations.
This change uses the existing was_packed field to make the sort stable.
Joshua Simmons [Sat, 25 Feb 2023 19:13:52 +0000 (20:13 +0100)]
Remove integer log2 functions
These have been stabilized as the ilog2 family in the standard library.
Joshua Simmons [Sat, 25 Feb 2023 19:12:07 +0000 (20:12 +0100)]
Add roboto font
Joshua Simmons [Sat, 25 Feb 2023 19:11:07 +0000 (20:11 +0100)]
Add debug info generation to stb build scripts
Joshua Simmons [Thu, 23 Feb 2023 11:49:40 +0000 (12:49 +0100)]
Re-organize directory structure
Joshua Simmons [Sun, 19 Feb 2023 14:17:21 +0000 (15:17 +0100)]
Remove blake3, F to pay respekts
Joshua Simmons [Sat, 18 Feb 2023 13:45:07 +0000 (14:45 +0100)]
Fix doctests
Joshua Simmons [Sat, 18 Feb 2023 13:28:11 +0000 (14:28 +0100)]
Fix clippy lint about struct name
Joshua Simmons [Sat, 18 Feb 2023 13:26:57 +0000 (14:26 +0100)]
Add stripped down blake3 implementation
Upstream URL: https://github.com/BLAKE3-team/BLAKE3/
Joshua Simmons [Sat, 18 Feb 2023 13:23:51 +0000 (14:23 +0100)]
Copy more unstable slice functions from std
Add `array_chunks` and `array_chunks_mut`.
Add `split_array_ref` and `split_array_mut`.
Add `rsplit_array_ref` and `rsplit_array_mut`.
Add `as_chunks` and `as_chunks_mut`.
Joshua Simmons [Sat, 18 Feb 2023 13:22:35 +0000 (14:22 +0100)]
Add Clone impl to FixedVec
Joshua Simmons [Tue, 7 Feb 2023 22:12:53 +0000 (23:12 +0100)]
Re-arrange depth barrier
Avoid creating and submitting an extra command buffer when we don't
really need to.
Joshua Simmons [Thu, 2 Feb 2023 09:34:23 +0000 (10:34 +0100)]
Transition depth attachment after creation
Joshua Simmons [Sat, 28 Jan 2023 10:01:31 +0000 (11:01 +0100)]
Fix new clippy lints
Mostly switching to inline formatting.
Joshua Simmons [Sat, 28 Jan 2023 09:58:14 +0000 (10:58 +0100)]
Simplify cmd buffer API using interior mutability
This avoids requiring a mutable borrow on the thread token, which lets
us store that token inside the cmd buffer object without ergonomic
issues.
Joshua Simmons [Sun, 4 Dec 2022 13:40:51 +0000 (14:40 +0100)]
Hook up compute pipeline creation
Joshua Simmons [Sat, 3 Dec 2022 20:17:03 +0000 (21:17 +0100)]
Tidy embedded spir-v
Joshua Simmons [Sat, 3 Dec 2022 20:05:58 +0000 (21:05 +0100)]
Add compute shader dispatch command
Joshua Simmons [Fri, 2 Dec 2022 21:24:51 +0000 (22:24 +0100)]
Add blending and blitting
Joshua Simmons [Fri, 2 Dec 2022 21:24:27 +0000 (22:24 +0100)]
Add `create_buffer_with_data` helper
Joshua Simmons [Fri, 2 Dec 2022 21:17:42 +0000 (22:17 +0100)]
Add quantization helpers
Joshua Simmons [Fri, 2 Dec 2022 21:16:28 +0000 (22:16 +0100)]
Add include_bytes variant with custom alignment
Joshua Simmons [Fri, 2 Dec 2022 21:15:50 +0000 (22:15 +0100)]
Remove old stb_image dependency from core
Joshua Simmons [Fri, 2 Dec 2022 21:13:34 +0000 (22:13 +0100)]
Expand stb_truetype wrapper
Joshua Simmons [Wed, 23 Nov 2022 21:51:51 +0000 (22:51 +0100)]
Add newlines to the end of C files
Joshua Simmons [Wed, 23 Nov 2022 21:23:28 +0000 (22:23 +0100)]
Add stb_truetype wrapper
Joshua Simmons [Sun, 20 Nov 2022 22:46:13 +0000 (23:46 +0100)]
Rename MemoryLocation enum variants
Try to be more explicit about what you're getting with each option.
Joshua Simmons [Sun, 20 Nov 2022 16:40:49 +0000 (17:40 +0100)]
Remove empty test
Joshua Simmons [Sun, 20 Nov 2022 16:35:01 +0000 (17:35 +0100)]
Move image stuff into its own crate
Joshua Simmons [Sat, 19 Nov 2022 23:32:55 +0000 (00:32 +0100)]
Move frame counter out of vulkan module
Joshua Simmons [Sat, 19 Nov 2022 23:23:18 +0000 (00:23 +0100)]
Rework swapchain handling
Move some more logic into the app, and avoid creating a hard dependency
between narcissus-app and narcissus-gpu.
Joshua Simmons [Sat, 19 Nov 2022 23:21:20 +0000 (00:21 +0100)]
Add trait for passing OS window information around
Joshua Simmons [Sat, 19 Nov 2022 23:20:39 +0000 (00:20 +0100)]
Add `Upcast` trait for casting to super-trait
Joshua Simmons [Sat, 19 Nov 2022 23:18:12 +0000 (00:18 +0100)]
Add `cstr_from_bytes_until_nul`
Joshua Simmons [Sat, 19 Nov 2022 23:17:31 +0000 (00:17 +0100)]
Add Hash impl for flags
Joshua Simmons [Sat, 19 Nov 2022 23:14:49 +0000 (00:14 +0100)]
Add function to retreive sdl header version
Joshua Simmons [Sat, 19 Nov 2022 17:17:58 +0000 (18:17 +0100)]
Add xcb, xlib and wayland surface support
Joshua Simmons [Sat, 19 Nov 2022 17:17:01 +0000 (18:17 +0100)]
Add `SDL_GetWindowWMInfo`
Joshua Simmons [Thu, 17 Nov 2022 18:26:54 +0000 (19:26 +0100)]
Support general layout in image bindings
Joshua Simmons [Thu, 17 Nov 2022 08:05:03 +0000 (09:05 +0100)]
Simplify image barrier usage