Commit Graph

19 Commits

Author SHA1 Message Date
Ivan Avdeev b315f463cf vk: rename vk_textures to r_textures 2023-10-20 11:18:55 -04:00
Ivan Avdeev f691b4b4b0 vk: add "persistent" speeds metrics for used memory, etc
Renames previous METRICS to COUNTERS. These are still reset to zero
every frame.

Adds new METRICS which are preserved, maintained externally to speeds,
and only sampled by speeds code once per frame.

Also adds new metrics:
- `studio.cached_submodels` -- number of submodels in cache
- `geom.used` -- memory used by long allocations
- `geom.{vertices,indices}` -- counts of vertices/indices for long
  allocations
- `geom.dyn_{vertices,indices}` -- counts of vertices/indices for
  single-frame dynamic allocations
2023-06-14 11:23:09 -07:00
Ivan Avdeev 046ae3d7f3 vk: rename metrics to module.name, prettify list
- Add variable name and registration src:line to the
  `r_speeds_list_metrics` output. Makes it easier to reason about where
  does this metric come from.
- Group metrics by their modules, makes it easier to discover.
- Do not print the list immediately on command, do it later in the
  frame. Makes it print correct latest frame values.
2023-06-13 09:39:50 -07:00
Ivan Avdeev 406a5f9d4b vk: remove old dynamic beam segs code 2023-06-07 10:54:09 -07:00
Ivan Avdeev 0e13ed38c1 vk: revert beam segs to use triapi, like gl 2023-06-06 09:29:05 -07:00
Ivan Avdeev d24961db15 vk: add block allocator draft
The intent is to manage long-vs-single-frame allocations better.
Previously long allocations were map-long bump allocations, and couldn't be freed
mid-map, as there was neither a reference to the allocated range, nor a
way to actully free it.

Add a two-mode block allocator (similar to previous debuffer alloc) that
allows making long and once allocations. But now long allocations are
backed by "pool" allocator and return references to the range.

This commit doesn't do the deallocation yet, so map chaning doesn't yet
work.
2023-05-25 12:12:18 -07:00
Ivan Avdeev 481aa651c6 vk: refactor passing m,v,p matrices around
View and projection now set only once in a logical place.
Model matrix is now closely associated with its model, and not stored as
a global state.
2023-05-04 11:10:22 -07:00
Alibek Omarov e5e2a63ba2 ref: vk: fix matrix4x4_identity to m_matrix4x4_identity which conflicts in Vita port 2023-04-28 17:43:01 +03:00
Ivan Avdeev 935c2e7f5e rt: remove a bunch of extra material flags
These are either unused, or their meaning can be recovered through other
means.
2023-04-21 23:34:27 -07:00
Ivan Avdeev 89f49276a5 vk: profiler: add beams count metric 2023-03-25 12:03:41 -07:00
Ivan 'provod' Avdeev 30334db159 vk: draw the rest of the beams 2023-02-27 09:49:56 -08:00
Ivan 'provod' Avdeev 2daa130453 vk: set beam/triapi texture and render mode explicitly 2023-02-27 09:20:13 -08:00
Ivan 'provod' Avdeev a118e12e01 vk: stub just enough triapi to render more beam types
it is still drawn incorrectly, but at least something is visible, and we can iterate from here
2023-02-26 20:45:29 -08:00
Ivan 'provod' Avdeev 1fadbce860 vk: remove flag attribute in vertex
make color computation more uniform and not mode-specific
2023-02-25 18:38:22 -08:00
Ivan 'provod' Avdeev e4ad18f220 vk: do not modulate beam color twice
color is already applied at model/ubo level
2023-02-25 16:58:59 -08:00
Ivan 'provod' Avdeev f2182bb255 vk: fix beams per-vertex blending 2023-02-25 16:47:23 -08:00
Ivan 'provod' Avdeev 9f72a804e0 vk: improve traditional blending universally
it is now almost on par with the gl renderer
2023-02-25 12:09:20 -08:00
Ivan 'provod' Avdeev 005b7c84eb vk: pass model color explicitly
Instead of passing model color around as an implicit global state, pass it per-model.
This makes it (a) easier to track, (b) easy to fix blending issues. E.g. this fixes incorrect coloring of brush and studio models, which is also different.
2023-02-24 22:48:26 -08:00
Ivan Avdeev 053d26e870 move ref_vk to ref/vk 2023-02-16 10:30:31 -08:00