Commit Graph

4089 Commits

Author SHA1 Message Date
Ivan Avdeev 1f82f352f9
Merge pull request #581 from 0x4E69676874466F78/patch
Update de_dust2.patch
2023-09-28 08:46:16 -07:00
NightFox 884a4ad97e
Update de_dust2.patch
perestoralsya
2023-09-27 00:05:15 +03:00
Ivan Avdeev b07c5c3740 vk: rt: pass material mode directly from draw command
Different render sources (model types, render types, etc) might require
different material modes. E.g. brush should be translucent (refractive+mirror)
for blend mix modes. However, smoke particles should not be
mirror/refractive for the same blend mix render type.
2023-09-26 13:14:28 -04:00
Ivan 'provod' Avdeev f63dcd14ce vk: rt: draw skybox where ray hasn't hit anything
fixes #579
2023-09-26 12:41:10 -04:00
Ivan 'provod' Avdeev 02efba3902 Merge branch 'vulkan' into lol-materials 2023-09-26 12:36:37 -04:00
Ivan Avdeev acd87043fb vk: materials: load by mdl/spr individually, not by global {models,sprites}.mat 2023-09-26 12:27:24 -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 3aae128e61
Merge pull request #580 from 0x4E69676874466F78/patch
de_dust2.patch
2023-09-26 06:03:34 -07:00
NightFox 24c0faca99
de_dust2.patch
remove bad sky surfaces
2023-09-25 21:40:18 +03:00
Ivan Avdeev 26224b4aca vk: materials: add a few stream E301 notes 2023-09-25 13:57:43 -04:00
Ivan Avdeev e8a09c85e5 vk: load map patches without extra .bsp extension
e.g. `c1a0d.patch`, not `c1a0d.bsp.patch`

Ref: #578
2023-09-25 12:53:58 -04:00
Ivan Avdeev e26ce740f1 vk: cut orig file extension from material files
E.g. load `pbr/halflife.wad/halflife.mat` not `pbr/halflife.wad/halflife.wad.mat`

Requires changes to the PBR repo.

Reference: #578
2023-09-25 12:44:41 -04:00
Ivan Avdeev 9ac7340974 vk: bring back SURF_DRAWSKY geometries
Needed to hide invisible geometry on e.g. c5a1. Breaks de_dust2 roofs
(#474). That will need to be addressed some other way.

Still uses special value for base_color texture to signal SKY SURFACE.
A supposedly better way to do this would be to have them have a special
material.
2023-09-22 10:15:34 -04:00
Ivan Avdeev 638bd163af vk: remove chrome material type; patch roughness manually instead
Also, material struct is now embedded into geometry, so it can be
individually patched.
2023-09-22 09:43:27 -04:00
Ivan Avdeev dce0598962 vk: remove special SURF_DRAWSKY handling
1. Completely remove them from geometries
2. Draw skybox where the ray hasn't hit anything
3. In the same fashion sky is not shadowed when there's nothing hit by
   the shadow ray.

This allows completely removing the sky material flag.
Also supposedly fixes #474
2023-09-21 12:53:17 -04:00
Ivan Avdeev cd4014766b vk: explicitly pass old original texture for trad renderer
Fixes #571
2023-09-19 13:20:04 -04:00
Ivan Avdeev 07f1bac938 vk: pass material reference explicitly in geom structure
This is needed to enable advanced material patching, where the material
can be picked up based on source type, render mode, surface number, etc
etc and all of the above combined if needed.

Previous scheme was picking up materials very late when all of this info
has been already lost.
2023-09-19 13:05:12 -04:00
Ivan Avdeev 258c3ec48e
Merge pull request #567 from nilsoncore/vulkan
vk: profiler: fix source locations for scopes (#542)

Fix source locations for scopes in `r_speeds_list_metrics` as described in Issue #542. 
Also slightly simplify metrics list print formatting and add an option to print it as a table. It can be turned on/off via cvar `r_speeds_metrics_as_table`. 
This does not look very good in HL itself because it uses non-monospace font by default in console, but it looks much cleaner and readable in console and log file output.
2023-09-17 20:20:46 -07:00
nilsoncore 02604cd901 vk: profiler: metrics: remove outdated comment 2023-09-18 05:57:49 +03:00
nilsoncore 977eda258a vk: profiler: metrics: little tweaks
Remove unnecessary `crtlib.h` import in `profiler.h`.
Simplify `get_filename_from_filepath` function.
Add extra guards in metrics line printing to make sure we would not
leak/blow up anything.
2023-09-18 02:57:09 +03:00
nilsoncore 37600be985 vk: profiler: metrics: call print on lines only if necessary 2023-09-18 01:47:58 +03:00
nilsoncore e939d3eab6 vk: profiler: metrics: drop arguments, use globals
This is related to static function of metrics print.  It probably does
not need to expose arguments and can just use globals directly.
2023-09-18 00:55:18 +03:00
nilsoncore d5df2d2791 vk: profiler: metrics: store filepath, but print only filename
Previously, source filepath was truncated right at metric registration,
so only the filename was stored.  Now, full source filepath is stored.
The truncation to its filename happens only in metrics print.  This way
we preserve full information, but also throw away redundancy in print.
2023-09-18 00:35:35 +03:00
nilsoncore 79c2d5768f vk: profiler: metrics: separate printing methods into different commands
Remove command `r_speeds_list_metrics` and cvar
`r_speeds_metrics_as_table`.  Now, there are 2 new commands:
`r_speeds_mlist` - to print metrics as a list, and
`r_speeds_mtable` - to print metrics as a table.
Both of them can handle optional filter argument.
2023-09-17 17:16:20 +03:00
nilsoncore b4aa0fcaf1 vk: profiler: metrics: print filenames instead of filepaths
Reduces enormous amount of space used by absolute filepaths in
metrics print.  This does not mean we cannot locate the files now.
Pretty much all of the vk files have such prefix in their name.
2023-09-17 17:06:49 +03:00
nilsoncore 6659c83c6d vk: profiler: print metrics header twice (top and bottom)
Second header down below the metrics print may help to visually see
the output format without the need to scroll console all the way up.
2023-09-17 16:35:19 +03:00
Alibek Omarov bfe17fa241 Documentation: update ports list, remove old engine ports that has new engine alternatives, re-sort it by status and platform 2023-09-17 08:50:37 +03:00
sofakng a94a5f1f29
Update port maintainer list (#1427)
* Update ports.md

* Update ports.md
2023-09-17 08:40:40 +03:00
nilsoncore c07fe8cd9c vk: profiler: add option to print metrics as table
Slightly improve metrics list print formatting and
add new option to print it as a table.  Table alignment relies on
monospace font.
This can be turned on/off with cvar `r_speeds_metrics_as_table`.
2023-09-16 14:08:34 +03:00
nilsoncore d2b71eb3f7 vk: profiler: fix source locations for scopes (#542)
Fix source locations for scopes in `r_speeds_list_metrics`.
Closes #542.
2023-09-16 14:00:54 +03:00
Alibek Omarov dc71456174 scripts: flatpak: upgrade to Freedesktop SDK 23.08 2023-09-15 22:32:52 +03:00
Ivan Avdeev e28b87beb3
Merge pull request #565 from w23/stream-E296
Fixes made during stream E296

- [x] Fixes #551
  - [x] Also checked that #175 doesn't happen anymore
- [x] Accidentally fixes #174
2023-09-15 11:15:14 -07:00
Ivan Avdeev e27bfdc682 vk: studio: minor changes around FIXMEs
accidentally fixes #174
2023-09-15 14:00:37 -04:00
Alibek Omarov c6b6938e14 wscript: fix RPATH usage on OSX (by @sofakng) 2023-09-15 20:35:51 +03:00
Ivan Avdeev 2e1cb8173e vk: studio: use explicitly set RI.currentmodel over entity->model
`thirdperson` mode overrides entity model while leaving entity->model
with the old value. Vk renderer was assuming that those are the same.

Fixes #551
2023-09-15 12:47:53 -04:00
Ivan Avdeev 54717e60e1
Merge pull request #563 from w23/E295
Fixes made during stream E295

- [x] Fixes #441
- [x] Fixes #433 
- [x] Fixes #562
2023-09-14 11:52:01 -07:00
Ivan Avdeev 755b2d59a9 vk: fixup BLAS preallocation on Linux/amdgpu
Fixing pool allocator to properly signal allocation failure uncovered an
existing issue where we were lacking enough memory for dynamic model
BLASes on Linux/amdgpu. Erroneously the same memory region was used for
>1 BLAS. Surprisingly this hasn't led to any noticeable issues so far.

Increasing accels buffer size fixes the issue.
2023-09-14 13:57:59 -04:00
Ivan 'provod' Avdeev 06a7de02a8 vk: clear EntityData on new map regardless of save-load
Entity data gets reallocate on every NewMap regardless of whether it was a load from a save. Thus all entity pointers and data are invalidated. EntityData keeps things using pointers as keys.
Make sure it is properly cleared on `R_NewMap()`

Fixes #562
2023-09-14 13:48:39 -04:00
Ivan 'provod' Avdeev 7d115168ae vk: alolcator: report pool allocation failures correctly
Returning `0` instead of `ALO_ALLOC_FAILED` let to API consumers believe that allocation was successful. This lead to asserts failing when trying to free such allocations.

Makes #562 not crash (but miss studio models anyway)
2023-09-14 13:42:47 -04:00
Ivan Avdeev 3333d03a7b vk: studio: add submodel render acquire/release diagnostics
For #562 investigation
2023-09-14 13:02:01 -04:00
Ivan Avdeev 9ceb129576 vk: sprite: enable lerping
It Just Works™  even with raytracing, as RT just blends everything
(including coplanar sprites) order-dependent correctly.

Fixes #433
2023-09-14 12:13:30 -04:00
Ivan Avdeev 40a79d7280 vk: sprite: fix fading
Fixes #441
2023-09-14 11:58:32 -04:00
Alibek Omarov 2823a6d269 filesystem: VFileSystem009: just in case, always rewrite fs_api_t requested through CreateInterface export 2023-09-14 00:20:28 +03:00
Alibek Omarov bee35a1873 engine: client: do not check screenshots in base directory to guess the name 2023-09-13 18:49:10 +03:00
Ivan Avdeev 5767ddb30c vk: studio: do not ignore parent bones when detecting static submodels
python/357 has bullets submodels which are animated using parent bones.
Their direct bones are static, and thus the entire submodel was picked
up as static.

Now when computing bone transform for particular sequence/anim frame
also merge it with parent transform. Bones are laid out sequentially in
their "dependency order" so using a direct parent is fine, as it also
contains its parent transforms.

Fixes: #554
2023-09-12 11:12:40 -07:00
Ivan 'provod' Avdeev 64e1a9b763 vk: do not draw into empty swapchain
On Windows we're seeing a max size = 0x0 swapchains. Those cannot be created or used. Make sure that we're not, and we're not trying to draw anything when there's no swapchain available.

Unfortunately we still have to call some rendering functions (without actually rendering anything) to make sure that various invariants hold.

fixes #463
2023-09-12 10:48:26 -07:00
Alibek Omarov e4ae386964 engine: network: fix incorrect usage of qboolean, when it should be net_gai_state_t 2023-09-12 20:40:14 +03:00
Alibek Omarov 36831555b9 waf: upgrade to latest waifu 2023-09-12 19:23:30 +03:00
Alibek Omarov 8eef212726 ref: gl: fix compile 2023-09-11 21:22:53 +03:00
Ivan Avdeev a1cae92a2c vk: textures: add blue noise textures
They are not used by anything yet.

Fallback to generating regular noise textures if bluenoise ones weren't
found.

Real blue noise textures require Half-Life-PBR repo textures.
2023-09-11 12:31:03 -04:00