]> git.nega.tv - josh/narcissus/log
josh/narcissus
5 weeks agoshark: Improve camera controls main
Joshua Simmons [Mon, 27 Oct 2025 22:40:10 +0000 (23:40 +0100)]
shark: Improve camera controls

5 weeks agonarcissus-app: Add mouse wheel events
Joshua Simmons [Mon, 27 Oct 2025 22:39:38 +0000 (23:39 +0100)]
narcissus-app: Add mouse wheel events

5 weeks agoshark: Render only front-facing block faces
Joshua Simmons [Sat, 25 Oct 2025 14:12:57 +0000 (16:12 +0200)]
shark: Render only front-facing block faces

5 weeks agoshark: Add basic camera control
Joshua Simmons [Sun, 26 Oct 2025 19:29:00 +0000 (20:29 +0100)]
shark: Add basic camera control

5 weeks agoshark: Add RGP trigger
Joshua Simmons [Sat, 25 Oct 2025 17:45:35 +0000 (19:45 +0200)]
shark: Add RGP trigger

5 weeks agoshark: Fix movement speed
Joshua Simmons [Sat, 25 Oct 2025 14:13:49 +0000 (16:13 +0200)]
shark: Fix movement speed

6 weeks agoshark: Render a square with mesh shaders
Joshua Simmons [Tue, 21 Oct 2025 21:19:31 +0000 (23:19 +0200)]
shark: Render a square with mesh shaders

6 weeks agonarcissus-gpu: Plumb through mesh shader calls
Joshua Simmons [Tue, 21 Oct 2025 17:41:55 +0000 (19:41 +0200)]
narcissus-gpu: Plumb through mesh shader calls

Additionally, require mesh shaders by default.

6 weeks agovulkan-sys: Add VK_EXT_mesh_shader support
Joshua Simmons [Tue, 21 Oct 2025 17:15:36 +0000 (19:15 +0200)]
vulkan-sys: Add VK_EXT_mesh_shader support

6 weeks agoshark: Move ui into its own module
Joshua Simmons [Sun, 19 Oct 2025 19:03:02 +0000 (21:03 +0200)]
shark: Move ui into its own module

6 weeks agoshark: Tone down the 2d drawing
Joshua Simmons [Sun, 19 Oct 2025 18:24:58 +0000 (20:24 +0200)]
shark: Tone down the 2d drawing

6 weeks agoshark-shaders: Add color_map module
Joshua Simmons [Sun, 19 Oct 2025 14:29:07 +0000 (16:29 +0200)]
shark-shaders: Add color_map module

6 weeks agoshark-shaders: Add special-case for single element tiles
Joshua Simmons [Sun, 19 Oct 2025 14:10:09 +0000 (16:10 +0200)]
shark-shaders: Add special-case for single element tiles

6 weeks agoshark-shaders: Improve how we handle clipping for rects
Joshua Simmons [Sun, 19 Oct 2025 10:34:50 +0000 (12:34 +0200)]
shark-shaders: Improve how we handle clipping for rects

6 weeks agoshark-shaders: Improve rounded-rect sdf a little
Joshua Simmons [Sat, 18 Oct 2025 23:16:57 +0000 (01:16 +0200)]
shark-shaders: Improve rounded-rect sdf a little

6 weeks agoshark-shaders: Improve the performance of draw 2d shaders
Joshua Simmons [Thu, 16 Oct 2025 20:53:54 +0000 (22:53 +0200)]
shark-shaders: Improve the performance of draw 2d shaders

Major improvement is to track the alpha value during resolve, and use it
to determine a conservative cut-off point for command drawing.

During resolve, remove words which became empty after culling.

Additionally use an indirect dispatch for drawing work, rather than
launching workgroups which will immediately terminate.

6 weeks agoshark-shaders: Improve error handling for slang
Joshua Simmons [Sat, 18 Oct 2025 21:39:41 +0000 (23:39 +0200)]
shark-shaders: Improve error handling for slang

6 weeks agoshark: Switch from fp16 to 8-bit ui buffer
Joshua Simmons [Sat, 18 Oct 2025 21:38:48 +0000 (23:38 +0200)]
shark: Switch from fp16 to 8-bit ui buffer

6 weeks agoshark: Move barrier till after UI work
Joshua Simmons [Sat, 18 Oct 2025 21:37:04 +0000 (23:37 +0200)]
shark: Move barrier till after UI work

7 weeks agoshark-shaders: Migrate radix_sort pipeline to slang
Joshua Simmons [Sun, 12 Oct 2025 10:33:36 +0000 (12:33 +0200)]
shark-shaders: Migrate radix_sort pipeline to slang

7 weeks agoshark-shaders: Migrate composite pipeline to slang
Joshua Simmons [Sun, 12 Oct 2025 10:30:29 +0000 (12:30 +0200)]
shark-shaders: Migrate composite pipeline to slang

7 weeks agoshark-shaders: Migrate draw_2d pipeline to slang
Joshua Simmons [Sun, 12 Oct 2025 09:39:09 +0000 (11:39 +0200)]
shark-shaders: Migrate draw_2d pipeline to slang

7 weeks agoshark-shaders: Migrate basic shader to slang
Joshua Simmons [Sat, 4 Oct 2025 21:00:01 +0000 (23:00 +0200)]
shark-shaders: Migrate basic shader to slang

8 weeks agonarcissus-gpu: Add extra feature checks
Joshua Simmons [Thu, 9 Oct 2025 18:04:31 +0000 (20:04 +0200)]
narcissus-gpu: Add extra feature checks

8 weeks agomisc: Fix clippy lints
Joshua Simmons [Thu, 9 Oct 2025 17:40:48 +0000 (19:40 +0200)]
misc: Fix clippy lints

2 months agonarcissus-maths: Remove unnecessary unsafe
Joshua Simmons [Sat, 4 Oct 2025 20:58:51 +0000 (22:58 +0200)]
narcissus-maths: Remove unnecessary unsafe

2 months agovulkan-sys: Fix formatting
Joshua Simmons [Sat, 4 Oct 2025 20:57:19 +0000 (22:57 +0200)]
vulkan-sys: Fix formatting

2 months agonarcissus-core: Remove unsafe refs from virtual_vec
Joshua Simmons [Sat, 4 Oct 2025 20:55:39 +0000 (22:55 +0200)]
narcissus-core: Remove unsafe refs from virtual_vec

2 months agonarcissus-gpu: Add storage images to descriptor pool
Joshua Simmons [Sat, 4 Oct 2025 20:53:16 +0000 (22:53 +0200)]
narcissus-gpu: Add storage images to descriptor pool

7 months agonarcissus-math: Add intrinsics version of sincospi
Josh Simmons [Thu, 17 Apr 2025 06:34:45 +0000 (08:34 +0200)]
narcissus-math: Add intrinsics version of sincospi

7 months agoshark-shaders: Improve performance of rectangles
Josh Simmons [Tue, 8 Apr 2025 18:29:02 +0000 (20:29 +0200)]
shark-shaders: Improve performance of rectangles

Avoid doing all the mathsy things for samples that don't intersect the
draw command at all...

7 months agonarcissus-math: Update sin-pi error bounds
Josh Simmons [Sun, 6 Apr 2025 05:11:56 +0000 (07:11 +0200)]
narcissus-math: Update sin-pi error bounds

7 months agomisc: Fix formatting after the edition upgrade
Josh Simmons [Sat, 5 Apr 2025 21:41:30 +0000 (23:41 +0200)]
misc: Fix formatting after the edition upgrade

7 months agonarcissus-core: Use stable trait upcasting
Josh Simmons [Sat, 5 Apr 2025 21:38:07 +0000 (23:38 +0200)]
narcissus-core: Use stable trait upcasting

8 months agomisc: Fix clippy lints
Josh Simmons [Sat, 5 Apr 2025 21:28:47 +0000 (23:28 +0200)]
misc: Fix clippy lints

8 months agomisc: Update to Rust 2024 edition
Josh Simmons [Sat, 5 Apr 2025 21:26:07 +0000 (23:26 +0200)]
misc: Update to Rust 2024 edition

8 months agoshark-shaders: Omit image format in uniform bindings
Josh Simmons [Sat, 5 Apr 2025 21:07:56 +0000 (23:07 +0200)]
shark-shaders: Omit image format in uniform bindings

Avoids a validation issue when binding a swapchain image in a different
format.

8 months agonarcissus-gpu: Enable swapchain_maintenance1
Josh Simmons [Sat, 5 Apr 2025 14:16:16 +0000 (16:16 +0200)]
narcissus-gpu: Enable swapchain_maintenance1

Avoids a validator when using the feature without enabling it.

8 months agonarcissus-maths: Fix clippy lints
Josh Simmons [Mon, 2 Dec 2024 21:55:01 +0000 (22:55 +0100)]
narcissus-maths: Fix clippy lints

8 months agonarcissus-core: Rename `rand` to `random
Josh Simmons [Mon, 2 Dec 2024 21:46:47 +0000 (22:46 +0100)]
narcissus-core: Rename `rand` to `random

8 months agonarcissus-core: Add platform secure random API
Josh Simmons [Mon, 2 Dec 2024 21:45:10 +0000 (22:45 +0100)]
narcissus-core: Add platform secure random API

8 months agonarcissus-core: Add `errno` API
Josh Simmons [Mon, 2 Dec 2024 21:43:42 +0000 (22:43 +0100)]
narcissus-core: Add `errno` API

8 months agonarcissus-math: Make `sin_cos_pi_f32` branchless
Josh Simmons [Mon, 2 Dec 2024 18:20:02 +0000 (19:20 +0100)]
narcissus-math: Make `sin_cos_pi_f32` branchless

12 months agoshark: Deal with SDL3 environment variables
Josh Simmons [Sat, 30 Nov 2024 12:43:17 +0000 (13:43 +0100)]
shark: Deal with SDL3 environment variables

12 months agoshark: Move draw stuff into its own module
Josh Simmons [Sat, 30 Nov 2024 12:24:34 +0000 (13:24 +0100)]
shark: Move draw stuff into its own module

12 months agoshark: Move game stuff into its own module
Josh Simmons [Sat, 30 Nov 2024 10:29:06 +0000 (11:29 +0100)]
shark: Move game stuff into its own module

12 months agovulkan-sys: Fix clippy lints in triangle example
Josh Simmons [Sat, 30 Nov 2024 09:06:15 +0000 (10:06 +0100)]
vulkan-sys: Fix clippy lints in triangle example

12 months agovulkan-sys: Avoid laundering unsafe in `vk_check`
Josh Simmons [Sat, 30 Nov 2024 09:01:24 +0000 (10:01 +0100)]
vulkan-sys: Avoid laundering unsafe in `vk_check`

12 months agonarcissus-gpu: Tidy up the push constants API
Josh Simmons [Fri, 29 Nov 2024 22:13:01 +0000 (23:13 +0100)]
narcissus-gpu: Tidy up the push constants API

12 months agonarcissus-gpu: Remove an unsafe fn from `PersistentBuffer`
Josh Simmons [Fri, 29 Nov 2024 22:11:31 +0000 (23:11 +0100)]
narcissus-gpu: Remove an unsafe fn from `PersistentBuffer`

It was pretty sus and the test can just do the unsafe thing it wants to
do directly.

12 months agometa: Set clippy allow list globally
Josh Simmons [Fri, 29 Nov 2024 21:40:30 +0000 (22:40 +0100)]
meta: Set clippy allow list globally

Finally we can disable the pointless too many arguments lint...

12 months agonarcissus-gpu: Avoid laundering unsafe in `vk_check`
Josh Simmons [Fri, 29 Nov 2024 21:28:43 +0000 (22:28 +0100)]
narcissus-gpu: Avoid laundering unsafe in `vk_check`

12 months agomisc: Fix clippy lints
Josh Simmons [Fri, 29 Nov 2024 21:15:55 +0000 (22:15 +0100)]
misc: Fix clippy lints

12 months agonarcissus-gpu: Add some image barrier helpers
Josh Simmons [Mon, 18 Nov 2024 19:45:51 +0000 (20:45 +0100)]
narcissus-gpu: Add some image barrier helpers

12 months agonarcissus-gpu: Remove explicit subresource ranges
Josh Simmons [Mon, 18 Nov 2024 19:22:24 +0000 (20:22 +0100)]
narcissus-gpu: Remove explicit subresource ranges

Rely on the default implementation instead.

12 months agoshark: Fix barriers!
Joshua Simmons [Mon, 18 Nov 2024 18:22:58 +0000 (19:22 +0100)]
shark: Fix barriers!

We're clean on validation now.

12 months agonarcissus-gpu: Use defaults for queue families
Joshua Simmons [Mon, 18 Nov 2024 18:21:41 +0000 (19:21 +0100)]
narcissus-gpu: Use defaults for queue families

12 months agovulkan-sys: Default to `QUEUE_FAMILY_IGNORED` in barriers
Joshua Simmons [Mon, 18 Nov 2024 18:20:15 +0000 (19:20 +0100)]
vulkan-sys: Default to `QUEUE_FAMILY_IGNORED` in barriers

12 months agonarcissus-gpu: Use default for image subresource
Joshua Simmons [Mon, 18 Nov 2024 18:08:12 +0000 (19:08 +0100)]
narcissus-gpu: Use default for image subresource

12 months agonarcissus-gpu: Fix universal queue signal stage mask
Joshua Simmons [Mon, 18 Nov 2024 18:04:59 +0000 (19:04 +0100)]
narcissus-gpu: Fix universal queue signal stage mask

We can do work from compute too, in which case we need to wait for it.
Rather than being clever, just add both stages unconditionally.

12 months agonarcissus-gpu: Fix dst_stage_mask for swapchain transition
Joshua Simmons [Mon, 18 Nov 2024 18:03:20 +0000 (19:03 +0100)]
narcissus-gpu: Fix dst_stage_mask for swapchain transition

Open question about whether the spec is right, or the validation layers
are right. But lets go with the validation layers.

12 months agovulkan-sys: Improve default for ImageSubresourceRange
Joshua Simmons [Mon, 18 Nov 2024 18:00:39 +0000 (19:00 +0100)]
vulkan-sys: Improve default for ImageSubresourceRange

Seems silly to default to something which is always invalid when there's
an easy common use-case which can be handled instead.

12 months agonarcissus-gpu: Remove TOP_OF_PIPE/BOTTOM_OF_PIPE
Joshua Simmons [Mon, 18 Nov 2024 17:59:12 +0000 (18:59 +0100)]
narcissus-gpu: Remove TOP_OF_PIPE/BOTTOM_OF_PIPE

They're deprecated now! Away with ye!

12 months agonarcissus-gpu: Add missing stage mask to signal semaphore
Joshua Simmons [Mon, 18 Nov 2024 17:55:49 +0000 (18:55 +0100)]
narcissus-gpu: Add missing stage mask to signal semaphore

12 months agonarcissus-gpu: Make validation layers about dst access
Joshua Simmons [Mon, 18 Nov 2024 17:54:41 +0000 (18:54 +0100)]
narcissus-gpu: Make validation layers about dst access

A bit of an open question what's actually required here, but this makes
the validation layers happy so let's go with that.

12 months agoshark-shaders: Fix buffer alignment
Joshua Simmons [Mon, 18 Nov 2024 11:58:41 +0000 (12:58 +0100)]
shark-shaders: Fix buffer alignment

12 months agoshark-shaders: Use readonly qualifier on readonly buffers
Josh Simmons [Sun, 17 Nov 2024 21:38:24 +0000 (22:38 +0100)]
shark-shaders: Use readonly qualifier on readonly buffers

Radv emits vector loads for these buffers if we don't apply readonly. So
this way we ensure scalar loads for everything in the rasterize shader.

12 months agoshark: Add support for clipping
Josh Simmons [Sun, 17 Nov 2024 19:48:07 +0000 (20:48 +0100)]
shark: Add support for clipping

12 months agoshark-shaders: Remove unused headers
Josh Simmons [Sun, 17 Nov 2024 19:46:26 +0000 (20:46 +0100)]
shark-shaders: Remove unused headers

12 months agovulkan-sys: Add `From<bool>` for `Bool32`
Josh Simmons [Sun, 17 Nov 2024 19:43:03 +0000 (20:43 +0100)]
vulkan-sys: Add `From<bool>` for `Bool32`

12 months agonarcissus-font: Remove unnecessary cast
Josh Simmons [Sun, 17 Nov 2024 19:41:31 +0000 (20:41 +0100)]
narcissus-font: Remove unnecessary cast

12 months agometa: Remove github actions
Josh Simmons [Sat, 16 Nov 2024 22:11:38 +0000 (23:11 +0100)]
meta: Remove github actions

12 months agonarcissus-app: Switch to sdl3
Josh Simmons [Sat, 16 Nov 2024 15:21:11 +0000 (16:21 +0100)]
narcissus-app: Switch to sdl3

Remove manual SDL2 bindings, and switch to sdl3-sys crate.
Improve handling of HiDPI monitors for shark.

12 months agoshark: Fix link in doc comment
Josh Simmons [Sat, 16 Nov 2024 15:17:45 +0000 (16:17 +0100)]
shark: Fix link in doc comment

12 months agonarcissus-maths: Fix accidental link in doc comments
Josh Simmons [Sat, 16 Nov 2024 15:16:54 +0000 (16:16 +0100)]
narcissus-maths: Fix accidental link in doc comments

12 months agonarcissus-core: Fix links in doc comments
Josh Simmons [Sat, 16 Nov 2024 15:16:15 +0000 (16:16 +0100)]
narcissus-core: Fix links in doc comments

12 months agoshark: Fix atlas update racing with gpu
Josh Simmons [Fri, 15 Nov 2024 22:02:25 +0000 (23:02 +0100)]
shark: Fix atlas update racing with gpu

12 months agonarcissus-font: Fix cache writing wrong rects
Josh Simmons [Fri, 15 Nov 2024 22:00:40 +0000 (23:00 +0100)]
narcissus-font: Fix cache writing wrong rects

The rect id was being set to zero rather than the touched glyph index,
so for the first frame after packing the data would always have gaps.

12 months agonarcissus-gpu: Fix swapchain present barrier
Josh Simmons [Fri, 15 Nov 2024 21:59:35 +0000 (22:59 +0100)]
narcissus-gpu: Fix swapchain present barrier

12 months agonarcissus-core: Update to maintained fast-float
Josh Simmons [Thu, 14 Nov 2024 21:06:29 +0000 (22:06 +0100)]
narcissus-core: Update to maintained fast-float

Still necessary as the stdlib has no `parse_partial`.

12 months agoshark-shaders: Draw the rest of the rectangles
Josh Simmons [Thu, 14 Nov 2024 20:13:20 +0000 (21:13 +0100)]
shark-shaders: Draw the rest of the rectangles

12 months agoshark-shaders: Improve scatter robustness and perf
Josh Simmons [Mon, 11 Nov 2024 18:50:30 +0000 (19:50 +0100)]
shark-shaders: Improve scatter robustness and perf

12 months agonarcissus-font: Fix clippy warning
Josh Simmons [Mon, 11 Nov 2024 18:43:57 +0000 (19:43 +0100)]
narcissus-font: Fix clippy warning

12 months agoshark-shaders: Remove one dispatchfrom radix sort
Josh Simmons [Sun, 10 Nov 2024 15:00:02 +0000 (16:00 +0100)]
shark-shaders: Remove one dispatchfrom radix sort

Calculate the prefix sum for the spine with the last workgroup in the
upsweep dispatch.

12 months agoshark-shaders: Shrink glyph draw command slightly
Josh Simmons [Sun, 10 Nov 2024 13:15:51 +0000 (14:15 +0100)]
shark-shaders: Shrink glyph draw command slightly

12 months agoshark: Simplify glyph index and advance caching
Josh Simmons [Sun, 10 Nov 2024 11:46:52 +0000 (12:46 +0100)]
shark: Simplify glyph index and advance caching

12 months agoshark: Update test scene
Josh Simmons [Sun, 10 Nov 2024 10:17:47 +0000 (11:17 +0100)]
shark: Update test scene

12 months agonarcissus-font: Cache some things
Josh Simmons [Sun, 10 Nov 2024 09:43:36 +0000 (10:43 +0100)]
narcissus-font: Cache some things

Pre-load glyph indices for the ascii range rather than looking them up
on demand.

Cache glyph advance values for glyph pairs.

12 months agoshark-shaders: Improve scatter performance more
Josh Simmons [Sat, 9 Nov 2024 21:08:20 +0000 (22:08 +0100)]
shark-shaders: Improve scatter performance more

12 months agoshark-shaders: Improve scatter performance
Joshua Simmons [Sat, 9 Nov 2024 16:20:06 +0000 (17:20 +0100)]
shark-shaders: Improve scatter performance

Use a bitmap in LDS to represent sparse scattered tiles. We can write
arbitrary geometry into the bitmap (e.g. lines) and then count and emit
to vram.

This improves performance from ~600us to ~300us on my 6800, and allows
us to handle line geometry in the future without a large performance
hit.

12 months agometa: Update github actions
Joshua Simmons [Sat, 9 Nov 2024 13:24:31 +0000 (14:24 +0100)]
meta: Update github actions

12 months agoshark-shaders: Remove unused glsl extension
Joshua Simmons [Sat, 9 Nov 2024 13:19:22 +0000 (14:19 +0100)]
shark-shaders: Remove unused glsl extension

Fixes CI.

12 months agoshark: Restore 2d drawing with new binning
Josh Simmons [Sat, 9 Nov 2024 12:38:33 +0000 (13:38 +0100)]
shark: Restore 2d drawing with new binning

12 months agoshark-shaders: Small improvements to radix sort
Josh Simmons [Tue, 5 Nov 2024 22:15:02 +0000 (23:15 +0100)]
shark-shaders: Small improvements to radix sort

12 months agoshark: Remove test work amplification
Josh Simmons [Mon, 4 Nov 2024 21:26:25 +0000 (22:26 +0100)]
shark: Remove test work amplification

12 months agoshark: Add basic tests for gpu radix sorting
Josh Simmons [Mon, 4 Nov 2024 20:23:11 +0000 (21:23 +0100)]
shark: Add basic tests for gpu radix sorting

12 months agoshark-shaders: Move count ref into radix_sort.h
Josh Simmons [Mon, 4 Nov 2024 20:21:42 +0000 (21:21 +0100)]
shark-shaders: Move count ref into radix_sort.h

12 months agonarcissus-gpu: Add `copy_to_slice` to persistent buffer
Josh Simmons [Mon, 4 Nov 2024 20:18:13 +0000 (21:18 +0100)]
narcissus-gpu: Add `copy_to_slice` to persistent buffer

12 months agonarcissus-core: Remove unnecessary trait bound
Josh Simmons [Mon, 4 Nov 2024 20:15:13 +0000 (21:15 +0100)]
narcissus-core: Remove unnecessary trait bound

12 months agonarcissus-gpu: Add `wait_idle` function
Josh Simmons [Mon, 4 Nov 2024 20:13:17 +0000 (21:13 +0100)]
narcissus-gpu: Add `wait_idle` function