Commit Graph

59 Commits

Author SHA1 Message Date
Ivan Avdeev f938427771 work around validation bug
see https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/3350
2021-11-17 09:43:18 -08:00
Ivan Avdeev c949b7f214 fix linux build 2021-11-07 13:49:44 -08:00
Ivan 'provod' Avdeev fca6857e51 rtx: add denoiser api stub 2021-11-07 13:49:44 -08:00
NightFox 29e8cce207 fix #80
thanks zgdump
2021-10-27 23:10:08 -07:00
Ivan 'provod' Avdeev debf9bd2e6 make profiler work on windows 2021-10-20 11:58:53 -07:00
Ivan Avdeev 8756f648ca add trivial on-screen profiler printout 2021-10-20 11:58:53 -07:00
Ivan Avdeev 157af769ff rtx: add vk_lights_dump command
It prints out light clusters debugging info.
2021-10-13 12:27:24 -07:00
Ivan Avdeev 93cab236ba split device enumeration and creation, fixes #28 2021-08-16 23:22:13 -07:00
Ivan 'provod' Avdeev fe0223c8d3 fix building with aftermath 2021-08-14 18:30:52 -07:00
Ivan Avdeev e6f8d8e47a enable anisotropy if available
also force require vulkan 1.2 for now, need to have 1.0 device for testing lower versions (TODO)
2021-08-07 18:06:48 -07:00
Ivan Avdeev 378c1e52e0 enable anisotropy only for rtx
this doesn't make any visible impact for rtx rendering. but does affect non-rtx rendering when running with rtx enabled (kekw)
2021-08-04 18:56:11 -07:00
Ivan Avdeev d1fe897966 Merge remote-tracking branch 'origin/vulkan' into amd_ray_tracing_fixes 2021-07-12 09:45:26 -07:00
Ivan Avdeev def7fac402 rtx: fixup build after merge 2021-07-12 09:23:50 -07:00
Ivan Avdeev 76d381388b improve vulkan api definitions 2021-07-11 14:07:25 -07:00
Ivan Avdeev a46b0dffdc rtx: enable textures
- use non-uniform indexing because AMD requires it (which is technically correct by spec, it's just nvidia that supports it transparently)
- disable immutable samplers, as that breaks filtering on amd for some reason (TODO)
2021-07-10 12:37:14 -07:00
Ivan Avdeev dd6fe33a16 add ghetto device selection, allow skipping first device
device selection should be performed by vulkan physical device index, but we have no way to read numeric cmdline arguments from xash
see #21
2021-07-10 11:34:59 -07:00
Ivan Avdeev 2ca2e2058e fix compile warnings for CI, part 2 2021-07-06 12:54:45 -07:00
Ivan Avdeev cdefb7a50a fix compiler warnings for CI 2021-07-06 09:41:48 -07:00
Ivan Avdeev 364b46ea87 [WIP] rtx: first build with ray tracing pipeline and black screen 2021-07-05 13:24:57 -07:00
Ivan Avdeev f8dc37b0eb 🤦 2021-06-07 12:21:47 -07:00
Ivan Avdeev a004656b57 ref_vk: remove verbose ci info; fix win23 func ptr 2021-06-07 12:05:47 -07:00
Ivan 'provod' Avdeev 656c00d0b8 fix building and running on linux 2021-06-06 14:17:35 -07:00
Ivan 'provod' Avdeev eaaadf024e rtx: coalesce building blases in a single command buffer 2021-05-28 10:10:20 -07:00
Ivan 'provod' Avdeev 5de30a4ff0 fix compilation warnings 2021-05-24 11:12:44 -07:00
Ivan 'provod' Avdeev 35275e0916 add aftermath sdk for gpu dump generation
unfortunately, it's not very helpful tho
2021-05-22 14:01:43 -07:00
Ivan 'provod' Avdeev 6614a6935b add debug names to various objects 2021-05-17 10:36:40 -07:00
Ivan 'provod' Avdeev 354eef1c0a rtx: fix validation complaint, ask for more caps 2021-05-08 14:30:33 -07:00
Ivan 'provod' Avdeev ad7b210228 rtx: improve surface lights
use bsp/pvs-based visibility data for acceleration:
+ fps 5 -> 60
- correctness: some areas have too many lights, which ends up culling visible ones too

also fix shadow artefacts
2021-04-12 11:07:41 -07:00
Ivan 'provod' Avdeev af5e20269d add persistent model api and use it for brushes
this needed for better rtx blas management
2021-04-07 12:11:20 -07:00
Ivan 'provod' Avdeev cbed97948c add preliminary support for dlights
Move descriptors away from vk_core
Add UBO for dlights
Add test lighting in brush shader
Add brush normals
2021-03-06 16:40:35 -08:00
Ivan 'provod' Avdeev c77f39e353 rtx: fix blas creation validation/memory errors 2021-02-27 15:40:57 -08:00
Ivan Avdeev 9954288450 rtx: add blas building skeleton 2021-02-27 13:43:49 -08: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 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
Ivan Avdeev 5ebe36c54c move buffer allocation to vk_render.c from vk_bruh.c 2021-02-10 10:33:44 -08:00
Ivan Avdeev 6b2c8977ae add pipeline cache 2021-02-06 11:38:21 -08:00
Ivan Avdeev fc9eedbd9d apply proper lightstyles on map load
Lightstyles remain fixed for the entire map duration. Need to implement either texture reupload in VK, or devise some other scheme of updating ligtmaps w/o texture reupload (lightstylevalues uniform buffers?).
2021-02-03 10:06:21 -08:00
Ivan Avdeev 8870650466 split vk_map into vk_scene and vk_brush
Scene controls entity list for scenes
Brush is only responsible for drawing brush models
2021-02-01 11:05:04 -08:00
Ivan Avdeev e848e312d3 add VK_EXT_debug_utils labels
This extension allows adding labels to vulkan objects and insert string
labels into command buffers. This is visible in tools like RenderDoc and
helps with debugging a lot.

When running with -vkdebug:
- mark all texture VkImages and VkImageViews with corresponding names
- label brush model draw calls accordingly
2021-01-31 16:50:27 -08:00
Ivan Avdeev eaa3d4295d draw brush surface textures
it's now *very slow* because every surface (which is just a few polys)
gets its own draw call and descriptor bind. F

we also had to make default sampler repeating, so now 2d textures in
menu have weird edge artifacts. also F

making progress i guess
2021-01-30 12:12:41 -08:00
Ivan Avdeev 0fc79bf90d Draw some of the brush models
Load all brush models in R_NewMap
Only opaque models are drawn.

This makes WAGONCHIK (and other doors) visible and animated. yay.
2021-01-27 12:00:11 -08:00
Ivan Avdeev 5d0146e17a draw static map geometry with debug shader
there are lots of glitches and no textures, but this is a first step!
2021-01-23 19:38:00 -08:00
Ivan Avdeev 5a2ad5965d add depth buffer and map geometry loading
it's not being drawn yet though
2021-01-23 10:54:44 -08:00
Ivan Avdeev 4b124e240a fix texture wrapping in menu background 2021-01-18 13:38:33 -08:00
Ivan Avdeev d4c463c507 move swapchain to framectl; make validation errors crash process early 2021-01-18 10:54:48 -08:00
Ivan Avdeev 4d6739da0a get it to crappily draw 2d ui menus wtf 2021-01-16 17:02:43 -08:00
Ivan Avdeev 5541bfb541 add loading textures 2021-01-16 15:45:10 -08:00
Ivan Avdeev b9d872f279 increase draw limit; fix deinit validation 2021-01-16 13:49:07 -08:00