]>
git.nega.tv - josh/narcissus/log
Josh Simmons [Sun, 6 Apr 2025 05:11:56 +0000 (07:11 +0200)]
narcissus-math: Update sin-pi error bounds
Josh Simmons [Sat, 5 Apr 2025 21:41:30 +0000 (23:41 +0200)]
misc: Fix formatting after the edition upgrade
Josh Simmons [Sat, 5 Apr 2025 21:38:07 +0000 (23:38 +0200)]
narcissus-core: Use stable trait upcasting
Josh Simmons [Sat, 5 Apr 2025 21:28:47 +0000 (23:28 +0200)]
misc: Fix clippy lints
Josh Simmons [Sat, 5 Apr 2025 21:26:07 +0000 (23:26 +0200)]
misc: Update to Rust 2024 edition
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.
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.
Josh Simmons [Mon, 2 Dec 2024 21:55:01 +0000 (22:55 +0100)]
narcissus-maths: Fix clippy lints
Josh Simmons [Mon, 2 Dec 2024 21:46:47 +0000 (22:46 +0100)]
narcissus-core: Rename `rand` to `random
Josh Simmons [Mon, 2 Dec 2024 21:45:10 +0000 (22:45 +0100)]
narcissus-core: Add platform secure random API
Josh Simmons [Mon, 2 Dec 2024 21:43:42 +0000 (22:43 +0100)]
narcissus-core: Add `errno` API
Josh Simmons [Mon, 2 Dec 2024 18:20:02 +0000 (19:20 +0100)]
narcissus-math: Make `sin_cos_pi_f32` branchless
Josh Simmons [Sat, 30 Nov 2024 12:43:17 +0000 (13:43 +0100)]
shark: Deal with SDL3 environment variables
Josh Simmons [Sat, 30 Nov 2024 12:24:34 +0000 (13:24 +0100)]
shark: Move draw 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
Josh Simmons [Sat, 30 Nov 2024 09:06:15 +0000 (10:06 +0100)]
vulkan-sys: Fix clippy lints in triangle example
Josh Simmons [Sat, 30 Nov 2024 09:01:24 +0000 (10:01 +0100)]
vulkan-sys: Avoid laundering unsafe in `vk_check`
Josh Simmons [Fri, 29 Nov 2024 22:13:01 +0000 (23:13 +0100)]
narcissus-gpu: Tidy up the push constants API
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.
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...
Josh Simmons [Fri, 29 Nov 2024 21:28:43 +0000 (22:28 +0100)]
narcissus-gpu: Avoid laundering unsafe in `vk_check`
Josh Simmons [Fri, 29 Nov 2024 21:15:55 +0000 (22:15 +0100)]
misc: Fix clippy lints
Josh Simmons [Mon, 18 Nov 2024 19:45:51 +0000 (20:45 +0100)]
narcissus-gpu: Add some image barrier helpers
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.
Joshua Simmons [Mon, 18 Nov 2024 18:22:58 +0000 (19:22 +0100)]
shark: Fix barriers!
We're clean on validation now.
Joshua Simmons [Mon, 18 Nov 2024 18:21:41 +0000 (19:21 +0100)]
narcissus-gpu: Use defaults for queue families
Joshua Simmons [Mon, 18 Nov 2024 18:20:15 +0000 (19:20 +0100)]
vulkan-sys: Default to `QUEUE_FAMILY_IGNORED` in barriers
Joshua Simmons [Mon, 18 Nov 2024 18:08:12 +0000 (19:08 +0100)]
narcissus-gpu: Use default for image subresource
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.
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.
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.
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!
Joshua Simmons [Mon, 18 Nov 2024 17:55:49 +0000 (18:55 +0100)]
narcissus-gpu: Add missing stage mask to signal semaphore
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.
Joshua Simmons [Mon, 18 Nov 2024 11:58:41 +0000 (12:58 +0100)]
shark-shaders: Fix buffer alignment
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.
Josh Simmons [Sun, 17 Nov 2024 19:48:07 +0000 (20:48 +0100)]
shark: Add support for clipping
Josh Simmons [Sun, 17 Nov 2024 19:46:26 +0000 (20:46 +0100)]
shark-shaders: Remove unused headers
Josh Simmons [Sun, 17 Nov 2024 19:43:03 +0000 (20:43 +0100)]
vulkan-sys: Add `From<bool>` for `Bool32`
Josh Simmons [Sun, 17 Nov 2024 19:41:31 +0000 (20:41 +0100)]
narcissus-font: Remove unnecessary cast
Josh Simmons [Sat, 16 Nov 2024 22:11:38 +0000 (23:11 +0100)]
meta: Remove github actions
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.
Josh Simmons [Sat, 16 Nov 2024 15:17:45 +0000 (16:17 +0100)]
shark: Fix link in doc comment
Josh Simmons [Sat, 16 Nov 2024 15:16:54 +0000 (16:16 +0100)]
narcissus-maths: Fix accidental link in doc comments
Josh Simmons [Sat, 16 Nov 2024 15:16:15 +0000 (16:16 +0100)]
narcissus-core: Fix links in doc comments
Josh Simmons [Fri, 15 Nov 2024 22:02:25 +0000 (23:02 +0100)]
shark: Fix atlas update racing with gpu
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.
Josh Simmons [Fri, 15 Nov 2024 21:59:35 +0000 (22:59 +0100)]
narcissus-gpu: Fix swapchain present barrier
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`.
Josh Simmons [Thu, 14 Nov 2024 20:13:20 +0000 (21:13 +0100)]
shark-shaders: Draw the rest of the rectangles
Josh Simmons [Mon, 11 Nov 2024 18:50:30 +0000 (19:50 +0100)]
shark-shaders: Improve scatter robustness and perf
Josh Simmons [Mon, 11 Nov 2024 18:43:57 +0000 (19:43 +0100)]
narcissus-font: Fix clippy warning
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.
Josh Simmons [Sun, 10 Nov 2024 13:15:51 +0000 (14:15 +0100)]
shark-shaders: Shrink glyph draw command slightly
Josh Simmons [Sun, 10 Nov 2024 11:46:52 +0000 (12:46 +0100)]
shark: Simplify glyph index and advance caching
Josh Simmons [Sun, 10 Nov 2024 10:17:47 +0000 (11:17 +0100)]
shark: Update test scene
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.
Josh Simmons [Sat, 9 Nov 2024 21:08:20 +0000 (22:08 +0100)]
shark-shaders: Improve scatter performance more
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.
Joshua Simmons [Sat, 9 Nov 2024 13:24:31 +0000 (14:24 +0100)]
meta: Update github actions
Joshua Simmons [Sat, 9 Nov 2024 13:19:22 +0000 (14:19 +0100)]
shark-shaders: Remove unused glsl extension
Fixes CI.
Josh Simmons [Sat, 9 Nov 2024 12:38:33 +0000 (13:38 +0100)]
shark: Restore 2d drawing with new binning
Josh Simmons [Tue, 5 Nov 2024 22:15:02 +0000 (23:15 +0100)]
shark-shaders: Small improvements to radix sort
Josh Simmons [Mon, 4 Nov 2024 21:26:25 +0000 (22:26 +0100)]
shark: Remove test work amplification
Josh Simmons [Mon, 4 Nov 2024 20:23:11 +0000 (21:23 +0100)]
shark: Add basic tests for gpu radix sorting
Josh Simmons [Mon, 4 Nov 2024 20:21:42 +0000 (21:21 +0100)]
shark-shaders: Move count ref into radix_sort.h
Josh Simmons [Mon, 4 Nov 2024 20:18:13 +0000 (21:18 +0100)]
narcissus-gpu: Add `copy_to_slice` to persistent buffer
Josh Simmons [Mon, 4 Nov 2024 20:15:13 +0000 (21:15 +0100)]
narcissus-core: Remove unnecessary trait bound
Josh Simmons [Mon, 4 Nov 2024 20:13:17 +0000 (21:13 +0100)]
narcissus-gpu: Add `wait_idle` function
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...
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.
Josh Simmons [Mon, 4 Nov 2024 07:27:28 +0000 (08:27 +0100)]
shark-shaders: Add message when shader compilation fails
Josh Simmons [Mon, 4 Nov 2024 07:25:22 +0000 (08:25 +0100)]
vulkan-sys: Tidy subgroup size control definitions
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.
Josh Simmons [Mon, 4 Nov 2024 07:17:51 +0000 (08:17 +0100)]
external: Fix clippy lints
Josh Simmons [Thu, 22 Aug 2024 17:40:47 +0000 (19:40 +0200)]
shark: Add support for ui rects
Josh Simmons [Thu, 22 Aug 2024 17:21:06 +0000 (19:21 +0200)]
narcissus-font: Add `as_u32` to `TouchedGlyphInstance`
Josh Simmons [Sun, 28 Jul 2024 08:54:06 +0000 (10:54 +0200)]
narcissus-core: Remove unused code
Josh Simmons [Sun, 21 Jul 2024 07:03:17 +0000 (09:03 +0200)]
shark: Shader cleanup
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.
Josh Simmons [Sat, 22 Jun 2024 08:28:25 +0000 (10:28 +0200)]
misc: Fix clippy lints
Josh Simmons [Tue, 18 Jun 2024 20:50:00 +0000 (22:50 +0200)]
narcissus: Fix clippy lints
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.
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.
Josh Simmons [Tue, 18 Jun 2024 20:44:37 +0000 (22:44 +0200)]
shark: Fix UI tile debug view
Josh Simmons [Mon, 10 Jun 2024 06:38:29 +0000 (08:38 +0200)]
shark: Fix out-of-bounds writes in bin clear
Josh Simmons [Sun, 9 Jun 2024 21:05:13 +0000 (23:05 +0200)]
shark: Use BDA instead of compute bindings
Josh Simmons [Sun, 9 Jun 2024 21:04:17 +0000 (23:04 +0200)]
narcissus-gpu: Expose buffer device addresses
Josh Simmons [Sat, 8 Jun 2024 19:32:45 +0000 (21:32 +0200)]
shark: Use immutable samplers
Josh Simmons [Sat, 8 Jun 2024 19:27:11 +0000 (21:27 +0200)]
narcissus-gpu: Add support for immutable samplers
Josh Simmons [Wed, 5 Jun 2024 20:12:55 +0000 (22:12 +0200)]
shark: 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
Josh Simmons [Wed, 5 Jun 2024 20:03:25 +0000 (22:03 +0200)]
shark: Fix case of microshades literals
Josh Simmons [Tue, 4 Jun 2024 20:43:15 +0000 (22:43 +0200)]
shark: Use command buffer debug markers
Josh Simmons [Tue, 4 Jun 2024 20:42:52 +0000 (22:42 +0200)]
narcissus-gpu: Add command buffer debug markers
Josh Simmons [Tue, 4 Jun 2024 20:41:59 +0000 (22:41 +0200)]
narcissus-core: Add arena helper for CStr creation
Josh Simmons [Tue, 4 Jun 2024 20:41:17 +0000 (22:41 +0200)]
vulkan-sys: Add VK_EXT_debug_utils
Josh Simmons [Mon, 3 Jun 2024 20:40:42 +0000 (22:40 +0200)]
narcissus-gpu: Hook up buffer device address
Josh Simmons [Mon, 3 Jun 2024 19:08:27 +0000 (21:08 +0200)]
vulkan-sys: Add buffer device address support
Josh Simmons [Sun, 2 Jun 2024 12:52:54 +0000 (14:52 +0200)]
shark: Track range of non-zero L1 buckets