]> git.nega.tv - josh/narcissus/log
josh/narcissus
11 months agoshark: Shader cleanup
Josh Simmons [Sun, 21 Jul 2024 07:03:17 +0000 (09:03 +0200)]
shark: Shader cleanup

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

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

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

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

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

12 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

12 months 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

12 months 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

12 months 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

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

12 months 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

12 months 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

12 months 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

12 months 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

12 months 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

12 months 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

12 months 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

12 months 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

13 months 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

13 months 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

13 months 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

13 months 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

13 months 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

13 months 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

13 months 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

13 months 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

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

13 months 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

13 months 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

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

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

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

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

13 months 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

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

13 months 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

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

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

13 months 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

13 months 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

13 months 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

13 months 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...

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

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

13 months 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

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

13 months 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

13 months 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

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

13 months 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

13 months 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

13 months 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

13 months 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

13 months 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

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

13 months 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

13 months agoshark: Use match for key bindings
Josh Simmons [Mon, 13 May 2024 21:25:55 +0000 (23:25 +0200)]
shark: Use match for key bindings

13 months agonarcissus-gpu: Add ImageFormat::BGRA16_FLOAT
Josh Simmons [Sun, 12 May 2024 11:48:34 +0000 (13:48 +0200)]
narcissus-gpu: Add ImageFormat::BGRA16_FLOAT

13 months agonarcissus-gpu: Add 10-bit packed color formats
Josh Simmons [Sun, 12 May 2024 10:47:41 +0000 (12:47 +0200)]
narcissus-gpu: Add 10-bit packed color formats

13 months agonarcissus-gpu: Add support for mutable swapchain images
Josh Simmons [Sun, 12 May 2024 10:09:28 +0000 (12:09 +0200)]
narcissus-gpu: Add support for mutable swapchain images

13 months agovulkan-sys: Add VkImageFormatListCreateInfo
Josh Simmons [Sun, 12 May 2024 09:57:09 +0000 (11:57 +0200)]
vulkan-sys: Add VkImageFormatListCreateInfo

13 months agonarcissus-gpu: Re-enable validation layers by default
Josh Simmons [Sat, 11 May 2024 18:41:50 +0000 (20:41 +0200)]
narcissus-gpu: Re-enable validation layers by default

13 months agovulkan-sys: Add `vkEnumerateInstanceLayerProperties`
Josh Simmons [Sat, 11 May 2024 18:38:00 +0000 (20:38 +0200)]
vulkan-sys: Add `vkEnumerateInstanceLayerProperties`

13 months agoshark: Rename Text shader to Ui
Josh Simmons [Sat, 11 May 2024 11:13:26 +0000 (13:13 +0200)]
shark: Rename Text shader to Ui

13 months agoshark: Re-arrange main loop
Josh Simmons [Sat, 11 May 2024 10:21:05 +0000 (12:21 +0200)]
shark: Re-arrange main loop

13 months agoshark: Disable Wayland when RenderDoc is detected
Josh Simmons [Sat, 11 May 2024 10:15:17 +0000 (12:15 +0200)]
shark: Disable Wayland when RenderDoc is detected

13 months agonarcissus-gpu: Assert when emitting barrier in render pass
Josh Simmons [Sat, 11 May 2024 10:06:54 +0000 (12:06 +0200)]
narcissus-gpu: Assert when emitting barrier in render pass

Any use of `vkCmdPipelineBarrier` between `vkBeginRendering` and
`vkEndRendering` will be ignored, so assert for that case.

Avoid stuttering by using `cmd_encoder` to refer to the narcissus side
implementation of command buffers.

13 months agonarcissus-gpu: Add `Default` impl for `BufferImageCopy`
Josh Simmons [Sat, 11 May 2024 10:05:51 +0000 (12:05 +0200)]
narcissus-gpu: Add `Default` impl for `BufferImageCopy`

13 months agonarcissus-gpu: Expose `is_null` for `Handle` newtypes
Josh Simmons [Sat, 11 May 2024 10:03:46 +0000 (12:03 +0200)]
narcissus-gpu: Expose `is_null` for `Handle` newtypes

13 months agoshark: Move spring helper into own module
Josh Simmons [Sat, 11 May 2024 10:00:47 +0000 (12:00 +0200)]
shark: Move spring helper into own module

13 months agoshark: Add HIDPI support
Josh Simmons [Thu, 9 May 2024 09:00:12 +0000 (11:00 +0200)]
shark: Add HIDPI support

13 months agonarcissus-app: Add HIDPI support
Josh Simmons [Thu, 9 May 2024 08:59:13 +0000 (10:59 +0200)]
narcissus-app: Add HIDPI support

13 months agosdl2-sys: Add HIDPI related APIs
Josh Simmons [Thu, 9 May 2024 08:50:01 +0000 (10:50 +0200)]
sdl2-sys: Add HIDPI related APIs

13 months agomisc: Bump gmp-mpfs-sys dependency
Josh Simmons [Wed, 8 May 2024 19:26:55 +0000 (21:26 +0200)]
misc: Bump gmp-mpfs-sys dependency

13 months agoshark: Change chunk layout
Joshua Simmons [Tue, 7 May 2024 19:57:57 +0000 (21:57 +0200)]
shark: Change chunk layout

13 months agonarcissus-core: Add extra integer widths to `BitIter`
Joshua Simmons [Tue, 7 May 2024 07:12:55 +0000 (09:12 +0200)]
narcissus-core: Add extra integer widths to `BitIter`

13 months agomisc: Remove accidentally added profiler output
Joshua Simmons [Mon, 6 May 2024 16:42:39 +0000 (18:42 +0200)]
misc: Remove accidentally added profiler output

13 months agonarcissus-maths: Sprinkle force inline
Joshua Simmons [Mon, 6 May 2024 16:40:04 +0000 (18:40 +0200)]
narcissus-maths: Sprinkle force inline

Help to salvage debug mode performance. Add `#[must_use]` too.

13 months agoshark: Shoot fast and break things
Joshua Simmons [Sun, 5 May 2024 20:45:37 +0000 (22:45 +0200)]
shark: Shoot fast and break things

13 months agonarcissus-maths: Add error count assert for `exp_f32` test
Joshua Simmons [Sun, 5 May 2024 16:14:00 +0000 (18:14 +0200)]
narcissus-maths: Add error count assert for `exp_f32` test

13 months agomisc: Fix clippy lints
Joshua Simmons [Sun, 5 May 2024 14:47:44 +0000 (16:47 +0200)]
misc: Fix clippy lints

13 months agonarcissus-core: Add Default impl for fixed_vec
Joshua Simmons [Sun, 5 May 2024 14:43:52 +0000 (16:43 +0200)]
narcissus-core: Add Default impl for fixed_vec

13 months agoshark: Add guns which shoot projectile sharks
Joshua Simmons [Sun, 5 May 2024 14:21:22 +0000 (16:21 +0200)]
shark: Add guns which shoot projectile sharks

13 months agonarcissus-core: Add user-defined type to `flags_def` macro
Joshua Simmons [Sun, 5 May 2024 14:20:25 +0000 (16:20 +0200)]
narcissus-core: Add user-defined type to `flags_def` macro

13 months agonarcissus-maths: Add `exp_f32` implementation
Joshua Simmons [Sun, 5 May 2024 14:16:18 +0000 (16:16 +0200)]
narcissus-maths: Add `exp_f32` implementation

Based on Norbert Juffa's implemention for CUDA from
https://forums.developer.nvidia.com/t/a-more-accurate-performance-competitive-implementation-of-expf/47528

13 months agonarcissus-maths: Use `f32_to_i32` for `sin_cos_pi` and `tan_pi`
Joshua Simmons [Sun, 5 May 2024 14:14:11 +0000 (16:14 +0200)]
narcissus-maths: Use `f32_to_i32` for `sin_cos_pi` and `tan_pi`

13 months agonarcissus-maths: Add safe f32 to i32 conversions
Joshua Simmons [Sun, 5 May 2024 14:10:45 +0000 (16:10 +0200)]
narcissus-maths: Add safe f32 to i32 conversions

Rather than relying on `to_int_unsafe` which isn't valid for values that
overflow `i32`, implement an intrinsics based solution which merely
returns an implementation defined value for those cases.

13 months agonarcissus-maths: Add additional rng functions
Joshua Simmons [Sun, 5 May 2024 14:07:04 +0000 (16:07 +0200)]
narcissus-maths: Add additional rng functions

Add `next_[f32,f64]_s`, returning uniformly distibuted floats in the
range `-1.0..1.0`.
Add `next_uniform_unit_disc_f32`, generating a uniformly distributed
point on the unit disc.
Add `next_uniform_unit_circle_f32`, generating a uniformly distributed
point on the unit circle.

14 months agoshark: Adjust camera shake
Joshua Simmons [Fri, 3 May 2024 19:28:04 +0000 (21:28 +0200)]
shark: Adjust camera shake

14 months agonarcissus-maths: Remove custom `round_ties_even`
Joshua Simmons [Fri, 3 May 2024 06:37:54 +0000 (08:37 +0200)]
narcissus-maths: Remove custom `round_ties_even`

Stable from Rust 1.77.0

14 months agonarcissus-maths: Small cleanup of perlin noise
Joshua Simmons [Fri, 3 May 2024 06:35:18 +0000 (08:35 +0200)]
narcissus-maths: Small cleanup of perlin noise

14 months agonarcissus-core: Fix out-of-bounds slice access
Joshua Simmons [Thu, 2 May 2024 20:58:22 +0000 (22:58 +0200)]
narcissus-core: Fix out-of-bounds slice access

14 months agoshark: Add basic camera shake
Joshua Simmons [Thu, 2 May 2024 20:33:57 +0000 (22:33 +0200)]
shark: Add basic camera shake

14 months agonarcissus-maths: Add perlin noise functions
Joshua Simmons [Thu, 2 May 2024 20:32:43 +0000 (22:32 +0200)]
narcissus-maths: Add perlin noise functions

Taken from `stb_perlin.h` by Sean Barrett et al

14 months agoshark: Only write two lines of text
Joshua Simmons [Wed, 1 May 2024 18:54:54 +0000 (20:54 +0200)]
shark: Only write two lines of text

14 months agonarcissus-gpu: Remove accidentally added sleep
Joshua Simmons [Wed, 1 May 2024 18:48:29 +0000 (20:48 +0200)]
narcissus-gpu: Remove accidentally added sleep

When debugging goes too far!

14 months agoshark: Dampen camera movement
Joshua Simmons [Wed, 1 May 2024 16:17:57 +0000 (18:17 +0200)]
shark: Dampen camera movement

14 months agoshark: Fix parameterization of top-down camera
Joshua Simmons [Wed, 1 May 2024 14:55:53 +0000 (16:55 +0200)]
shark: Fix parameterization of top-down camera

Using the camera height and camera angle to define a camera is
unfortunate as those to variables are tightly coupled; Adjusting the
camera height requires a camera angle adjustment to maintain the same
distance from the camera, and visa-versa.

Instead, calculate the height from the desired camera distance so these
variables can be changed independently.

14 months agonarcissus-maths: Add `lerp` for scalars and vectors
Joshua Simmons [Wed, 1 May 2024 14:55:10 +0000 (16:55 +0200)]
narcissus-maths: Add `lerp` for scalars and vectors