Commit Graph

3763 Commits

Author SHA1 Message Date
Ivan Avdeev 6583ed0c31 vk: fixup sequences fps formatting 2023-06-09 11:34:39 -07:00
Ivan 'provod' Avdeev ba041fce36 vk: update animated studio models geometry
Still slightly KORYAVY as:
- there's no cache eviction, it might get full pretty quick
- static-vs-dynamic animation decision is pretty rudimentary, might consider non-animated things as dynamic
- args passing vs global state is meh
2023-06-09 11:28:30 -07:00
Ivan 'provod' Avdeev cadf3dbdfc rt: update blas for brush water
Enable updating rt_blas, and use that for updating brush water models
2023-06-09 10:03:00 -07:00
Ivan Avdeev 406a5f9d4b vk: remove old dynamic beam segs code 2023-06-07 10:54:09 -07:00
Ivan Avdeev 4409e57a8d rt: fix dynamic models colors 2023-06-07 10:43:54 -07:00
Ivan Avdeev 0b8fe6fe33 rt: implement fast dynamic models
It works, and works really fast.
Known issues:
- missing colors
2023-06-07 10:24:29 -07:00
Ivan Avdeev e6bf0c452a rt: more removals 2023-06-06 11:21:47 -07:00
Ivan Avdeev 789982277d rt: remove more unused and obsolete things 2023-06-06 10:50:16 -07:00
Ivan Avdeev 98f8300ca2 vk: remove lots of obsolete code
TriApi/dynamic stuff is still not passed to RT, but removing old code
makes it easier to reason about.
2023-06-06 10:40:10 -07:00
Ivan Avdeev 8e0a9ac4d4 vk: remove old dynamic model implementation too
Breaks dynamic model RT rendering, as it is not implemented yet
2023-06-06 10:20:00 -07:00
Ivan Avdeev c105d45265 vk: remove public render dynamic model api
It still remains internally, and generates too many BLASes.
2023-06-06 09:50:24 -07:00
Ivan Avdeev 0e13ed38c1 vk: revert beam segs to use triapi, like gl 2023-06-06 09:29:05 -07:00
Ivan Avdeev c271078196 vk/speeds: print current metric value next to graphs 2023-06-06 09:27:52 -07:00
Ivan Avdeev 3e2e5e7cb2 vk: remove old dynamic model api usage from brush+water
This makes water static for now, and also makes it look weird, e.g.:
- no culling of water sides (it is "dynamic" in a sense that it's an
  entity property, not model property)
2023-06-05 12:53:25 -07:00
Ivan 'provod' Avdeev a2b0164e03 vk: put barney back together
Fixes computing total vertices/indices count. Were referencing the same `pmesh` for all meshes.

Floating and missing heads issue seems to be due to incorrect fixed animation frames. I.e. animation frames contain offsets to the correct positions. Should be fixed when animations are done.
2023-06-03 12:10:56 -07:00
Ivan Avdeev df102994c4 vk: pre-build and cache studio submodels on first draw
Known issues:
- no animations, stuck at first rendered frame of a given submodel.
  This is as intended for now, needs BLAS update functionality not yet implemented.
- wrong positions/transforms. Reasons unknown. May be "as intended" too.
- missing heads
- Barney model corruption. Consistent between maps/instances/animation
  frames.
2023-06-02 11:49:02 -07:00
Ivan Avdeev c34c56e203 vk: add r_speeds_list_metrics command, with filter 2023-06-01 12:12:10 -07:00
Ivan Avdeev 3bbca26087 vk: fix disappearing sprites for traditional renderer 2023-06-01 11:42:23 -07:00
Ivan Avdeev 72acf4882d vk: orient sprites to camera
Somehow makes sprites correctly oriented (and winding-culled) for ray
tracing, but makes them disappear (winding-culled) for traditional
renderer. This makes zero sense.
2023-06-01 11:00:50 -07:00
Ivan Avdeev edb151bd1b rt: apply instanced texture overrides to rt_model; makes sprites apply correct textures 2023-06-01 10:15:30 -07:00
Ivan Avdeev 8f47115a01 rt: hide internal apis 2023-06-01 09:25:55 -07:00
Ivan Avdeev ed4d0070f8 vk: override sprite textures for quad instances
Applies correct sprite textures for traditional renderer. Doesn't apply
them to RT yet.
2023-05-31 11:00:28 -07:00
Ivan 'provod' Avdeev 32cb4f73be vk: fixup sprite size and color, also reorient it
Sprites are still not oriented properly though
2023-05-31 10:16:06 -07:00
Ivan 'provod' Avdeev dd8f06ae60 rt: recreate sprite model on every map
This is a workaround for inconsistent memory management: some subsystems completely clear their memories and start allocating from zero. This leads to overwriting long lived sprite model with garbage.

TODO FIXME
2023-05-31 10:15:27 -07:00
Ivan 'provod' Avdeev 8b50ebb035 rt: pass and assign rt_blas debug names 2023-05-31 10:13:40 -07:00
Ivan Avdeev e9ea962bc0 vk: begin refactoring rendermodel api, instantiate sprites, crash gpu 2023-05-31 09:39:27 -07:00
Ivan 'provod' Avdeev c157c9acfc rt: don't forget to add new blases to render list 2023-05-31 08:46:34 -07:00
Ivan Avdeev 0853f1c182 rt: start adding new rt_blas-based rt_model_t
Make brush models use it. Black screen, kekw. But not explicit error
messages. Need to investigate.
2023-05-30 12:14:44 -07:00
Ivan Avdeev 7ee16cd82f vk: track block/geom/brush lifetimes
Make sure that things get created and destroyed at the right times.
Allow longer-than-map block allocations.
Fix brush model leaks -- previously they weren't destroyed on map
change/game exit properly. Also free geometry ranges accordingly.

Add a note about map loading process, and various models lifetimes.
2023-05-26 10:45:44 -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 9200cbfc25 rt: step even closer to explicit blas+kusochki management
- stop tracking color/xform/mmode with vk_ray_model
- do not expose model to things that don't need to know
2023-05-22 11:02:40 -07:00
Ivan Avdeev 8724efd748 rt: massage vk_ray_model a bit
- explicitly group cache-related fields
- move kusochki allocation to where it's actually used

this makes a step towards better blas management from bottom up
2023-05-22 10:39:48 -07:00
Ivan Avdeev 322e7bc419 vk: recreate suboptimal swapchains with correct synchronization 2023-05-18 12:32:00 -07:00
Ivan Avdeev b5f79f3815 rt: DRY the accel creation code 2023-05-18 12:10:21 -07:00
Ivan Avdeev e55e411639 vk: add a couple of TODO comments 2023-05-18 12:00:58 -07:00
Ivan Avdeev b65f84793a rt: start refactoring blas/tlas mgmt code
Draft the new accel/blas apis. Consolidate everything accel-related into
vk_ray_accel.c. Start splitting into more atomic functions. Prepare for
blas-model+kusochki split. etc etc.

The new code isn't really used yet.
2023-05-18 11:59:14 -07:00
Ivan Avdeev 4af9f65cd0 vk: use better debug_break in validation errors callback
Allows us to continue in gdb
2023-05-18 11:58:00 -07:00
Ivan Avdeev 7060a86662 rt: propose rt_blas api 2023-05-17 11:28:09 -07:00
Ivan Avdeev 14a648d16c rt: prepare for blas mgmt refactoring
1. Rename models passed to TLAS to instances.
2. Remove BLAS validation: old, doesn't make sense anymore.
3. Draft general blas mgmt approach in NOTES.md
2023-05-17 10:42:18 -07:00
Ivan Avdeev 7d6c12218f vk: comment on why we need inverse model matrix 2023-05-15 09:47:03 -07:00
Ivan Avdeev e54913f8af rt: improve prev frame bone matrix tracking for studio models
Still has some artifacts, but is generally rather close. Will look at
this again when caching studio model BLASes, as we'd be able to look at
them without extra animations.
2023-05-15 09:47:03 -07:00
Ivan Avdeev 091c61a45f vk: make sure studio model vertices are local space
TODO:
- revert not applying rotationmatrix in local vk_studio code
- make sure that prev_frame stuff hasn't changed
2023-05-15 09:47:03 -07:00
Ivan Avdeev e49f517dc0 vk: don't apply studio model matrix to vertices 2023-05-15 09:47:03 -07:00
NightFox c91db96008 update patches 2023-05-05 15:12:28 -07:00
NightFox e86e16235c add rad files for cstrike 2023-05-05 15:12:28 -07:00
NightFox a2c6e3b444 Add cs_assault.rad 2023-05-05 15:12:28 -07:00
NightFox 596d35ddfa update rad files 2023-05-05 15:12:28 -07:00
NightFox b49dca536d Rename c1a3b.bsp.patch to c1a3b-dayone.bsp.patch 2023-05-05 15:12:28 -07:00
NightFox d2f45c53a0 Rename c1a3c.bsp.patch to c1a3c-dayone.bsp.patch 2023-05-05 15:12:28 -07:00
NightFox 48f9813edd update patches 2023-05-05 15:12:28 -07:00