]> git.nega.tv - josh/narcissus/log
josh/narcissus
18 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.

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

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

18 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`

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

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

18 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.

18 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

18 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

18 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

18 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

18 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.

18 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

19 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`.

19 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

19 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

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

19 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.

19 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

19 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

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

19 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.

19 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

19 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.

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

19 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.

19 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

19 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

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

19 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

19 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

19 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

19 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

19 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

19 months agoshark: Re-work UI
Josh Simmons [Mon, 4 Nov 2024 07:33:52 +0000 (08:33 +0100)]
shark: Re-work UI

Add radix sort pipelines.
Add buffer address abstraction.
Add spec constants.
Add subgroup size control.
Add `cmd_dispatch_indirect`.

Change bind group API to separate allocation and binding.

Surely I won't regret the mega-commit...

19 months agonarcissus-gpu: Add support for indirect buffers
Josh Simmons [Mon, 4 Nov 2024 07:31:58 +0000 (08:31 +0100)]
narcissus-gpu: Add support for indirect buffers

Additionally, always enable shader device address flags on buffers.

19 months agoshark-shaders: Add message when shader compilation fails
Josh Simmons [Mon, 4 Nov 2024 07:27:28 +0000 (08:27 +0100)]
shark-shaders: Add message when shader compilation fails

19 months agovulkan-sys: Tidy subgroup size control definitions
Josh Simmons [Mon, 4 Nov 2024 07:25:22 +0000 (08:25 +0100)]
vulkan-sys: Tidy subgroup size control definitions

19 months agonarcissus-gpu: Fix ComputeWrite being marked read only
Josh Simmons [Mon, 4 Nov 2024 07:20:58 +0000 (08:20 +0100)]
narcissus-gpu: Fix ComputeWrite being marked read only

Resolves issue where ComputeWrite -> ComputeOtherRead barriers weren't
flushing caches.

19 months agoexternal: Fix clippy lints
Josh Simmons [Mon, 4 Nov 2024 07:17:51 +0000 (08:17 +0100)]
external: Fix clippy lints

21 months agoshark: Add support for ui rects
Josh Simmons [Thu, 22 Aug 2024 17:40:47 +0000 (19:40 +0200)]
shark: Add support for ui rects

21 months agonarcissus-font: Add `as_u32` to `TouchedGlyphInstance`
Josh Simmons [Thu, 22 Aug 2024 17:21:06 +0000 (19:21 +0200)]
narcissus-font: Add `as_u32` to `TouchedGlyphInstance`

22 months agonarcissus-core: Remove unused code
Josh Simmons [Sun, 28 Jul 2024 08:54:06 +0000 (10:54 +0200)]
narcissus-core: Remove unused code

22 months agoshark: Shader cleanup
Josh Simmons [Sun, 21 Jul 2024 07:03:17 +0000 (09:03 +0200)]
shark: Shader cleanup

22 months agoshark: Improve shader performance
Josh Simmons [Thu, 18 Jul 2024 21:19:39 +0000 (23:19 +0200)]
shark: Improve shader performance

Scalarize all the things!
Remove extra passes over the input primitives buffer.
Use AABB of entire subgroup to determine which tiles to write.

23 months agomisc: Fix clippy lints
Josh Simmons [Sat, 22 Jun 2024 08:28:25 +0000 (10:28 +0200)]
misc: Fix clippy lints

23 months agonarcissus: Fix clippy lints
Josh Simmons [Tue, 18 Jun 2024 20:50:00 +0000 (22:50 +0200)]
narcissus: Fix clippy lints

23 months agovulkan-sys: Ignore explicit transmute warnings
Josh Simmons [Tue, 18 Jun 2024 20:48:51 +0000 (22:48 +0200)]
vulkan-sys: Ignore explicit transmute warnings

We do this deliberately because it's ridiculous to enter each function
type manually.

23 months agoshark: Use compute barriers for UI images
Josh Simmons [Tue, 18 Jun 2024 20:47:21 +0000 (22:47 +0200)]
shark: Use compute barriers for UI images

We access these exclusively from compute stages now, rather than via a
graphics pass, so we should use the compute only access types.

23 months agoshark: Fix UI tile debug view
Josh Simmons [Tue, 18 Jun 2024 20:44:37 +0000 (22:44 +0200)]
shark: Fix UI tile debug view

2 years agoshark: Fix out-of-bounds writes in bin clear
Josh Simmons [Mon, 10 Jun 2024 06:38:29 +0000 (08:38 +0200)]
shark: Fix out-of-bounds writes in bin clear

2 years agoshark: Use BDA instead of compute bindings
Josh Simmons [Sun, 9 Jun 2024 21:05:13 +0000 (23:05 +0200)]
shark: Use BDA instead of compute bindings

2 years agonarcissus-gpu: Expose buffer device addresses
Josh Simmons [Sun, 9 Jun 2024 21:04:17 +0000 (23:04 +0200)]
narcissus-gpu: Expose buffer device addresses

2 years agoshark: Use immutable samplers
Josh Simmons [Sat, 8 Jun 2024 19:32:45 +0000 (21:32 +0200)]
shark: Use immutable samplers

2 years agonarcissus-gpu: Add support for immutable samplers
Josh Simmons [Sat, 8 Jun 2024 19:27:11 +0000 (21:27 +0200)]
narcissus-gpu: Add support for immutable samplers

2 years agoshark: Add debug names for buffers and images
Josh Simmons [Wed, 5 Jun 2024 20:12:55 +0000 (22:12 +0200)]
shark: Add debug names for buffers and images

2 years agonarcissus-gpu: Add debug names for buffers and images
Josh Simmons [Wed, 5 Jun 2024 20:12:19 +0000 (22:12 +0200)]
narcissus-gpu: Add debug names for buffers and images

2 years agoshark: Fix case of microshades literals
Josh Simmons [Wed, 5 Jun 2024 20:03:25 +0000 (22:03 +0200)]
shark: Fix case of microshades literals

2 years agoshark: Use command buffer debug markers
Josh Simmons [Tue, 4 Jun 2024 20:43:15 +0000 (22:43 +0200)]
shark: Use command buffer debug markers

2 years agonarcissus-gpu: Add command buffer debug markers
Josh Simmons [Tue, 4 Jun 2024 20:42:52 +0000 (22:42 +0200)]
narcissus-gpu: Add command buffer debug markers

2 years agonarcissus-core: Add arena helper for CStr creation
Josh Simmons [Tue, 4 Jun 2024 20:41:59 +0000 (22:41 +0200)]
narcissus-core: Add arena helper for CStr creation

2 years agovulkan-sys: Add VK_EXT_debug_utils
Josh Simmons [Tue, 4 Jun 2024 20:41:17 +0000 (22:41 +0200)]
vulkan-sys: Add VK_EXT_debug_utils

2 years agonarcissus-gpu: Hook up buffer device address
Josh Simmons [Mon, 3 Jun 2024 20:40:42 +0000 (22:40 +0200)]
narcissus-gpu: Hook up buffer device address

2 years agovulkan-sys: Add buffer device address support
Josh Simmons [Mon, 3 Jun 2024 19:08:27 +0000 (21:08 +0200)]
vulkan-sys: Add buffer device address support

2 years agoshark: Track range of non-zero L1 buckets
Josh Simmons [Sun, 2 Jun 2024 12:52:54 +0000 (14:52 +0200)]
shark: Track range of non-zero L1 buckets

2 years agonarcissus-gpu: Add compute-only resource barrier
Josh Simmons [Sun, 2 Jun 2024 12:14:55 +0000 (14:14 +0200)]
narcissus-gpu: Add compute-only resource barrier

2 years agoshark: Use consts instead of defines in shaders
Josh Simmons [Sun, 2 Jun 2024 10:14:59 +0000 (12:14 +0200)]
shark: Use consts instead of defines in shaders

2 years agoshark: Remove hack to bypass cache for prim instances
Joshua Simmons [Sat, 1 Jun 2024 19:10:55 +0000 (21:10 +0200)]
shark: Remove hack to bypass cache for prim instances

2 years agoshark: Improve performance of binning shader
Josh Simmons [Sat, 1 Jun 2024 14:36:49 +0000 (16:36 +0200)]
shark: Improve performance of binning shader

2 years agoshark: Switch to single-pass binning for primitive-2d
Josh Simmons [Fri, 31 May 2024 04:41:11 +0000 (06:41 +0200)]
shark: Switch to single-pass binning for primitive-2d

2 years agoshark: Draw more text
Joshua Simmons [Mon, 27 May 2024 17:54:15 +0000 (19:54 +0200)]
shark: Draw more text

2 years agoblake3-smol: Add features to make cargo happy
Joshua Simmons [Mon, 27 May 2024 17:53:46 +0000 (19:53 +0200)]
blake3-smol: Add features to make cargo happy

2 years agoshark: Try single pass for coarse culling
Josh Simmons [Mon, 27 May 2024 06:43:34 +0000 (08:43 +0200)]
shark: Try single pass for coarse culling

2 years agoshark: Tweak primitive shaders
Josh Simmons [Mon, 27 May 2024 05:25:33 +0000 (07:25 +0200)]
shark: Tweak primitive shaders

2 years agoshark: Multipass primitives
Josh Simmons [Sun, 26 May 2024 16:40:50 +0000 (18:40 +0200)]
shark: Multipass primitives

2 years agoshark: Simplify primitive shaders
Josh Simmons [Sun, 26 May 2024 13:34:33 +0000 (15:34 +0200)]
shark: Simplify primitive shaders

2 years agoshark: Track dirty tiles
Josh Simmons [Sun, 26 May 2024 09:55:14 +0000 (11:55 +0200)]
shark: Track dirty tiles

2 years agoshark: Use push constants for primitive uniforms
Josh Simmons [Sat, 25 May 2024 18:34:35 +0000 (20:34 +0200)]
shark: Use push constants for primitive uniforms

2 years agoshark: Add more text!
Josh Simmons [Sat, 25 May 2024 13:42:10 +0000 (15:42 +0200)]
shark: Add more text!

2 years agonarcissus-gpu: Add push constants to pipeline layout
Josh Simmons [Sat, 25 May 2024 13:41:30 +0000 (15:41 +0200)]
narcissus-gpu: Add push constants to pipeline layout

2 years agovulkan-sys: Fix PipelineLayoutCreateInfo definition
Josh Simmons [Sat, 25 May 2024 13:33:50 +0000 (15:33 +0200)]
vulkan-sys: Fix PipelineLayoutCreateInfo definition

2 years agonarcissus-gpu: Cache pipeline layouts
Josh Simmons [Sat, 25 May 2024 13:26:21 +0000 (15:26 +0200)]
narcissus-gpu: Cache pipeline layouts

2 years agonarcissus-gpu: Add push constants function
Josh Simmons [Sat, 25 May 2024 08:44:30 +0000 (10:44 +0200)]
narcissus-gpu: Add push constants function

2 years agoshark: Try to unify shaders so they're more readable
Josh Simmons [Fri, 24 May 2024 19:31:46 +0000 (21:31 +0200)]
shark: Try to unify shaders so they're more readable

2 years agoshark: Two level binning for big performance
Josh Simmons [Fri, 24 May 2024 15:28:59 +0000 (17:28 +0200)]
shark: Two level binning for big performance

2 years agonarcissus-gpu: Fix embarrasingly broken `is_[un]linked`
Josh Simmons [Thu, 23 May 2024 19:46:41 +0000 (21:46 +0200)]
narcissus-gpu: Fix embarrasingly broken `is_[un]linked`

So it turns out if you have two nodes pointing to each other, that still
counts as being in a list! Who knew...

2 years agoshark: Turn up the difficulty
Josh Simmons [Mon, 20 May 2024 21:41:57 +0000 (23:41 +0200)]
shark: Turn up the difficulty

2 years agoshark: Bin primitives into tiles
Josh Simmons [Mon, 20 May 2024 21:09:04 +0000 (23:09 +0200)]
shark: Bin primitives into tiles

2 years agoshark: Split UI from display transform
Josh Simmons [Sat, 18 May 2024 17:08:02 +0000 (19:08 +0200)]
shark: Split UI from display transform

2 years agometa: Add vscode workspace settings
Josh Simmons [Sat, 18 May 2024 08:49:09 +0000 (10:49 +0200)]
meta: Add vscode workspace settings

2 years agoshark: Add support for shader includes
Josh Simmons [Sat, 18 May 2024 08:39:21 +0000 (10:39 +0200)]
shark: Add support for shader includes

2 years agonarcissus-gpu: Simplify bind group layout setup
Josh Simmons [Fri, 17 May 2024 19:17:09 +0000 (21:17 +0200)]
narcissus-gpu: Simplify bind group layout setup

2 years agoshark: Render UI with compute
Josh Simmons [Thu, 16 May 2024 18:29:37 +0000 (20:29 +0200)]
shark: Render UI with compute

2 years agoshark: Use indexable structs for gpu resources
Josh Simmons [Wed, 15 May 2024 06:37:49 +0000 (08:37 +0200)]
shark: Use indexable structs for gpu resources

2 years agonarcissus-gpu: Configure swapchain with available modes
Josh Simmons [Tue, 14 May 2024 19:49:53 +0000 (21:49 +0200)]
narcissus-gpu: Configure swapchain with available modes

2 years agoshark: Apply display transform in compute shader
Josh Simmons [Tue, 14 May 2024 16:54:31 +0000 (18:54 +0200)]
shark: Apply display transform in compute shader

2 years agonarcissus-gpu: Add `E5B9G9R9_UFLOAT_PACK32` format
Josh Simmons [Tue, 14 May 2024 12:10:23 +0000 (14:10 +0200)]
narcissus-gpu: Add `E5B9G9R9_UFLOAT_PACK32` format

2 years agonarcissus-core: Add basic dds loader
Josh Simmons [Tue, 14 May 2024 07:28:49 +0000 (09:28 +0200)]
narcissus-core: Add basic dds loader

2 years agonarcissus-core: Add FourCC wrapper
Josh Simmons [Mon, 13 May 2024 21:28:29 +0000 (23:28 +0200)]
narcissus-core: Add FourCC wrapper

2 years agonarcissus-core: Use derive for flags impls
Josh Simmons [Mon, 13 May 2024 21:27:20 +0000 (23:27 +0200)]
narcissus-core: Use derive for flags impls