Commit Graph

1586 Commits

Author SHA1 Message Date
Alibek Omarov af48821eec ref_vk: move cvars that expected to exist by client.dll from render dll to engine 2021-03-01 20:09:37 +03:00
Alibek Omarov 687e0b46d0 Merge remote-tracking branch 'origin/master' into HEAD 2021-03-01 20:06:17 +03:00
Alibek Omarov 58edfbc485 engine: move cvars that expected to exist by client.dll from render dll to engine
Fixes #316
2021-03-01 20:03:32 +03:00
Alibek Omarov fa555c1f09 server: add hardcoded list of chapters for HL, BS and OF, same as GoldSrc
Fix incomplete comment in save file when server DLL provides SV_SaveGameComment.
Fix possible buffer overflow when reading comment from save file.
2021-03-01 19:53:17 +03:00
Andrey Akhmichin 75210b1ff6 engine: common: filesystem.c: add binary search for files from zip-archives. 2021-03-01 19:53:07 +03:00
Alibek Omarov b278751834 waf: upgrade to waifu 1.1.0 2021-02-28 15:39:22 +03:00
Ivan 'provod' Avdeev c77f39e353 rtx: fix blas creation validation/memory errors 2021-02-27 15:40:57 -08:00
Ivan 'provod' Avdeev 68bce887b4 fixup broken merge; re-add ref_vk back 2021-02-27 13:52:59 -08:00
Ivan Avdeev 9954288450 rtx: add blas building skeleton 2021-02-27 13:43:49 -08:00
Ivan Avdeev 06f3376e72 Merge remote-tracking branch 'upstream/master' into vulkan 2021-02-27 13:38:50 -08:00
a1batross 3b192ca490 engine: sdl: don't free NULL vidmodes 2021-02-27 00:08:42 +03:00
Alibek Omarov 12dd225db2 cirrus: fix freebsd 12 image 2021-02-26 18:33:26 +03:00
SNMetamorph 56d5f08128 platform: win32: fixed crashes in COM_CheckLibraryDirectDependency 2021-02-26 16:05:34 +03:00
Alibek Omarov 256284d76f wscript: refactor loading MSVC tools, apply @w23 hack for renaming DEST_CPU 2021-02-26 16:04:45 +03:00
Alibek Omarov cf5ebd128c client: fix XASH_64BIT check 2021-02-26 16:04:45 +03:00
Ivan 'provod' Avdeev 5b597028fe make it reliably compile for amd64 on windows
This makes it possible to just pass `-8` to ./waf configure on Windows
and it will build 64-bit binaries. Yay I guess.

However, it's completely broken conceptually -- it ends up just brute
rewriting `conf.env.DEST_CPU` from `amd64` to `x86_64` at one particular
point in wscript. Why? Because many places in build system expect
`x86_64` as 64-bit DEST_CPU, especially breaking SDL2 lib detection.
Some of these are in waifu and patching that is beyond what I can hold
in my head right now.
Why that particular point? Because it DEST_CPU gets rewritten a few
times before that and no times after it seems.

This does not address `./waf msvs` VS project generation yet -- it will
still produce only Win32 platform that needs to be manually rewritten.

There's a mechanism for msvs extras to be passed a set of platforms, but
I've yet to make it work.
2021-02-26 16:04:45 +03:00
Ivan Avdeev 012d1fa8bd fix USE_MMAP usage
should fix CI failures
2021-02-26 16:04:45 +03:00
Ivan Avdeev 1b426b67e7 partially fix amd64 build on windows
Quality of this commit is questionable. I have no idea whether what I did
here makes sense or not.
But it compiles and runs (provided with hlsdk-xash3d amd64 build, which
is another story).

This omits necessary waf changes that are necessary to make a valid
64-bit build. Apparently it's not enough to just pass `-8` on Windows,
you also need to hack wscript to add `x64` target to MSVC. I'll do that
later when I figure out how.

This change is a precursor for RTX Vulkan effort --
VK_KHR_ray_tracing_pipeline and friends are only available on 64-bit
nvidia drivers (no idea about AMD, pls send GPUs onegai).
2021-02-26 16:04:45 +03:00
Ivan Avdeev 973ef4c677 separate buffer space allocation from buffer uploading
Now each geometry is first allocated a slot with VK_RenderBufferAlloc,
and then VK_RenderBufferLock/Unlock are used to upload buffer contents.

This allow for two things:
1. Uploading buffer data to GPU memory on/after Unlock.
2. (Re)building BLAS for RTX on/after Unlock.

These buffers are now directly referenced by render_draw_t, which also
will be helpful in the future for both renderers.
2021-02-22 18:57:46 -08:00
Ivan 'provod' Avdeev 4349d6b7fa rtx: update vulkan version req to 1.2 2021-02-22 10:16:58 -08:00
Ivan Avdeev 46da9ad457 rtx: request RTX device extensions when -rtx argument is present
It doesn't do anything yet.
2021-02-22 09:46:29 -08:00
Ivan 'provod' Avdeev ded8442993 auto-detect VULKAN_SDK path on windows 2021-02-21 23:28:33 -08:00
Ivan 'provod' Avdeev 5e3f1e52d6 Merge branch 'half-assed-windows-amd64-fix' into vulkan 2021-02-21 22:30:58 -08:00
Ivan 'provod' Avdeev d902dba0d2 make it reliably compile for amd64 on windows
This makes it possible to just pass `-8` to ./waf configure on Windows
and it will build 64-bit binaries. Yay I guess.

However, it's completely broken conceptually -- it ends up just brute
rewriting `conf.env.DEST_CPU` from `amd64` to `x86_64` at one particular
point in wscript. Why? Because many places in build system expect
`x86_64` as 64-bit DEST_CPU, especially breaking SDL2 lib detection.
Some of these are in waifu and patching that is beyond what I can hold
in my head right now.
Why that particular point? Because it DEST_CPU gets rewritten a few
times before that and no times after it seems.

This does not address `./waf msvs` VS project generation yet -- it will
still produce only Win32 platform that needs to be manually rewritten.

There's a mechanism for msvs extras to be passed a set of platforms, but
I've yet to make it work.
2021-02-21 22:15:13 -08:00
Ivan Avdeev 3f70b76208 engage scene rendering in VK_RenderFrame and not in EndFrame
Rework a bit how matrices are computed. More global state dependencies
;_;

Buffer-up draw commands, and only schedule them for drawing at EndFrame.
2021-02-20 14:54:57 -08:00
Ivan Avdeev a5e279f580 fix sprite blending
Disable depth test and set dst blend factor to 1 for kRenderGlow mode.
Sprites are occluded in software.

(does this break any other code depending on Glow mode? who knows)
2021-02-20 12:46:16 -08:00
Ivan Avdeev 8dc0d4256d add VK_RenderDebugLabelBegin/End calls; fix studio model labeling 2021-02-20 12:35:04 -08:00
Ivan Avdeev e66810a05b remove ubo management from "public" vk_render api
Now rendering submodules specify their colors and matrices using
VK_RenderState global stat api. This is a trade-off between making all
submodules track their state on their own, or managing that state
centrally.
2021-02-20 12:00:31 -08:00
SNMetamorph 8d50049db7 netgraph: fixed data usage graphs rendering 2021-02-20 14:22:20 +03:00
SNMetamorph cba9fb1a07 vid_common: added vid_mode cvar for proper working VideoModes menu in game settings 2021-02-20 14:22:20 +03:00
SNMetamorph 932fc8e3c7 wscript: fixed MSVC optimization flag in debug mode 2021-02-20 14:22:20 +03:00
Ivan Avdeev 15fdcab5fe add plan for stream 2021-02-19 23:07:45 -08:00
Ivan Avdeev fea484b946 Merge remote-tracking branch 'origin/master' into vulkan 2021-02-19 22:10:44 -08:00
Ivan Avdeev cb483fdac1 fix USE_MMAP usage
should fix CI failures
2021-02-19 22:08:39 -08:00
Ivan Avdeev a9b91514a5
fix USE_MMAP usage
should fix CI failures
2021-02-18 12:14:20 -08:00
Ivan Avdeev 076b7e157d partially fix amd64 build on windows
Quality of this commit is questionable. I have no idea whether what I did
here makes sense or not.
But it compiles and runs (provided with hlsdk-xash3d amd64 build, which
is another story).

This omits necessary waf changes that are necessary to make a valid
64-bit build. Apparently it's not enough to just pass `-8` on Windows,
you also need to hack wscript to add `x64` target to MSVC. I'll do that
later when I figure out how.

This change is a precursor for RTX Vulkan effort --
VK_KHR_ray_tracing_pipeline and friends are only available on 64-bit
nvidia drivers (no idea about AMD, pls send GPUs onegai).
2021-02-17 23:09:40 -08:00
Ivan Avdeev 1890df6de1 partially fix amd64 build on windows
Quality of this commit is questionable. I have no idea whether what I did
here makes sense or not.
But it compiles and runs (provided with hlsdk-xash3d amd64 build, which
is another story).

This omits necessary waf changes that are necessary to make a valid
64-bit build. Apparently it's not enough to just pass `-8` on Windows,
you also need to hack wscript to add `x64` target to MSVC. I'll do that
later when I figure out how.

This change is a precursor for RTX Vulkan effort --
VK_KHR_ray_tracing_pipeline and friends are only available on 64-bit
nvidia drivers (no idea about AMD, pls send GPUs onegai).
2021-02-17 23:01:33 -08:00
Ivan Avdeev 56c68dea0b fix beam entities piling up 2021-02-17 13:48:41 -08:00
Ivan Avdeev 3b1e7be112 add beams rendering
not all beam types are supported yet

also changes studio api init sequence, fixes missing cvars
vertex type struct is no longer names as brush-specific
uniform buffer allocation is now in vk_render

blending issues still remain
2021-02-17 13:26:09 -08:00
Ivan Avdeev b22cd90184 add initial sprite rendering
alpha blending is broken
animations are weird, but we do draw them nonetheless somehow
2021-02-15 12:20:25 -08:00
Ivan Avdeev 538ae9191f coalesce studio model draw calls
it's easier to debug, and supposedly is faster to render too
2021-02-15 10:11:12 -08:00
Ivan Avdeev c53bfaf484 add view(weapon) models 2021-02-15 09:55:42 -08:00
mittorn 5884cf88d3 crtlib: fix undefined behaviour when stripping extenstion from empty string 2021-02-14 21:33:41 +00:00
Ivan Avdeev 6fbd63bd1f fix models rendering and animation
RI.drawMode affects how time is interpreted for models, so make sure it
uses the correct time

implement indexing for model rendering -- this fixes weird holes
2021-02-13 23:24:21 -08:00
Ivan Avdeev 778cc60453 add broken studio models drawing
there are several issues with it:
- there are holes in models
- movement is jerky
- no lighting applied
2021-02-13 17:19:59 -08:00
Skyrim-police d2157fa28c
Documentation: supported-mod-list: fix dead links 2021-02-12 04:21:57 +03:00
mittorn 6e43f9bdd0 waf: fix wrong message about 32-bit build 2021-02-12 00:05:41 +03:00
Ivan Avdeev e14f004785 Merge remote-tracking branch 'upstream/vulkan-anim-textures' into vulkan 2021-02-10 11:08:49 -08:00
Ivan Avdeev 5ebe36c54c move buffer allocation to vk_render.c from vk_bruh.c 2021-02-10 10:33:44 -08:00
Alibek Omarov 074e4fd540 glslc: rework tool, support dependency scan, preliminary work on making tool dependless from compiler(like ccroot) 2021-02-10 03:51:11 +03:00