Commit Graph

26 Commits

Author SHA1 Message Date
Ivan Avdeev 3cbc11a8f0 vk: rt: optimize hires skybox loading
- Do not load skybox at all if there are no SURF_DRAWSKY, #706, #579
- Do not reload the same skybox, #706

Also refactor skybox loading a bit. Prepare for KTX2 skyboxes.
2023-12-14 10:33:26 -05:00
Ivan Avdeev 0549822d53 vk: print 'vk/module' in logs 2023-12-04 11:29:38 -05:00
Ivan Avdeev 605647aecc vk: rt: support changing screen resolution
Fixes #343
2023-11-30 13:01:40 -05:00
Ivan Avdeev 5c3be09161 vk: brush: force worldmodel alternate_anims textures static
Many static worldmodel surfaces still contain alternate texture chains.
That was making these surfaces dynamic, even though there's no way to
trigger these alternate anims.

Make worldmodel ignore alternate_anims when looking for animated
surfaces.

Fixes #644
2023-11-09 10:32:47 -05:00
Ivan Avdeev a42e5051b7 vk: cleanup cvar prefixes
Now:
- Not necessarily vulkan-specific cvars are prefixed with `r_`
- Vulkan-specific but not RT-specific things are `vk_`
- RT-specific are `rt_`

Fixes #632
2023-11-03 13:15:11 -04:00
Ivan Avdeev c869223690 vk: fix compilation after upstream merge 2023-11-02 11:46:30 -04:00
Ivan Avdeev c36080c982 vk: move things around between {r,vk}_texture
Another step in preparation for new hash table and better lifetime
management
2023-10-24 11:32:42 -04:00
Ivan Avdeev b315f463cf vk: rename vk_textures to r_textures 2023-10-20 11:18:55 -04:00
Ivan Avdeev c4935e483c vk: BREAK texture management with refcounts
THIS COMMIT IS BROKEN AND LEADS TO MISSING TEXTURES

There's a "race" between texture release/acquire on changelevel.
Textures end up being deleted when they shouldn't.

Addressing this is tedious, will be done in the following commits.
2023-10-20 10:55:19 -04:00
Ivan Avdeev 18261da713 vk: massage texture module function names
Bring function names to a single style.
Make them state what they actually do.
2023-10-19 11:15:48 -04:00
Ivan Avdeev e1d478fa28 vk: free textures on map change (DO NOT USE)
Leads to texture corruption and GPU crashes on Linux.
2023-10-17 11:43:38 -04:00
Ivan Avdeev 806932b949 vk: clean up public rendering texture api 2023-10-17 11:26:29 -04:00
Ivan Avdeev 9b9e89adec vk: make all texture samplers return values in linear space
Make sure that all SRGB-gamma textures are marked with SRGB format (this
includes all the original textues, 8bit PNG textues). All other
textures (roughness, metallic, normal maps) are linear (UNORM).

Trust KTX2 texture that they store in the correct colorspace.

Then we can just sample textures w/o SRGBtoLINEAR'izing them. Supposedly
this is better because of hw interpolation in the correct colorspace.

This is a bit experimental because Compressonator can't really into
BC7_SRGB, which is sad. And also we need to re-gamma all the textures
for the gamma/srgb-unaware traditional renderer.
2023-10-06 15:06:44 -04:00
Ivan Avdeev b549ac76f6 vk: add logs and notes about mod/spr load sequence 2023-09-26 12:25:40 -04:00
Ivan Avdeev 13eef5dda2 vk: silence a bunch of verbose logs
There are some limits that we hit multiple times in a frame that result
int S_ERROR logs. Throttle them

Fixes #545
2023-09-07 10:43:21 -04:00
Ivan Avdeev 0ccc107859 vk: associate more logs with modules 2023-08-29 13:12:35 -04:00
Ivan Avdeev f99d43ec4c add a bunch of wip changes wrt studio model cache 2023-08-28 09:11:48 -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 0d8a7f76f5
Merge pull request #529 from w23/E260
- [x] Improves #528 a bit
- [x] Fixes #523 
  - [x] Fix ![image](https://user-images.githubusercontent.com/321361/235242886-bbae06cf-4375-4e11-bae0-8bc4e7644d59.png)
  - [ ] ~верни зеркало! ![image](https://user-images.githubusercontent.com/321361/235250971-6652e2b2-e531-4b41-b603-1c50306b7ea3.png)~
  - [x] test_brush2 лесенки пропали на растеризации
2023-05-01 10:45:31 -07:00
Ivan Avdeev b17c00654b vk: silence a couple NOT IMPLEMENTED messages
- We're not going to implement R_ShowTextures for ref_vk, at least in
  its gl form.
- It seems that Mod_GetCurrentVis() can just return NULL, at least
  ref_soft does it.

Fixes #269, fixes #254
2023-04-28 10:32:01 -07:00
Alibek Omarov a117338435 ref: vk: port to RefAPI 4 2023-04-28 17:34:05 +03:00
Ivan Avdeev 576b4163b9 vk: profiler: rename slows to speeds (enough kekage) 2023-03-25 12:03:41 -07:00
Ivan Avdeev 5d23494cfc vk: profiler: use existing R_SpeedsMessage to display profiling data 2023-03-21 11:59:57 -07:00
Ivan Avdeev 421c0ea733 vk: add tracers (not tested) 2023-02-27 10:37:03 -08:00
Ivan 'provod' Avdeev 92b1e78d85 vk: make trad sprites more like gl ones
still not fully there:
- glow is slightly off
- TransAlpha has wrong blending mode

apparently pipeline settings for brushes, models, and sprites are substantially different, need different pipelines
2023-02-24 17:43:07 -08:00
Ivan Avdeev 053d26e870 move ref_vk to ref/vk 2023-02-16 10:30:31 -08:00