- vk_molten_metalbuffers: enable/disable Metal buffers to bind textures
more efficiently (>= Big Sur).
- vk_molten_fastmath: enable/disable float point op optimisations.
When the validation layers fails (or not present) then we "surprisingly"
fallback to a GL renderer losing all settings too.
Here we try to create the instance but without the validation part then.
Quake II is a single threaded application, so we don't require STB to be
thread save. Omitting thread local support prevents mingw from requiring
pthreads.
Code has selected discrete gpu if it has seen several render devices. It does not work if no discrete gpu has attached to device.
As solution device selected by priorities list like:
* VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
* VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU,
* VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
* VK_PHYSICAL_DEVICE_TYPE_CPU,
* VK_PHYSICAL_DEVICE_TYPE_OTHER.
r_lerp_list is to allow exceptions to r_2D_unfiltered (like for having
pixely UI in general, but filtered console background).
r_videos_unfiltered controls whether videos should be filtered or not
I also made r_nolerp_list CVAR_ARCHIVE, like users probably expect it.
6eb9ca0f65
Setting r_2D_unfiltered to 1 (0 is default), 2D elements (GUI, menu,
console) are rendered without texture filtering in GL1 and GL3, while
everything else is still rendered with whatever is set in gl_texturemode
This setting (and now also gl_nolerp_list) is applied immediately,
so no vid_restart is needed.
3873c76e12
To fully explain, for me on KDE, when a window gets created for exclusive fullscreen, the window will be hidden/shown/resized in a weird way that leads to out of data/suboptimal swapchain errors.
The problem with simply recreating the swap chain based on old code was that it was missing QVk_UpdateTextureSampler calls for vk_colorbuffer and vk_colorbufferWarp which update the descriptor sets, which probably lead to a whole lot of problems.
This fixes issue "3" from here: https://github.com/yquake2/ref_vk/issues/3
This differs from GL3 in that it still supports vk_picmip.
Vk_Upload32 is no longer used, but I left it in case it has some use in the future.
This was first developed in a feature branch in the main yquake2 repo.
It was merged into master in early 2021, but the experiences of the
following month showed that it is not ready for prime time. There're
glitches with 3rd party assets, restarts are still shaky, etc. Having
the code in a separate repo allows us to:
* Release Vulkan independent if YQ2.
* Give commit access to contributors interested in Vulkan.
This code is the same as in yquake/yquake2 ecdf912713eef55d6c5d5a772259b44e3fc232c4.