Commit graph

143 commits

Author SHA1 Message Date
janis afb322fa93
rendergraph: dynamic-rendering render passes, single-pass compiler, perf
- Add BeginRendering/EndRendering commands with imported/created attachment
  views, view plumbing, and aspect-gated depth/stencil slots
- Derive and validate render-pass spans at compile time; contract spans into
  single DAG nodes before hazard analysis; hoist cross-boundary barriers to
  pass begins with in-pass policy and created-view resolution
- Replace the four-pass ordering pipeline with a single command walk
  (build_command_orderings): span derivation, validation, lifetime-only
  injection, dependency edges, and Kahn batching in one pass; batches are
  ranges into execution_order and RenderPassSpan keeps only begin/end
- Perf: node-collapsed frontier analysis, dense command/resource indexing
  (no SipHash on hot paths), inline barrier storage, exact preallocation,
  lazy Kahn ready heap, scoped barrier fast paths
- Scope buffer and image alias barriers to the incoming resource per the
  Vulkan resource-memory-aliasing rules (availability unscoped, visibility
  scoped to the new owner)
- Add criterion compile benchmarks (two_pass/{no_pass,pass}/per_{20,50,100})
2026-10-29 00:51:52 +01:00
janis 5e4bc0ccf0
rendergraph: correct transient-resource aliasing with pooled placement
Lifetimes derive from the real dependency ordering (retained DAG +
compile-time happens-before closure), not command-index intervals.
Aliasing is restricted to the single-queue contract; alias reuse is
synchronized with memory/image barriers anchored at first-use commands.

- renderer_device: aliasable shared allocations (CAN_ALIAS), memory-
  requirements queries incl. dedicated hints, offset-aware
  bind_buffer/image_memory2, grouped bind under one allocator lock
- renderer_resources: unallocated resource creation, requirements
  cached in Allocation::Unmanaged (OnceLock), MemoryGroup pooling with
  intersecting memoryTypeBits, bind-time validation
- renderer_rendergraph: retained dependency DAG, happens_before
  closure, batch lifetimes, Placement type, plan_placements with
  pooled aliasing (first-fit over offset-sorted ranges, pool classes
  split by bufferImageGranularity), alias-barrier construction,
  placement/bind error variants
- perf: quadratic compile/resolve paths eliminated (per-resource
  indexing, frontier caching, backward-scan prune, cached recording
  index, recorder scratch reuse); single requirements query per
  resource through plan/validate/bind
- design plan + GPU-gated validation tests
2026-10-27 01:57:27 +01:00
janis e116851b90
feat: migrate GPU memory allocator from gpu-allocator to VMA (vk-mem)
- Replace gpu-allocator with vk-mem 0.5.0 (VMA 3.3.0) in renderer_device
- Add public GpuAllocation wrapper, MemoryLocation, AllocationDesc, and
  allocate_for_buffer/image + bind_buffer/image_memory helpers
- Restrict CPU-mapped allocations to HOST_VISIBLE|HOST_COHERENT memory types
- Handle guards: raw buffer/image handles owned before allocation so failure
  paths never leak
- Use renderer_device::device::MemoryLocation across renderer, renderer_resources,
  and renderer_rendergraph; remove all gpu-allocator dependencies
- Error on dedicated allocation below Vulkan 1.1 instead of silent downgrade
- Add Send/Sync asserts, coherent-mapping and dedicated-allocation validation
  tests; update AGENTS.md docs
2026-10-26 13:44:17 +01:00
janis f7c67f9872
managed descriptorsets 2026-10-26 02:11:29 +01:00
janis 03240e3de2
clippy lints 2026-10-25 23:05:14 +01:00
janis f9c18bcd3c
newtype queue family index 2026-10-24 21:37:07 +02:00
janis 885f3ca492
agent files 2026-10-24 21:17:06 +02:00
janis a173cf18ff
extract resources into renderer_resources 2026-10-24 21:16:54 +02:00
janis 69039ba3c1
remove old define_device_owned_handle macro_rules 2026-10-24 18:44:11 +02:00
janis dd02ea23cf
simplify device ownership logic 2026-10-24 18:11:14 +02:00
janis ce46ca1801
extract device into renderer_device
add deviceref macro
2026-10-24 17:36:43 +02:00
janis c20cee38de
asdf 2026-10-24 16:44:29 +02:00
janis 65bae2196a
add renderer proc macros crate 2026-10-24 13:15:04 +02:00
janis 08fbc0323c
warnings 2026-10-24 13:14:57 +02:00
janis e2f1ceffd8
disable unused deps 2026-10-24 02:41:42 +02:00
janis f6af46e7f4
update to latest bevy (local checkout) 2026-10-24 02:16:51 +02:00
janis 00c67d5bdf
...........kkkkkkk yeah.. 2026-10-24 01:55:27 +02:00
janis c20a4fa1a3
iiiiiii dooooooooont know....... 2026-04-17 20:35:04 +02:00
janis 30fc9f9f44
copy commands 2026-04-17 11:27:40 +02:00
janis 29dbdf9f94
idk rewrite this again 2026-04-17 07:04:52 +02:00
janis d1a0fbd592
im lost.. 2026-04-15 23:33:09 +02:00
janis d1b5e427a7
access: this is quite complicated actually.. 2026-04-15 16:30:49 +02:00
janis 7b6da19a77
i think fixed logic in access conflict? 2026-04-14 22:52:54 +02:00
janis 28c4f52a2b
side effects need stage and access 2026-04-13 23:39:26 +02:00
janis 8ccdfad42a
whoops, forgor this file 2026-04-12 21:39:28 +02:00
janis 3c6baa591d
fix safety with lifetime of commandlist 2026-04-12 21:39:17 +02:00
janis 933b4a5979
compiles! 2026-04-12 21:12:00 +02:00
janis a297dd94da
idk? 2026-04-12 21:03:58 +02:00
janis b8b9bf40a3
more command stuff 2026-04-12 20:23:45 +02:00
janis dde3093536
keep layout around in pipeline 2026-04-12 20:23:19 +02:00
janis 555244b221
more barriers 2026-04-12 15:44:59 +02:00
janis 7acda4d1fb
automatic barriers 2026-04-12 14:26:02 +02:00
janis 666e05bb8e
command impls 2026-04-12 10:33:59 +02:00
janis 15afc00e51
command trait 2026-04-11 23:25:33 +02:00
janis 3438dfde84
starting render commands 2026-04-11 17:28:29 +02:00
janis 75cb3456aa
move render_graph to subfolder 2026-04-11 00:48:48 +02:00
janis 3a39d8dc96
sampler 2026-04-11 00:48:04 +02:00
janis 4f95f3a928
fix font paths 2026-04-10 20:31:14 +02:00
janis c731f79f81 switching to more generic DeviceObject impl 2026-04-10 01:47:34 +02:00
janis c73457b913 pipeline types 2026-04-08 12:34:57 +02:00
janis 8db2d754f8 compile and VVL errors 2026-04-07 18:48:06 +02:00
janis 2446c75d87 pipeline cache with properly managed descruction 2026-04-05 01:14:35 +02:00
janis e4c0479757 fence 2026-04-05 00:06:23 +02:00
janis 7503a73a57 device handle experiment 2026-04-04 16:24:42 +02:00
janis cf7f5152bc clippy 2026-04-04 16:24:36 +02:00
janis 44ff4c4839 pipeline cache 2026-04-04 15:46:17 +02:00
janis cf3244197e warnings 2026-04-04 13:01:52 +02:00
janis 3c59cf022a fix swapchain/surface drop logic error 2026-04-04 00:43:50 +02:00
janis 60760ba67f almost done! 2026-04-04 00:28:43 +02:00
janis ac7e8889db remote slang copy 2026-04-03 18:44:46 +02:00