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

13 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

14 months agonarcissus-maths: Add `sin_pi_f32` and `cos_pi_f32`
Joshua Simmons [Wed, 1 May 2024 14:53:00 +0000 (16:53 +0200)]
narcissus-maths: Add `sin_pi_f32` and `cos_pi_f32`

Trivial implementation for now.

14 months agoshark: Add drivable shark
Joshua Simmons [Wed, 1 May 2024 08:26:59 +0000 (10:26 +0200)]
shark: Add drivable shark

14 months agosdl2-sys: Add repeat flag to key events
Joshua Simmons [Wed, 1 May 2024 07:29:44 +0000 (09:29 +0200)]
sdl2-sys: Add repeat flag to key events

14 months agoshark: Remove unused import
Joshua Simmons [Mon, 29 Apr 2024 18:13:29 +0000 (20:13 +0200)]
shark: Remove unused import

14 months agoshark-shaders: Remove unnecessary lifetime annotation
Joshua Simmons [Mon, 29 Apr 2024 18:12:52 +0000 (20:12 +0200)]
shark-shaders: Remove unnecessary lifetime annotation

14 months agoshark: Remove buffer test code
Joshua Simmons [Sun, 28 Apr 2024 16:30:41 +0000 (18:30 +0200)]
shark: Remove buffer test code

14 months agoshark-shaders: Use old name for glslang
Joshua Simmons [Sun, 28 Apr 2024 15:24:48 +0000 (17:24 +0200)]
shark-shaders: Use old name for glslang

Ubuntu image used by CI is old and doesn't have the command under the
new name. So just use `glslangValidator` instead.

14 months agogithub: Fix name for glslang package in ubuntu
Joshua Simmons [Sun, 28 Apr 2024 15:18:56 +0000 (17:18 +0200)]
github: Fix name for glslang package in ubuntu

14 months agogithub: Add glslang to github actions image
Joshua Simmons [Sun, 28 Apr 2024 15:16:07 +0000 (17:16 +0200)]
github: Add glslang to github actions image

14 months agoshark: Move shaders into their own crate
Joshua Simmons [Sun, 28 Apr 2024 15:08:27 +0000 (17:08 +0200)]
shark: Move shaders into their own crate

We can build them with cargo and a build script.

14 months agonarcissus: Remove cstr macro
Joshua Simmons [Sun, 28 Apr 2024 06:30:37 +0000 (08:30 +0200)]
narcissus: Remove cstr macro

We've got builtin functionality now!

14 months agonarcissus-gpu: Fix minor sync issues
Joshua Simmons [Sat, 27 Apr 2024 16:55:22 +0000 (18:55 +0200)]
narcissus-gpu: Fix minor sync issues

Resolve incorrect arguments to various presentation related barriers.

14 months agoshark: Remove duplicate image copy
Joshua Simmons [Sat, 27 Apr 2024 14:55:22 +0000 (16:55 +0200)]
shark: Remove duplicate image copy

14 months agonarcissus-gpu: Use VK_EXT_swapchain_maintenance1
Joshua Simmons [Sat, 6 Apr 2024 07:44:59 +0000 (09:44 +0200)]
narcissus-gpu: Use VK_EXT_swapchain_maintenance1

Fixes the broken way we were handling presentation semaphore recycling
as well as swapchain destruction. When VK_EXT_swapchain_maintenance1 is
unavailable, fallback to a fixed frame delay.

Remove the unused delay queue structure.

14 months agovulkan-sys: Add `VK_EXT_[swapchain,surface]_maintenance1`
Joshua Simmons [Fri, 5 Apr 2024 22:42:18 +0000 (00:42 +0200)]
vulkan-sys: Add `VK_EXT_[swapchain,surface]_maintenance1`

14 months agovulkan-sys: Add `VK_KHR_get_surface_capabilities2`
Joshua Simmons [Fri, 5 Apr 2024 22:40:21 +0000 (00:40 +0200)]
vulkan-sys: Add `VK_KHR_get_surface_capabilities2`

14 months agovulkan-sys: Add wrapper for `get_fence_status`
Joshua Simmons [Fri, 5 Apr 2024 22:21:41 +0000 (00:21 +0200)]
vulkan-sys: Add wrapper for `get_fence_status`

14 months agovulkan-sys: Use &CStr directly in wrapper function
Joshua Simmons [Fri, 5 Apr 2024 22:20:21 +0000 (00:20 +0200)]
vulkan-sys: Use &CStr directly in wrapper function

14 months agoshark: Enable RUST_BACKTRACE by default
Joshua Simmons [Fri, 5 Apr 2024 22:18:05 +0000 (00:18 +0200)]
shark: Enable RUST_BACKTRACE by default

In debug builds we always want to enable backtraces if they're not
explicitly disabled by the environment variable.

15 months agonarcissus-core: Improve float random generation
Joshua Simmons [Sun, 31 Mar 2024 03:22:24 +0000 (05:22 +0200)]
narcissus-core: Improve float random generation

Change `next_f32` to output in the range `[0.0,1.0)`.
Add `next_f64`.
Add very basic smoke test.

15 months agonarcissus-core: Fix clippy lint
Joshua Simmons [Sun, 31 Mar 2024 02:56:39 +0000 (04:56 +0200)]
narcissus-core: Fix clippy lint

15 months agonarcissus-gpu: Fix clippy lint
Joshua Simmons [Sun, 31 Mar 2024 02:55:15 +0000 (04:55 +0200)]
narcissus-gpu: Fix clippy lint

19 months agometa: Rename ext to external
Joshua Simmons [Mon, 20 Nov 2023 20:21:05 +0000 (21:21 +0100)]
meta: Rename ext to external