]> git.nega.tv - josh/narcissus/log
josh/narcissus
2 years agoImprove Box's MaybeUninit helpers
Joshua Simmons [Sun, 26 Feb 2023 18:16:59 +0000 (19:16 +0100)]
Improve Box's MaybeUninit helpers

2 years agoAdd support for `R8_UNORM` and `R8_SRGB` formats
Joshua Simmons [Sun, 26 Feb 2023 18:15:46 +0000 (19:15 +0100)]
Add support for `R8_UNORM` and `R8_SRGB` formats

2 years agoAdd Noto Sans Japanese font
Joshua Simmons [Sun, 26 Feb 2023 18:14:59 +0000 (19:14 +0100)]
Add Noto Sans Japanese font

2 years agoMake rect_height_compare a stable sort
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.

2 years agoRemove integer log2 functions
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.

2 years agoAdd roboto font
Joshua Simmons [Sat, 25 Feb 2023 19:12:07 +0000 (20:12 +0100)]
Add roboto font

2 years agoAdd debug info generation to stb build scripts
Joshua Simmons [Sat, 25 Feb 2023 19:11:07 +0000 (20:11 +0100)]
Add debug info generation to stb build scripts

2 years agoRe-organize directory structure
Joshua Simmons [Thu, 23 Feb 2023 11:49:40 +0000 (12:49 +0100)]
Re-organize directory structure

2 years agoRemove blake3, F to pay respekts
Joshua Simmons [Sun, 19 Feb 2023 14:17:21 +0000 (15:17 +0100)]
Remove blake3, F to pay respekts

2 years agoFix doctests
Joshua Simmons [Sat, 18 Feb 2023 13:45:07 +0000 (14:45 +0100)]
Fix doctests

2 years agoFix clippy lint about struct name
Joshua Simmons [Sat, 18 Feb 2023 13:28:11 +0000 (14:28 +0100)]
Fix clippy lint about struct name

2 years agoAdd stripped down blake3 implementation
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/

2 years agoCopy more unstable slice functions from std
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`.

2 years agoAdd Clone impl to FixedVec
Joshua Simmons [Sat, 18 Feb 2023 13:22:35 +0000 (14:22 +0100)]
Add Clone impl to FixedVec

2 years agoRe-arrange depth barrier
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.

2 years agoTransition depth attachment after creation
Joshua Simmons [Thu, 2 Feb 2023 09:34:23 +0000 (10:34 +0100)]
Transition depth attachment after creation

2 years agoFix new clippy lints
Joshua Simmons [Sat, 28 Jan 2023 10:01:31 +0000 (11:01 +0100)]
Fix new clippy lints

Mostly switching to inline formatting.

2 years agoSimplify cmd buffer API using interior mutability
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.

2 years agoHook up compute pipeline creation
Joshua Simmons [Sun, 4 Dec 2022 13:40:51 +0000 (14:40 +0100)]
Hook up compute pipeline creation

2 years agoTidy embedded spir-v
Joshua Simmons [Sat, 3 Dec 2022 20:17:03 +0000 (21:17 +0100)]
Tidy embedded spir-v

2 years agoAdd compute shader dispatch command
Joshua Simmons [Sat, 3 Dec 2022 20:05:58 +0000 (21:05 +0100)]
Add compute shader dispatch command

2 years agoAdd blending and blitting
Joshua Simmons [Fri, 2 Dec 2022 21:24:51 +0000 (22:24 +0100)]
Add blending and blitting

2 years agoAdd `create_buffer_with_data` helper
Joshua Simmons [Fri, 2 Dec 2022 21:24:27 +0000 (22:24 +0100)]
Add `create_buffer_with_data` helper

2 years agoAdd quantization helpers
Joshua Simmons [Fri, 2 Dec 2022 21:17:42 +0000 (22:17 +0100)]
Add quantization helpers

2 years agoAdd include_bytes variant with custom alignment
Joshua Simmons [Fri, 2 Dec 2022 21:16:28 +0000 (22:16 +0100)]
Add include_bytes variant with custom alignment

2 years agoRemove old stb_image dependency from core
Joshua Simmons [Fri, 2 Dec 2022 21:15:50 +0000 (22:15 +0100)]
Remove old stb_image dependency from core

2 years agoExpand stb_truetype wrapper
Joshua Simmons [Fri, 2 Dec 2022 21:13:34 +0000 (22:13 +0100)]
Expand stb_truetype wrapper

2 years agoAdd newlines to the end of C files
Joshua Simmons [Wed, 23 Nov 2022 21:51:51 +0000 (22:51 +0100)]
Add newlines to the end of C files

2 years agoAdd stb_truetype wrapper
Joshua Simmons [Wed, 23 Nov 2022 21:23:28 +0000 (22:23 +0100)]
Add stb_truetype wrapper

2 years agoRename MemoryLocation enum variants
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.

2 years agoRemove empty test
Joshua Simmons [Sun, 20 Nov 2022 16:40:49 +0000 (17:40 +0100)]
Remove empty test

2 years agoMove image stuff into its own crate
Joshua Simmons [Sun, 20 Nov 2022 16:35:01 +0000 (17:35 +0100)]
Move image stuff into its own crate

2 years agoMove frame counter out of vulkan module
Joshua Simmons [Sat, 19 Nov 2022 23:32:55 +0000 (00:32 +0100)]
Move frame counter out of vulkan module

2 years agoRework swapchain handling
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.

2 years agoAdd trait for passing OS window information around
Joshua Simmons [Sat, 19 Nov 2022 23:21:20 +0000 (00:21 +0100)]
Add trait for passing OS window information around

2 years agoAdd `Upcast` trait for casting to super-trait
Joshua Simmons [Sat, 19 Nov 2022 23:20:39 +0000 (00:20 +0100)]
Add `Upcast` trait for casting to super-trait

2 years agoAdd `cstr_from_bytes_until_nul`
Joshua Simmons [Sat, 19 Nov 2022 23:18:12 +0000 (00:18 +0100)]
Add `cstr_from_bytes_until_nul`

2 years agoAdd Hash impl for flags
Joshua Simmons [Sat, 19 Nov 2022 23:17:31 +0000 (00:17 +0100)]
Add Hash impl for flags

2 years agoAdd function to retreive sdl header version
Joshua Simmons [Sat, 19 Nov 2022 23:14:49 +0000 (00:14 +0100)]
Add function to retreive sdl header version

2 years agoAdd xcb, xlib and wayland surface support
Joshua Simmons [Sat, 19 Nov 2022 17:17:58 +0000 (18:17 +0100)]
Add xcb, xlib and wayland surface support

2 years agoAdd `SDL_GetWindowWMInfo`
Joshua Simmons [Sat, 19 Nov 2022 17:17:01 +0000 (18:17 +0100)]
Add `SDL_GetWindowWMInfo`

2 years agoSupport general layout in image bindings
Joshua Simmons [Thu, 17 Nov 2022 18:26:54 +0000 (19:26 +0100)]
Support general layout in image bindings

2 years agoSimplify image barrier usage
Joshua Simmons [Thu, 17 Nov 2022 08:05:03 +0000 (09:05 +0100)]
Simplify image barrier usage

2 years agoImprove default for ImageSubresourceRange
Joshua Simmons [Thu, 17 Nov 2022 08:03:32 +0000 (09:03 +0100)]
Improve default for ImageSubresourceRange

Previously it was hard-coding 1 for the `mip_level_count` and
`array_layer_count`, however we can use all bits set as a sentinel for
all remaining mip levels / array layers.

2 years agoLet there be light!
Joshua Simmons [Wed, 16 Nov 2022 23:42:12 +0000 (00:42 +0100)]
Let there be light!

2 years agoAdd Default impls for subresource structs
Joshua Simmons [Wed, 16 Nov 2022 23:33:21 +0000 (00:33 +0100)]
Add Default impls for subresource structs

2 years agoFix missing file from previous commit
Joshua Simmons [Wed, 16 Nov 2022 23:28:45 +0000 (00:28 +0100)]
Fix missing file from previous commit

2 years agoRename Texture to Image to match vulkan convention
Joshua Simmons [Wed, 16 Nov 2022 23:25:19 +0000 (00:25 +0100)]
Rename Texture to Image to match vulkan convention

2 years agoAdd basic barriers and dress BLÅHAJ in a texture
Joshua Simmons [Wed, 16 Nov 2022 08:07:31 +0000 (09:07 +0100)]
Add basic barriers and dress BLÅHAJ in a texture

2 years agoSimplify `Mat3::mul`
Joshua Simmons [Mon, 14 Nov 2022 20:52:28 +0000 (21:52 +0100)]
Simplify `Mat3::mul`

2 years agoIncrease the shark factor
Joshua Simmons [Mon, 14 Nov 2022 20:31:50 +0000 (21:31 +0100)]
Increase the shark factor

2 years agoSprinkle some inlines and unrolling for debug perf
Joshua Simmons [Mon, 14 Nov 2022 20:31:16 +0000 (21:31 +0100)]
Sprinkle some inlines and unrolling for debug perf

2 years agoAdd shorthand functions for vector and point new
Joshua Simmons [Sun, 13 Nov 2022 22:51:52 +0000 (23:51 +0100)]
Add shorthand functions for vector and point new

2 years agoAdd test for cross product :)
Joshua Simmons [Sun, 13 Nov 2022 22:35:41 +0000 (23:35 +0100)]
Add test for cross product :)

2 years agoFix matrix handling now cross-product works
Joshua Simmons [Sun, 13 Nov 2022 22:29:24 +0000 (23:29 +0100)]
Fix matrix handling now cross-product works

2 years agoSimplify use of shader build script
Joshua Simmons [Sun, 13 Nov 2022 21:50:35 +0000 (22:50 +0100)]
Simplify use of shader build script

2 years agoAdd note about rotation direction
Joshua Simmons [Sun, 13 Nov 2022 21:49:41 +0000 (22:49 +0100)]
Add note about rotation direction

2 years agoFix typo in cross-product implementation
Joshua Simmons [Sun, 13 Nov 2022 21:07:36 +0000 (22:07 +0100)]
Fix typo in cross-product implementation

2 years agoMultiple Shark Zone
Joshua Simmons [Sun, 13 Nov 2022 16:20:15 +0000 (17:20 +0100)]
Multiple Shark Zone

2 years agoRename `FrameToken` -> `Frame`
Joshua Simmons [Sun, 13 Nov 2022 13:13:56 +0000 (14:13 +0100)]
Rename `FrameToken` -> `Frame`

2 years agoTidy up the way we handle cmd buffers
Joshua Simmons [Sun, 13 Nov 2022 13:03:39 +0000 (14:03 +0100)]
Tidy up the way we handle cmd buffers

Use the arena allocator to bump allocate them from the frame structure,
and return a wrapper struct holding a pointer to the concrete type.

Simplify a few signatures now we have a direct pointer to the cmd
buffer.

2 years agoAdd basic input events
Joshua Simmons [Sun, 13 Nov 2022 11:04:52 +0000 (12:04 +0100)]
Add basic input events

2 years agoAdd const for magical swapchain destruction delay
Joshua Simmons [Sat, 12 Nov 2022 23:22:56 +0000 (00:22 +0100)]
Add const for magical swapchain destruction delay

2 years agoBundle all per-thread frame objects
Joshua Simmons [Sat, 12 Nov 2022 23:08:09 +0000 (00:08 +0100)]
Bundle all per-thread frame objects

2 years agoTidy up vulkan stuff
Joshua Simmons [Sat, 12 Nov 2022 22:46:18 +0000 (23:46 +0100)]
Tidy up vulkan stuff

2 years agoblåhaj bring up 🦈🦈🦈
Joshua Simmons [Sat, 12 Nov 2022 20:46:24 +0000 (21:46 +0100)]
blåhaj bring up 🦈🦈🦈

2 years agoTidy some lints and documentation
Joshua Simmons [Fri, 11 Nov 2022 23:50:53 +0000 (00:50 +0100)]
Tidy some lints and documentation

2 years agoFix `Arc` incorrectly initializing itself as `Rc`
Joshua Simmons [Fri, 11 Nov 2022 23:02:58 +0000 (00:02 +0100)]
Fix `Arc` incorrectly initializing itself as `Rc`

2 years agoFix memory safety issue in `HybridArena`
Joshua Simmons [Fri, 11 Nov 2022 22:24:48 +0000 (23:24 +0100)]
Fix memory safety issue in `HybridArena`

Calling `reset()` on an initialized, then moved `HybridArena` wouldn't
correctly update the page head pointer, causing reset to be called on
somebody else's bit of stack memory.

2 years agoRemove broken attribute from `static_assert` macro
Joshua Simmons [Fri, 11 Nov 2022 22:23:36 +0000 (23:23 +0100)]
Remove broken attribute from `static_assert` macro

2 years agoAdd fallback for `round_ties_to_even` SSE4.1 path
Joshua Simmons [Fri, 11 Nov 2022 21:53:38 +0000 (22:53 +0100)]
Add fallback for `round_ties_to_even` SSE4.1 path

2 years agoRemove comparison with the empty page
Joshua Simmons [Fri, 11 Nov 2022 20:20:14 +0000 (21:20 +0100)]
Remove comparison with the empty page

By marking the empty page as a "stack" page, we can avoid needing to
compare with the empty page when allocating from a hybrid array.

2 years agoAdd bounded random function to `Pcg64`
Joshua Simmons [Wed, 9 Nov 2022 21:10:26 +0000 (22:10 +0100)]
Add bounded random function to `Pcg64`

Remove `Pcg32` because I don't think we're likely to need that for
anything.

2 years agoAdd `mul_full_width_{u8,u16,u32,u64}` functions
Joshua Simmons [Wed, 9 Nov 2022 21:00:15 +0000 (22:00 +0100)]
Add `mul_full_width_{u8,u16,u32,u64}` functions

2 years agoFix clippy lints in stb_image build script
Joshua Simmons [Wed, 9 Nov 2022 20:56:28 +0000 (21:56 +0100)]
Fix clippy lints in stb_image build script

2 years agoAdd basic random numbers
Joshua Simmons [Tue, 8 Nov 2022 22:25:55 +0000 (23:25 +0100)]
Add basic random numbers

2 years ago[meta] Update rust in github actions
Josh Simmons [Sun, 6 Nov 2022 10:45:09 +0000 (11:45 +0100)]
[meta] Update rust in github actions

2 years agoUse `HybridArena` instead of heap allocation
Joshua Simmons [Sun, 6 Nov 2022 10:08:20 +0000 (11:08 +0100)]
Use `HybridArena` instead of heap allocation

2 years agoUse `let..else` when handling slice lengths
Joshua Simmons [Sun, 6 Nov 2022 10:06:32 +0000 (11:06 +0100)]
Use `let..else` when handling slice lengths

Allow `VulkanSlice2` to be created from mutable references.

2 years agoUse Rust's ThreadId instead of gettid
Joshua Simmons [Sat, 5 Nov 2022 12:53:12 +0000 (13:53 +0100)]
Use Rust's ThreadId instead of gettid

It's a little bit nasty due to needing to wrap it in Option, however it
avoids making the gettid syscall every time we do a lock / unlock
operation. Small performance improvement in debug mode.

2 years agoKeep frame pointers by default
Joshua Simmons [Sat, 5 Nov 2022 12:51:29 +0000 (13:51 +0100)]
Keep frame pointers by default

2 years agoHandle each vulkan pool type separately
Joshua Simmons [Sat, 5 Nov 2022 10:22:39 +0000 (11:22 +0100)]
Handle each vulkan pool type separately

2 years agoImprove lifetimes command buffer tokens
Joshua Simmons [Sat, 5 Nov 2022 10:00:23 +0000 (11:00 +0100)]
Improve lifetimes command buffer tokens

Not binding to the lifetime of the thread token meant you could create
multiple mut references to the same command buffer with
`command_buffer_mut`.

Relax requirements for mut references on the command buffer tokens in
the API as they're not required.

2 years agoFix reduction using the wrong rounding mode (#1)
Josh Simmons [Fri, 4 Nov 2022 20:59:59 +0000 (21:59 +0100)]
Fix reduction using the wrong rounding mode (#1)

Previously we were using `f32::round` in the reduction step, however
that isn't correct. We really need IEEE-754 tiesToEven semantics for the
rounding step, so manually implement that.

2 years agoAllocate uniform buffer in host visible memory
Joshua Simmons [Fri, 4 Nov 2022 18:12:12 +0000 (19:12 +0100)]
Allocate uniform buffer in host visible memory

2 years agoAdd descriptor APIs and move the triangle
Joshua Simmons [Thu, 3 Nov 2022 21:52:35 +0000 (22:52 +0100)]
Add descriptor APIs and move the triangle

2 years agoFix clippy lints
Joshua Simmons [Thu, 3 Nov 2022 21:51:42 +0000 (22:51 +0100)]
Fix clippy lints

2 years agoFix clippy dead code warning
Joshua Simmons [Thu, 3 Nov 2022 21:56:47 +0000 (22:56 +0100)]
Fix clippy dead code warning

2 years agoExpand arena functionality
Joshua Simmons [Thu, 3 Nov 2022 21:18:31 +0000 (22:18 +0100)]
Expand arena functionality

Add `alloc_slice_fill_with`
Add `alloc_slice_fill_copy`
Add `alloc_slice_fill_clone`
Add `alloc_slice_fill_iter`

2 years agoAllow creating vulkan slices from mut slices
Joshua Simmons [Thu, 3 Nov 2022 21:17:30 +0000 (22:17 +0100)]
Allow creating vulkan slices from mut slices

2 years agoTarget modern CPU by default
Joshua Simmons [Thu, 3 Nov 2022 21:14:54 +0000 (22:14 +0100)]
Target modern CPU by default

2 years agoFix base `Mat4 * Vec4` function name
Joshua Simmons [Thu, 3 Nov 2022 21:14:17 +0000 (22:14 +0100)]
Fix base `Mat4 * Vec4` function name

2 years agoAdd `Arena` and `HybridArena`
Joshua Simmons [Wed, 2 Nov 2022 21:16:50 +0000 (22:16 +0100)]
Add `Arena` and `HybridArena`

Add two variants on a simple bump allocator. Based loosly on the bumpalo
crate.

Provides two types, `Arena` which always allocates from the heap and
`HybridArena` which will first use a stack allocated page, then fall
back to allocating from the heap as well.

2 years agoAdd vk descriptor management functions
Joshua Simmons [Wed, 2 Nov 2022 21:15:47 +0000 (22:15 +0100)]
Add vk descriptor management functions

2 years agoUse fully qualified path to mold binary
Joshua Simmons [Sat, 29 Oct 2022 15:47:44 +0000 (17:47 +0200)]
Use fully qualified path to mold binary

Load it into the /usr/ instead of /usr/local on github actions so the
path is the same as when installed as a regular package.

2 years agoRe-add clang as linker
Joshua Simmons [Sat, 29 Oct 2022 15:32:52 +0000 (17:32 +0200)]
Re-add clang as linker

2 years agoUpdate github actions VM to Ubuntu 22.04
Joshua Simmons [Sat, 29 Oct 2022 15:29:33 +0000 (17:29 +0200)]
Update github actions VM to Ubuntu 22.04

2 years agoDon't need to force clang linker anymore
Joshua Simmons [Sat, 29 Oct 2022 15:03:14 +0000 (17:03 +0200)]
Don't need to force clang linker anymore

2 years agoAdd `BindGroupLayout`
Joshua Simmons [Sat, 29 Oct 2022 14:14:54 +0000 (16:14 +0200)]
Add `BindGroupLayout`

2 years agoRename `request_command_buffer` to `create_...`
Joshua Simmons [Sat, 29 Oct 2022 14:12:39 +0000 (16:12 +0200)]
Rename `request_command_buffer` to `create_...`

The distinction between requesting and creating seems a bit tenuious and
probably just confusing. Might re-visit this later once the API is more
complete.