Commit graph

2576 commits

Author SHA1 Message Date
Denis Pauk
2c942d83f1 gl: use local model on load(35d598bc) 2021-10-15 23:37:56 +03:00
Denis Pauk
d8eb64cdcd gl1: port submodel load code from vk render(8bd39ad5) 2021-10-15 23:37:53 +03:00
Denis Pauk
34fb8d45b0 soft: Use common RadiusFromBounds 2021-10-15 23:30:56 +03:00
Denis Pauk
a9d6939297 gl: use lower MSAA value on error 2021-10-15 23:30:56 +03:00
Denis Pauk
0bbd65ebac gl1: Scale 8bit images with retexturing=2 2021-10-15 23:30:56 +03:00
Denis Pauk
58af4c84ff gl3: Scale 8bit images with retexturing=2 2021-10-15 23:30:56 +03:00
BjossiAlfreds
59f0462cc1 Fixed updated gunangles and gunoffset not always being sent to client 2021-10-14 02:06:52 +00:00
Yamagi
4b29329758
Merge pull request #748 from devnexen/sw_gl1_inleaf_sig_fix
sw/gl1 client Mod_PointInLeaf sig mismatch.
2021-10-13 17:30:35 +02:00
David Carlier
6cb2981c9c sw/gl1 client Mod_PointInLeaf sig mismatch. 2021-10-08 21:38:34 +01:00
Simon McVittie
d17c00dbd2 backends: Only enable ARM "RunFast" mode when targeting hardware FPU
Older ARM ABIs like Debian armel (ARMv5 EABI softfloat) don't use
or require a hardware FPU, so they can't execute the fmrx and fmxr
instructions. Only do this in hardfloat configurations that guarantee
VFP instructions are available.

The client might not be practically usable on ARM softfloat (although
nobody has reported that it isn't...) but the dedicated server is probably
fine, and ceasing to be able to build either would be a regression.

Signed-off-by: Simon McVittie <smcv@debian.org>
2021-10-05 14:05:15 +01:00
Yamagi
f4f61c1f27 Add g_machinegun_norecoil to the list of cheat proteced cvars. 2021-09-28 18:37:56 +02:00
De-Seppe
b471578c3e Rename variable to conform to naming guidelines
Change the name of the cvar machinegun_norecoil to g_machinegun_norecoil to conform to the naming guidelines
2021-09-27 18:29:37 +02:00
De-Seppe
41a134a195 Add cvar machinegun_norecoil
Add cvar machinegun_norecoil
This cvar allows to disable machinegun recoil in single player.
The default value is the original Quake 2 behaviour.
2021-09-27 12:56:22 +02:00
apartfromtime
a737500f89 Consistent naming 2021-09-21 14:18:25 +10:00
Yamagi
1ff3760c76 Refine the g_footstep cvar.
There were complains that always generating footsteps is annoying,
because there will be footsteps while swimming or jumping. Refine
the cvar a little bit:

* `0`: No footsteps at all.
* `1`: Vanilla Quake II behavior.
* `2`: Always footsteps as long as the player has a ground entity.
* `3`: Always footsteps.

The changes the meaning of the values, `2` has become `3`.

Closes #738.
2021-08-25 18:34:24 +02:00
Denis Pauk
ea272241a4 soft: Use SmoothColorImage as r_anisotropic 2021-08-08 23:34:47 +03:00
Denis Pauk
aa6032f00f soft: preserve cache on free slots in image and models list 2021-08-08 17:43:14 +03:00
Denis Pauk
35d598bce6 soft: use local model on load 2021-08-07 23:03:48 +03:00
Denis Pauk
8bd39ad5dd soft: port submodel load code from vk render 2021-08-07 17:24:39 +03:00
Denis Pauk
a8b02d4725 Sound: unload only on run of slots 2021-08-07 10:38:02 +03:00
DC
bc6a40e27e little memory leak possible when the .pak matches 2021-08-06 16:29:16 +01:00
Yamagi
0f7790c8e3 Remove code unnecessary / redundant since last commit. 2021-08-02 09:09:31 +02:00
Yamagi
7db0a89fe1 Refactor filtering if numbered paks.
For historical reasons numbered paks must be loaded before all other
paks. The logic is easy: Add all numbered paks. Iterate over all
available paks, filter out numbered paks and add everything that's left.

Until now a simple glob comparisson against 'pak*' was used for the
filtering. This has two problems:

1. All paks starting with 'pak*' were filtered, regardless if they're
   numbered paks or not.
2. Upper case or mixed case file names that are valid on caseinsenstive
   systems like Windows weren't recognized as numbered paks and added
   twice. Once as numbered pak and once as other pak.

Refactor the logic to only match paks starting with 'pak%d' and use
strcasecmp() for comparison. Closed #730.
2021-08-02 08:44:49 +02:00
Yamagi
e2e2bddfa3 Fix demo loop after changing the game through the menu.
Injecting the demo loop right after the `game` cvar was changed cannot
work: The demo loop is implemented through aliases, aliases are expended
as soon as they're added to the command buffer. However, the game isn't
changed as soon as the cvar is set, but the next time when the control
flow enters the file system. Therefor the aliases get expanded to the
wrong game and the demo loops breaks.

This closes #719.
2021-07-25 09:45:51 +02:00
Yamagi
8358e386fc
Merge pull request #722 from 0lvin/gamepad
Sync haptic feedback with sound track
2021-06-30 07:28:51 +02:00
Yamagi
fb080fc32c Add missing semicolon, Windows build fix 1/2. 2021-06-29 08:58:40 +02:00
Yamagi
61c08eee13 Fix ASAN and UBSAN builds, enhance sanitizers a little bit.
At least for LLVM / Clang the -fsanitize= option must be passed to the
linker before any objects or libraries, otherwise the sanitizers will
either noch link or are disfunctional. Split LDFLAGS into LDFLAGS for
flags and LDLIBS for librariers, pass LDFLAGS before any objects and
LDLIBS after all objects. While at it set RTLD_NODELETE so that shared
libs opened by dlopen() are never deleted from memory when building
with sanitizers.
2021-06-26 16:28:08 +02:00
Denis Pauk
7f1fd069f4 use LittleShort in S_GetStatistics and S_GetVolume 2021-06-26 15:23:07 +03:00
Denis Pauk
c4526bac51 Sync haptic effect to sound track 2021-06-26 15:23:07 +03:00
Yamagi
d9d5552662
Merge pull request #717 from 0lvin/ogg_sound
Add ogg/vorbis sound for effects
2021-06-25 10:18:41 +02:00
Yamagi
c9f7faa7b1 Add logic to mark search path entries as required or optional.
Until 7.45 we supported adding non existent dirs to the search path,
8.00 bails out if it cannot at a dir. It turned out that some users
install the binary through their package management (SYSTEMWIDE is set),
but use local game data. This case was broken, because the SYSTEMDIR
doesn't exist. Fix this by marking the SYSTEMDIR as optional.

Closes #724.
2021-06-20 18:24:22 +02:00
Yamagi
21483dc1bd
Merge pull request #718 from Spirrwell/master
Fix some leaks
2021-06-19 08:48:54 +02:00
Yamagi
f64837868d Bump the CHANGELOG to 8.00. 2021-06-14 16:38:38 +02:00
Denis Pauk
408e7d9a99 Scale down model preview icon is too big 2021-06-13 15:52:48 +03:00
Denis Pauk
7be959894b fix line duplication 2021-06-13 15:46:16 +03:00
Denis Pauk
d554b89730 sound: cleanup ogg to wav code 2021-06-13 15:46:16 +03:00
Denis Pauk
fbde7b753f fclose is not required with close_on_free=true 2021-06-13 15:46:16 +03:00
Denis Pauk
bf286dc952 Add ogg/vorbis sound for effects 2021-06-13 15:46:16 +03:00
David Carlier
53c684525f solairs/illumos build fix proposal. 2021-06-13 08:25:56 +01:00
Yamagi
f4e7ee59c4 Bump version to 8.00rc1. 2021-06-07 10:10:16 +02:00
Daniel Gibson
7ae9655f3a Fix UBSan Warnings
- memcpy() shouldn't be called with NULL, even if length == 0
- In CMod_LoadBrushSides() j (from in->texinfo) could be -1,
  which of course is no valid array index
2021-06-04 13:39:43 +02:00
Daniel Gibson
dc7ad65bb0 Fix crash in soft renderer
RE_Draw_StretchPicImplementation() would write up to
height+picupscale-1 lines.
That overflows the buffer so make sure it doesn't.
2021-06-04 13:38:14 +02:00
Spirrwell
b9129f2fa8 Fix some leaks
Most of these are probably "harmless", but I could definitely see the missing/improper SDL_Quit/SDL_QuitSubsystem causing headaches later.
2021-06-02 19:45:34 -04:00
Yamagi
c9913eb538 Detect if an autosave is loaded and advance world by 100 frames.
Autosaves are special. The are a byproduct of the level change process.
When loaded they aren't respawning the player at it's last position, the
player is relocated to func_playerstart. Since entities spawn at their
start position, the player may end up in the wrong spot.

One example is train.bsp -> base2.bsp. The platform spawns in upper
position, the player in lower position. The platform comes down and
crushes the player.

Most of these cases work by luck when the client isn't paused during
load, because the world advances a few frames before the player is
spawned. Implement a better fix: Detect if an autosave is loaded (name
is save0 or current) and treat it like a map change, advance the world
by 100 frames. We cant use the `autosave` boolean, because it's in the
game savefile.

Fix suggested by @BjossiAlfreds, closes #711.
2021-05-29 17:16:42 +02:00
Yamagi
8f6a085434 Remove ref_vk, the Vulkan renderer ported from vkQuake2.
While having a Vulkan renderer in Yamagi Quake II sounded like a good
idea, especially for cheap hardware with broken OpenGL drivers, the last
weeks showed that the code is not ready for primetime. Some examples
for critical problems:

 * Render glitches when using non-standard assets. Everything with more
   polygons and texture resultion than baseq2 seems to be broken.
 * The startup and shutdown code is a mess. While I fixes the most
   critical bug, there're a lot of cases left. Startup and shutdown
   mostly works by luck.
 * At least one memory leak in the model code.

And neither @DanielGibson nor myself have deeper knowledge about Vulkan.
We don't have the time and the motivation to learn it. While some
community members did excellent work on ref_vk (especially @0lvin and
@rg3), the community maintenance promised in the initial pull request
never really materialized. Therefor we risk ending up with a renderer
that we can't and won't maintain by ourself.

Vulkan is not gone. The code will be recommitted in a separate
repository at: https://github.com/yquake2/ref_vk

We're willing to give community members commit access to that
repository. Send a substantial pull request and ask for it.
2021-05-28 09:33:46 +02:00
Yamagi
76d61d9d8f Remove rev_vk from the client. 2021-05-28 09:33:44 +02:00
Yamagi
84312ae8b7 Check if renderer lib exists before loading it.
This is a noop change, we're just bailing out somewhat earlier.
2021-05-28 09:32:42 +02:00
Yamagi
496985eb90 'Unknown renderer' as upper entry point to the fallback magic.
This is next to no functional change, the only difference to before is,
that the Vulkan renderer is treated as an unknown renderer. gl3 is the
first regular fallback.
2021-05-28 09:32:42 +02:00
Yamagi
ffddd0f7c9 Unify renderer lib path generation.
This makes sure that all users of the renderer lib have the same world
view.
2021-05-28 09:32:42 +02:00
Yamagi
6822da851e Move renderer availability check into vid.c, rename to VID_HasRenderer. 2021-05-28 09:32:42 +02:00
Yamagi
ddce6691e2 Let the video menu skip over non existent renderer libs.
Unitl now the video menu showed all known renderer libs (gl1, gl3, vk
and soft), regardless if the lib was available or not. Rework the
renderer selection logic to skip over non existent renderer libs:
Generate an array combining the menu string and cvar string of all
available renderer libs, use this array instead of the hardcoded array.
While at it simplify the code a little bit.
2021-05-28 09:32:42 +02:00
Yamagi
e66fd250c2 It's vk, not vulkan. 2021-05-25 11:54:38 +02:00
Yamagi
968cd4248d Bump max number of OGG/Vorbis files to 128.
Requested in #714, closes #714.
2021-05-12 18:11:26 +02:00
Daniel Gibson
002498c33d framerate-independent turning of player-model in multiplayer menu
fixes #701
2021-05-08 18:59:52 +02:00
Daniel Gibson
ea51d5f924 Add r_listmodes, change one comment and a message
r_listmodes does the same as vid_listmodes, but is more consistent with
r_mode

the rest is cosmetical
2021-05-08 18:58:24 +02:00
Yamagi
2e8e6088b3 Add logic to prevent Vulkan restart loops.
So far I haven't seen a restart loop, but at least in theory they'e
possible. Because its hard to break out of such loop, especially on
Windows were interaction with the taskmanager is required, play save
and restart max. 3 times in a row.
2021-04-30 13:14:29 +02:00
Yamagi
950ec0d67e Lower vkAcquireNextImageKHR() timeout to 500 milliseconds.
The timeout specifies how long Vulkan waits for the next frame becoming
available. On the one hand we need to take the vsync or the possibility
that we get scheduled away for longer times into account. On the other
hand we don't want to wait for too long, the game may run into the
timeout after its windows was minimized, etc. 500 milliseconds sounds
like a good compromise.
2021-04-30 13:14:29 +02:00
Yamagi
7ea425ee25 Handle VK_TIMEOUT, may lead to restart loops. 2021-04-30 13:14:29 +02:00
Yamagi
c543d3cc05 Work around maximal extent size of 0x0 when the game is minimized.
Some GPU drivers set a maximal extent size of 0x0 when the window gets
minimized. One example is Intel on Windows. A swapchain with extent
size of 0x0 is invalid, so we cannot reinitialize the renderer... Work
around that by postponing the restart as long as the maxmimal extent
size stays 0x0.

This could should be done in the client (don't call into th renderer
when the window is minimized), but it would need a lot of changes
to the client <-> renderer interactions. So take the easy route.
2021-04-30 13:14:29 +02:00
Yamagi
dd80702913 Add a function QVk_CheckExtent() to query the extent state.
This will be used to detect if we've got an extent size of 0x0 because
the window has been maximized.
2021-04-30 13:14:29 +02:00
Yamagi
0ccf1e8ef8 Make current frame as not started after vk init / shutdown.
The client might call into the renderer after it was shut down by
`VID_ShutdownRenderer()` or initialized `VID_LoadRenderer()`. This
is arguably a client bug, but hard to fix on client side and not
a problem for all other renderers. Work around it by marking the
current frame as 'not started' at Vulkan shutdown and init.
2021-04-30 13:14:29 +02:00
Yamagi
a38084c621 Move QVk_Postinit() from render init to context init.
This is more in line with the rest of the code. Reinitializing the
internal state when building a new context is saver than relying on
Vulkan telling us that something is wrong an reacting to that.
2021-04-30 13:14:29 +02:00
Yamagi
1f4082c419 Call QVk_WaitAndShutdownAll() on context shutdown.
Just calling `QVk_Shutdown()` is wrong. It doesn't wait for Vulkan to
finish, which can cause crashes. And it leaks some ressources which
makes the GPU driver unhappy.
2021-04-30 13:14:29 +02:00
Yamagi
3cf786e158 Ensure that the vk renderer isn't init or shutdown twice.
The ref_vk renderer was written for vkQ2 which has differend renderer
<-> client semantics. In YQ2 we can end up initializing or shutting the
renderer down several times. Not by the client, but by the client not
knowing of the renderer has already initialized / shutdown it's internal
state. This is fatal, leading to ressource leaks, crashes and other fun.

Introduce a new global variable `vk_initialize` and use it to track if
we're initialized or not.
2021-04-30 13:14:29 +02:00
BjossiAlfreds
d41d90d8b3 Fix for some player sound bugs 2021-04-30 01:43:15 +00:00
Yamagi
4cacd4a0c9
Merge pull request #706 from BjossiAlfreds/shark-bbox
Shark bbox fix and added check for inuse after entity thinking
2021-04-27 08:59:53 +02:00
Yamagi
c88c299172 Fix playback of OGG/Vorbis files with != 2 channels.
This was a stupid bug and the code worked just by luck, but only with
stereo files. Because sizeof(short) == 2 and ogg_file->channels.
2021-04-24 17:48:28 +02:00
BjossiAlfreds
75d671656e Shark bbox fix and added check for inuse after entity thinking 2021-04-18 01:07:07 +00:00
Yamagi
7d27e0d0e8
Merge pull request #698 from BjossiAlfreds/map-fixes
Map fixes for old and newly discovered bugs + removed code hacks
2021-04-13 13:00:19 +02:00
Yamagi
ef248cbe6a Port the vk renderer to the new ref restart API.
Since `vid_fullscreen` isn't special anymore, it's completely handled by
`Vid_Restart_f()`, which in turn simplifies the spaghetti code in the vk
renderer. If I understand that glibberish correctly the only we need to
handle is the partial restart in `QVk_Restart()`.
2021-04-11 11:23:45 +02:00
Yamagi
fa30a41c5e Port the soft renderer to the new ref restart API. 2021-04-11 11:23:45 +02:00
Yamagi
01fa2cfc1c Port the gl1 renderer to the new ref restart API. 2021-04-11 11:23:44 +02:00
Yamagi
27a021eb7c Port the client to the new restart API.
This fixes the video menu and alt-tab when running a renderer that uses
the new API.
2021-04-11 11:23:44 +02:00
Yamagi
a5102f47dd Port the gl3 renderer to the new ref restart API. 2021-04-11 11:23:44 +02:00
Yamagi
09d645ab4b Extend the ref import API with Vid_RequestRestart().
This function will be used to replace the vid_fullscreen->modified
mechanism used the communicate renderer configuration restarts to the
client with a proper proper API. The implementation is backward
compatible, existing renderers are still working.
2021-04-11 11:23:44 +02:00
Yamagi
886ce1525e Port missing !vk_frameStarted guards from vulkanQ2.
Without these guards draw calls may be emitted without having a working
or sane context, leading to crashes in the Vulkan driver.
2021-04-11 11:17:52 +02:00
Yamagi
33148a3085 Revert "unix network little change proposal. socket port fits within unsigned 16 bits type."
This reverts commit df3b2307f2.
2021-04-10 17:40:03 +02:00
BjossiAlfreds
23f55b72c7 Map fixes for old and newly discovered bugs + removed code hacks 2021-04-08 13:42:18 +00:00
Yamagi
4fd0369f47
Merge pull request #697 from 0lvin/for_review
soft: fix m8 image load
2021-04-08 11:05:56 +02:00
Yamagi
56754ff8b8
Merge pull request #696 from devnexen/segfault_with_console_at_launch
Fix segfault when turning the console before the game is launched
2021-04-08 11:04:17 +02:00
Yamagi
916515182f
Merge pull request #690 from devnexen/savegame_data_packing
game data packing representation of the headers
2021-04-08 11:02:28 +02:00
Denis Pauk
5cc959e501 soft: fix m8 image 2021-04-07 22:58:46 +03:00
David CARLIER
f66d7a9540 Fix segfault when turning the console before the game is launched
(thus audio backend not yet initialised).
2021-04-07 20:17:27 +01:00
Yamagi
26bda18549
Merge pull request #694 from 0lvin/for_review
Vulkan code improvements and cleanup
2021-04-07 09:56:07 +02:00
Yamagi
1bae4e679f
Merge pull request #695 from devnexen/arm_runfast_mode
Little optimisation attempt targeted only for ARM 32 bits,
2021-04-07 09:32:18 +02:00
Yamagi
d4bf1415b7
Merge pull request #691 from devnexen/network_unix_chg
unix network little change proposal. socket port fits within unsigned…
2021-04-07 09:16:41 +02:00
Denis Pauk
68a0605582 sw: support full size retextured it_pic 2021-04-07 00:03:04 +03:00
David Carlier
159f5e3ae4 Little optimisation attempt targeted only for ARM 32 bits,
enabling "RunFast" mode ; benefits might depend on the board
 at hand.
2021-04-04 13:15:42 +01:00
Denis Pauk
e8105810d7 vk: rework lefthand pipeline logic 2021-04-04 13:36:47 +03:00
Denis Pauk
456acfda05 vk: Reuse TriangledFan logic for TriangleStrip 2021-04-04 12:11:11 +03:00
Denis Pauk
f8708a0f76 vk: rename triangle_{fan}_index_count 2021-04-04 10:46:35 +03:00
Denis Pauk
b2ff95249e vk: fix water on jail1 level 2021-04-03 13:31:21 +03:00
Denis Pauk
ec013874a0 check vert realloc in vk and vert list overflow in model 2021-04-03 13:31:05 +03:00
David Carlier
df3b2307f2 unix network little change proposal. socket port fits within unsigned 16 bits type. 2021-04-01 19:39:23 +01:00
David Carlier
4bbf7ef27a game data packing representation of the headers 2021-04-01 12:18:13 +01:00
Denis Pauk
0b821a49c3 ref_vk: Reallocate mesh verts 2021-04-01 00:26:55 +03:00
Denis Pauk
bef9485859 Fix vulkan validation warning
VK_WARNING: Validation Performance Warning: [ UNASSIGNED-BestPractices-vkCreateRenderPass-image-requires-memory ] Object 0: handle = 0x58e7d23ea0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x4003982 | Attachment 2 in the VkRenderPass is a multisampled image with 4 samples, but it uses loadOp/storeOp which requires accessing data from memory. Multisampled images should always be loadOp = CLEAR or DONT_CARE, storeOp = DONT_CARE. This allows the implementation to use lazily allocated memory effectively. (performance)
2021-03-31 22:20:01 +03:00
Yamagi
557668c35e
Merge pull request #680 from rg3/vk_restart_tweaks
Vulkan restart tweaks
2021-03-31 19:36:18 +02:00
Yamagi
ee945625d3 Add a cvar g_commanderbody_nogod to make the com. body destructable.
The commanders body entity is special, because it's spawned in god mode.
That's no problem in the baseq2 and addons campaigns. But it may break
some custom maps and prevents some hacks, one example is putting the
entity inside an killbox.

Submitted by Евгений T.
2021-03-31 19:28:20 +02:00
Yamagi
635f6ffb16
Merge pull request #685 from BjossiAlfreds/bad-triggered
Console warning and fix for triggered monsters with no targetname
2021-03-31 10:07:06 +02:00
Ricardo Garcia
6c3261180b Use vid_renderer instead of vid_refresh to re-register clients 2021-03-29 22:15:28 +02:00
BjossiAlfreds
fe517fd755 Console warning and fix for triggered monsters with no targetname 2021-03-28 17:16:36 +00:00
Yamagi
baae6bed89 Send protocol version to client.
Knightmare of KMQ2 requested this as an easy way to support client site
prtocol auto detection.

While here fix the protocol version number in the error string.
2021-03-28 18:48:38 +02:00
Yamagi
1c8077cf61
Merge pull request #683 from devnexen/mapids_code_simpl
map list/little code changes proposal.
2021-03-28 18:32:00 +02:00
David Carlier
7492fd875d map list/little code changes proposal. 2021-03-27 08:10:15 +00:00
Ricardo Garcia
17c2c94f07 Fix memory leak when restarting the Vulkan renderer
models_known needs to be freed after freeing its contents.
2021-03-21 18:30:06 +01:00
Ricardo Garcia
e362e0280e Restart Vulkan renderer at EndFrame instead of BeginFrame
This brings yquake2 closer to vkQuake2 regarding renderer restarts when
the swapchain is out of date, among other situations that trigger a
Vulkan renderer restart.

Basically, the current behavior has the problem that when the renderer
is restarted at the beginning of the frame, the models are lost and we
end up with "ERROR: Mod_PointInLeaf: bad model" when attempting to
render anything after that restart.

To solve this, we move the restart logic to EndFrame and add a twist to
it: we use a vid_refresh variable to signal the server that the client
needs re-registration before starting the next frame cleanly, which will
trigger the registration logic to prepare the models again.
2021-03-21 18:29:38 +01:00
Ricardo Garcia
8891319bc1 Do not reset r_anisotropic to 1 from GL renderers
r_anisotropic can be zero in Vulkan to indicate anisotropic filtering
needs to be completely disabled, instead of enabled with value 1.0.
2021-03-21 11:08:09 +01:00
Ricardo Garcia
f601ffddfc Use the real anisotropic filtering value in Vulkan
When creating the Vulkan texture samplers, make them have the real
anisotropic filtering value selected by the user. This has two side
effects:

* We no longer need two sets of texture samplers in Vulkan (one with and
  another one without anisotropic filtering).

* The anisotropic filter value in Vulkan is no longer an on/off switch
  and we use the value as chosen by the user.
2021-03-21 11:08:09 +01:00
Ricardo Garcia
6f8949fd95 Apply anisotropic filter only when hitting "Apply"
Making the anisotropic filter value only be applied after hitting Apply
in the video menu will make it more natural for the Vulkan renderer to
restart itself when a new anisotropic value is selected, paving the way
to use the actual anisotropic filtering value in Vulkan.
2021-03-21 02:31:09 +01:00
Yamagi
11bcb785d0 Force SDL to minimize the window when focus is lost.
This was the default until 2.0.12 and is what the expects. It changed
with 2.0.14, casing problems with window ordering under windows and
some X11 window managers like kwin.

Do it unconditionally. So we're shure that we're ending with a minimized
windows, no matter what SDL does.

Fixes part of #647.
2021-03-17 09:21:48 +01:00
Denis Pauk
56a8ab6d4d Fix fullscreen value in hacks (f1b6b827) 2021-03-10 23:25:59 +02:00
Yamagi
18a9827b74 When drawing the renderer list, move vk before soft.
The software renderer should be the last option offered to the user,
because it is the weakest renderer.
2021-03-10 10:45:36 +01:00
Yamagi
f1b6b82721 Pull the major release card and switch the semantics of vid_fullscreen
One of the most common bug reports is, that the fullscreen mode doesn't
behave like users expect. This is caused by `vid_fullscreen 1` setting
desktop fullscreen mode (a fullscreen windows) and not the native
fullscreen mode. This commits switches the semantics:

* 1: Native fullscreen, like Vanilla Quake II.
* 2: Desktop fullscreen.

With this alt-tab reverts to native fullscreen. While at it improve the
documentation, suggest setting `r_mode -2` when using `vid_fullscreen
2`. Change the menu strings to make things clearer, set `r_mode -2` when
selecting 'fullscreen window' in the menu.

I pondered several other options:

* Introducing a second cvar for the desktop fullscreen, like we did in
  dhewm3. This has the problem, that in Quake II vi_fullscreen is
  special and used to communicate changed to the renderer configuration
  between the client and renderer. A second fullscreen cvar would
  complicate this already shaky mechanism even more.
* Setting `r_mode -2` when `vid_fullscreen 2`. This might not be what
  the user wants and causes problems when we're unable to get the
  desktop resolution.
2021-03-10 10:30:21 +01:00
Yamagi
51caf5b85e
Merge pull request #676 from rg3/vk_restart_fixes
Avoid restarting the whole video on VK_ERROR_OUT_OF_DATE_KHR
2021-03-10 10:01:47 +01:00
Yamagi
3c4dfcbba8 Switch the r_fixsurfsky default value to 0.
Switching this back to Vanilla Q2 behavior fixes at least one lightning
problem in the space map in baseq2. It'll break the lighting in some
addon maps, but is more correct from a global standpoint. You can't
have everything...

Closes #677.
2021-03-10 09:49:03 +01:00
Yamagi
4ef0a71b63 Fix another mapbug in city2.bsp.
There's a floater spawned in but never triggered, messing up the monster
count on medium and hard difficulty.

Closes #674.
2021-03-10 09:42:54 +01:00
Yamagi
e8107b4c64 Add else case missed / not committed in 9a17eb9a. 2021-03-08 21:30:34 +01:00
Ricardo Garcia
6989d22a2e Avoid restarting the whole video on VK_ERROR_OUT_OF_DATE_KHR
If an error is detected in vkAcquireNextImageKHR or vkQueuePresentKHR,
avoid restarting the whole video system and the game window. Instead,
shut down the Vulkan subsystem as gracefully as possible and restart it
without touching the window.

This fixes the problem with infinite video restarts under the Gnome
desktop environment.
2021-03-07 23:11:10 +01:00
Yamagi
80c637b5d6 Clamp scr_conspeed to 0.1f and use Cvar_Set().
Pointed out by @maraakate.
2021-03-05 10:29:46 +01:00
Yamagi
bfa25a13d9 Clamp the console speed to 1 or higher.
Lower values mess up the console rendering. Closes #671.
2021-03-04 07:13:42 +01:00
Yamagi
ae9a248e9e Add a cvar g_footsteps to control the generation of footstep sound.
1: The Vanilla Quake II behaviour, footsteps are generated when the
   player is faster than 255.
0: Footstep sounds are never generated.
2: Footstep sounds are always generated.

Defaults to `1`, cheat protected to `1`.

Closes #666.
2021-03-02 15:08:23 +01:00
Yamagi
69f029e236 Fix mapbug in lab.bsp: monstercount is off by two on medium skill.
In lab.bsp near the commanders head two parasites spawn in an hidden
place in the ceiling. On hard difficulty the box cracks open, exposing
the parasites. On medium skill it doesn't. Work around that by lowering
the monster count by 2.

Closes #668.
2021-03-02 14:51:22 +01:00
Yamagi
4c16fbe6dc Fix mapbug in cool1.bsp: monstercount is off by one on medium skill.
When coming down the river near the end on hard difficulty a gladiator
breaks out of a big metal crate to the left. On medium difficulty the
gladiator is spawned but never triggered. Work around this by lowering
the monstercount by one when skill is set to 1. This doesn't happen on
easy difficulty.

Closes #667.
2021-03-02 14:44:35 +01:00
Yamagi
d713944681
Merge pull request #658 from rg3/more_vulkan_fixes
More Vulkan fixes
2021-02-26 14:48:00 +01:00
Ricardo Garcia
bdd715ee5c Fix validation errors with unnormalized samplers
When using samplers with unnormalized coordinates in Vulkan, the shaders
must specify the LOD explicitly.
2021-02-23 22:07:32 +01:00
Vasily Postnicov
8ba25e82c9 Fix segmentation fault on FreeBSD.
Specify correct protection flags when calling mmap() on FreeBSD.
prot | PROT_MAX (prot) are the correct flags because just PROT_MAX
(prot) leaves current protection flags set to PROT_NONE which causes
segmentation fault when reading or writing to the mapped region.
2021-02-17 22:16:58 +03:00
Ricardo Garcia
63f6778910 Only center Vulkan viewport in "keep resolution" mode
When windowed or in "switch resolution" mode, the viewport must be kept
in the top-left corner or it will appear cut while in fullscreen.

Also, make offset and width calculations safe from the point of view of
the swapchain extent, in case there's a mismatch.
2021-02-14 23:01:14 +01:00
Ricardo Garcia
b96b3a8d84 Synchronize color attachment layout transitions with loads
Since we are now loading the world color buffer content before drawing
on them again, we need to make sure the attachment layout transition
from shader-read-optimal to color-attachment-optimal happens before
color attachment read operations.
2021-02-14 00:03:40 +01:00
Ricardo Garcia
e0e52de47f Add a convenience Qvk_MemoryBarrier function 2021-02-14 00:02:08 +01:00
Denis Pauk
791b5e1e13 Save buffer size and use as limit for operations 2021-02-06 23:35:02 +02:00
Denis Pauk
ba173e68b5 rearrange init functions 2021-02-06 22:42:15 +02:00
Denis Pauk
0b79fa99ed #660: convert wrong modeltype to warning 2021-02-03 00:08:10 +02:00
Denis Pauk
1882fc2dbc #661: Use corrected resolution in fullscreen=1 2021-02-01 23:02:51 +02:00
Yamagi
06d183b6db
Merge pull request #655 from 0lvin/stereo_sound
Support of wav stereo sound
2021-01-31 12:18:26 +01:00
Ricardo Garcia
8599cab275 Load framebuffer contents correctly for MSAA
The contents of the previous drawn frame, used to mask geometry glitches
due to geometry sometimes not being watertight, was not being correctly
loaded for MSAA cases.

When MSAA is not used, the single-sample attachment needs to be loaded
and stored. With MSAA enabled, it's the multisample attachment the one
needing to be loaded and stored.
2021-01-31 10:54:03 +01:00
Ricardo Garcia
9661ce0ba0 Make scaled down view borders work with MSAA
The pipeline used to draw a texture quad was only created compatible
with the RP_UI render pass, which has a single-sample color attachment.
This made the pipeline work when MSAA was disabled, but it did not work
properly with it enabled.

To fix the issue, create a set of pipelines, instead of a single one,
with compatibility with the different types of render passes, as the
pipeline is used for both the scaled down view borders as well as UI
elements in the third render pass.
2021-01-31 10:38:59 +01:00
Yamagi
9a17eb9ac3 Make limiting power screen sounds to 16 optional.
This was added in e3e5bd1 as a work around for some openal-soft bug.
When too many audio samples got played at the same time, the global
volume dropped. This was fixed in openal-soft 0.19.0, released more
than two years ago. We're keeping the work around, because some
distros may still ship with buggy openal-soft versions and some
players may like the changed behavior. It's disabled by default.
2021-01-30 13:51:02 +01:00
Denis Pauk
6f045f71af sound: use current func name in Com_Error 2021-01-27 22:38:31 +02:00
Denis Pauk
f73bcf5fbd cppcheck fixes
src/client/refresh/soft/sw_main.c:
   1512 (style) Variable 'err' is assigned a value that is never used. [unreadVariable]

src/client/refresh/vk/vk_rmain.c:
  1023 (style) Suspicious calculation. Please use parentheses to clarify the code. The code ''a&b?c:d'' should be written as either ''(a&b)?c:d'' or ''a&(b?c:d)''. [clarifyCalculation]

src/client/sound/ogg.c:
  335 (style,inconclusive) Function 'OGG_PlayTrack' argument 1 names different: declaration 'track' definition 'trackNo'. [funcArgNamesDifferent]
  212 (style) Local variable 'gogTrack' shadows outer variable [shadowVariable]

src/client/sound/sdl.c:
  179 (style) The scope of the variable 'i' can be reduced.
  180 (style) The scope of the variable 'lpos' can be reduced.
  181 (style) The scope of the variable 'ls_paintedtime' can be reduced.
  182 (style) The scope of the variable 'out_idx' can be reduced.
  183 (style) The scope of the variable 'count' can be reduced.
  185 (style) The scope of the variable 'p' can be reduced.
  186 (style) The scope of the variable 'snd_linear_count' can be reduced.
  187 (style) The scope of the variable 'step' can be reduced.
  189 (style) The scope of the variable 'snd_out' can be reduced.
  330 (style) The scope of the variable 'data' can be reduced.
  368 (style) The scope of the variable 'data' can be reduced.
  369 (style) The scope of the variable 'left' can be reduced.
  369 (style) The scope of the variable 'right' can be reduced.
  401 (style) The scope of the variable 'end' can be reduced.
  529 (style) The scope of the variable 's' can be reduced.
  799 (style) The scope of the variable 'i' can be reduced.
  874 (style) The scope of the variable 'scale' can be reduced.
  910 (style) The scope of the variable 'srcsample' can be reduced.
  1093 (style) The scope of the variable 'total' can be reduced.
  196 (style) Local variable 'i' shadows outer variable [shadowVariable]
  197 (style) Local variable 'count' shadows outer variable [shadowVariable]

src/client/sound/sound.c:
  450 (style) The scope of the variable 'maleFilename' can be reduced.
  980 (style) The scope of the variable 'num' can be reduced.
  1085 (style) The scope of the variable 'sfx' can be reduced.
  423 (style,inconclusive) Function 'S_RegisterSound' argument 1 names different: declaration 'sample' definition 'name'. [funcArgNamesDifferent]
  909 (style,inconclusive) Function 'S_StartLocalSound' argument 1 names different: declaration 's' definition 'sound'. [funcArgNamesDifferent]
  1048 (style,inconclusive) Function 'S_Update' argument 2 names different: declaration 'v_forward' definition 'forward'. [funcArgNamesDifferent]
  1048 (style,inconclusive) Function 'S_Update' argument 3 names different: declaration 'v_right' definition 'right'. [funcArgNamesDifferent]
  1048 (style,inconclusive) Function 'S_Update' argument 4 names different: declaration 'v_up' definition 'up'. [funcArgNamesDifferent]
2021-01-27 22:38:31 +02:00
Denis Pauk
8c69684e8d client/sound: make local symbols static 2021-01-27 22:38:31 +02:00
Denis Pauk
c3e76236ba Support stereo effects #641
Based on:
  https://github.com/mczero80/KMQuake2/blob/4c23519/client/snd_mem.c#L324
  https://github.com/mczero80/KMQuake2/blob/4c23519/client/snd_mem.c#L236
2021-01-27 22:38:31 +02:00
Yamagi
957c11513c
Merge pull request #657 from rg3/vulkan_fullscreen_fixes
Fullscreen Vulkan fixes
2021-01-27 08:38:03 +01:00
Ricardo Garcia
e85f266a84 Restore reduced view textured borders
This commit removes the previous R_CleanupBorders hack and fixes
textured border drawing, so borders are correctly drawn in the right
place and are not taken into account when applying the underwater
effect.
2021-01-24 23:47:21 +01:00
Ricardo Garcia
741f64604c Remove duplicate comment 2021-01-24 23:25:02 +01:00
Ricardo Garcia
abda667781 Fix screenshots so they capture the center of the framebuffer 2021-01-24 23:19:20 +01:00
Ricardo Garcia
fe13cfbbb7 Avoid frame cleaning hack in refdef changes
With the fix from 76f56458, we no longer need to clean the frame when
the world view changes sizes.
2021-01-24 22:18:41 +01:00
Ricardo Garcia
76f56458b1 Fix water warp edge distortion when keeping resolution
With vid_fullscreen 1 and a scaled down viewport, the water distortion
effect produced waves in the viewport edge. This commit fixes those.
2021-01-24 13:32:45 +01:00
Ricardo Garcia
5fcfcd56b3 Fullscreen Vulkan fixes
This commit includes the following changes:

* When vid_fullscreen is 1, the game is now drawn centered in the
  screen instead of the top left corner, by modifying the viewport and
  scissor when drawing the world warp and UI render passes.

* When vid_fullscreen is 1, the world view no longer has an incorrect
  size and/or aspect ratio. This was due to the world warp and UI
  render passes sampling from the whole color buffer instead of the
  restricted render area. To fix this, the postprocessing and world warp
  shaders now use unnormalized coordinates, corrected with the frame
  offset, and sample directly from the appropriate texels.

* The game no longer outputs pixels which have not been written to,
  which are usually displayed black but may come out with undefined
  colors. For this, some output color attachments are cleared before
  drawing the final elements in the frame.
2021-01-24 11:52:30 +01:00
Ricardo Garcia
bb827cad8c Fix text indicating MSAA samples for Vulkan 2021-01-23 09:56:24 +01:00
Yamagi
449776d3f6
Merge pull request #654 from 0lvin/ref_vk
Sync variable names for msaa, retexturing and anisotropic filtering
2021-01-22 12:27:18 +01:00
Yamagi
0488dcd4e9 Add a replacement chasing the cl_anglekicks -> cl_kickangles rename. 2021-01-22 12:22:47 +01:00
Denis Pauk
46c24d4d18 Sync variable names for msaa, retexturing and anisotropic filtering #646 2021-01-19 21:39:44 +02:00
Denis Pauk
6a89f30768 Show message about anisotropy for selected device 2021-01-19 21:39:34 +02:00
Denis Pauk
b9d4549a9b Add support r_customwidth/r_customheight in ref_vk #652 2021-01-19 21:39:25 +02:00
Denis Pauk
000c72fecc Rework vk_msaa to use number of samples #646 2021-01-19 21:39:13 +02:00
Hugo Locurcio
08d59ee8e8
Rename cl_anglekicks to cl_kickangles for consistency with Q2PRO 2021-01-18 04:41:57 +01:00
Yamagi
2fae58d56b Implement singleplayer in the dedicated server.
When set to `1`, both `deathmatch` and `coop` are forced to `0`.
`maxclients` is forced to `1`. This makes it possible to play single
player campaigns over the dedicated server.

Closes #614.
2021-01-17 11:07:46 +01:00
Yamagi
f01998896f Hide the fix for sky surfaces missused for indoor lighting begind cvar.
All renderers had the fix, but it was only optional in the GL renderers.
And there it was missimplemented, cvars must be defined in the renderers
main() function. Otherwise they aren't available at startup.

Rename gl_fixsurfsky to r_fixsurfsky, implement it for all renderers and
enable it by default.
2021-01-17 10:25:09 +01:00
Yamagi
a9914efde7 Implement vk_underwater, make the underwater warp effect optional.
This was requested in #505.
2021-01-13 21:46:15 +01:00
Yamagi
8a54e49f61
Merge pull request #643 from 0lvin/ref_vk
Enable depthWriteEnable for particles
2021-01-13 18:27:17 +01:00
Yamagi
61766edbe1
Merge pull request #644 from rg3/skybox-fixes
Skybox fixes
2021-01-13 18:22:44 +01:00
Yamagi
d745e16523
Merge pull request #642 from DanielGibson/fix-lm-glitch
Makefile: Fix architecture detection on Windows
2021-01-13 18:11:03 +01:00
Ricardo Garcia
8142898b56 Fix black pixels along skybox edges in Vulkan
Due to the skybox geometry not always being watertight, it's sometimes
possible to see instances of isolated black pixels flickering along
skybox edges. This happens when the sampling coordinates for the given
pixel fall outside any triangle in the skybox due to the previous
problem.

These pixels are usually visible when MSAA is not used and pixels are
big enough on the screen, like when using lower screen resolutions or
large vk_pixel_size values. If MSAA is used, normally only a few of the
samples fall outside any triangle and the problem is masked a bit, being
harder to spot.

Instead of fixing the skybox clipping routines, which may be
complicated, this commit simply preserves color buffer contents between
frames. If any pixel ends up without coverage, its color will be taken
from a previous draw a few frames before, depending on the swapchain
size. This is usually more than enough to completely mask the problem
visually.
2021-01-12 23:33:55 +01:00
Ricardo Garcia
aa2baedd97 Fix skybox edges being visible in Vulkan
Skybox edges are sometimes visible in Vulkan, specially in lower screen
resolutions or when vk_pixel_size is used to the same effect.

To avoid this problem, draw the skybox using CLAMP_TO_EDGE addressing
mode in samplers. In order to do that, the number of texture samplers is
doubled and a second set of samplers with the new addressing mode are
created, and used only when drawing the skybox.
2021-01-12 23:33:55 +01:00
Daniel Gibson
9bc2fe29fe Clean up savegame's ReadGame() a bit
less duplicate code, more readable usage of strcmp()
2021-01-12 07:12:19 +01:00
Daniel Gibson
ee7923a9dd Fix architecture detection on Windows in Makefile, bump SAVEGAMEVER
$PROCESSOR_ARCHITECTURE seems to contain the architecture of the host,
but we need the architecture the current MinGW shell is targeting.
$MINGW_CHOST seems to be just that, and on my system it's either
i686-w64-mingw32 (mingw32.exe) or x86_64-w64-mingw32 (mingw64.exe)
(No idea what it looks like for Windows on ARM...)

As fixing this would otherwise break existing savegames, I bumped the
SAVEGAMEVER to "YQ2-4" and added a quirk for older savegameversions:
On Windows i386 savegames that contain "AMD64" instead of "i386" as
architecture are also accepted.
(For YQ2-1 this didn't seem necessary, apparently "i386" was hardcoded)
2021-01-12 05:04:11 +01:00
Yamagi
023a012e82 Change the hyperblaster back to yellow for Vanilla Q2 lightning.
In Vanilla Q2 (without any point releases) the hyperblaster projectiles
emitted white light. In the 3.21 sources it's yellow. It likely changed
in on of the (early) point releases. Change it to yellow, the code now
matches 3.21.
2021-01-11 07:34:30 +01:00
Yamagi
462a0ddff5
Merge pull request #636 from rg3/vk_resolution_scaling
Add resolution scaling to Vulkan renderer
2021-01-10 19:02:51 +01:00
Yamagi
a98d533ae1 Add cl_r1q2_lighstyle, set to 0 for Vanilla Q2 dlight colors.
Since the first release Yamagi Quake II used the more fanzy R1Q2 colors
for some dynamic lights:

* In R1Q2 the rocket has orange light, matching the color of the fire
  trail and the generic explosion. Vanilla Quake II had yellow light,
  the same as the blaster and several muzzle flashs.
* In R1Q2 hyperblaster projectiles are emitting yellow light, like the
  normal blaster. That matches the projectile colors, the muzzle flash
  and the effect when hitting a wall. And it's more logical, since the
  hyperblaster is just a blaster on steroids. Vanilla Quake II had white
  / uncolored lights.

Add an option to revert to Vanilla Quake II colors, leave the R1Q2
colors as default. Closes #640.
2021-01-10 18:30:49 +01:00
Denis Pauk
3b9aa6448e Enable depthWriteEnable for particles 2021-01-10 13:25:10 +02:00
Denis Pauk
1bc60032e7 Fix pipeline debug naming 2021-01-10 13:07:44 +02:00
Yamagi
faf6a91ace
Merge pull request #635 from 0lvin/ref_soft
Port improvements to soft and vulkan
2020-12-31 10:27:03 +01:00
Yamagi
69ba055c2c Minimal error checking for Sys_Mkdir() on windows. 2020-12-31 09:09:09 +01:00
Yamagi
60d881437b Minimal error handling for Sys_Mkdir() under unixlike platforms. 2020-12-31 08:55:09 +01:00
Yamagi
8e223b2743 Make sure that the config dir exists.
Since 1a913eb we're calling realpath() on every dir and bail out if the
real path isn't available. If the game is started the first time, the
configuration dir doesn't exist at the first realpath() call and the
game errors out. Always create the configuration dir when determining
it's path.

This didn't happen on Windows because the configuration dir was created
when opening stdout.txt right after we entered main().

TODO: Sys_Mkdir() should grow at leas a little bit error handling. We're
silently ending up in -portable mode if the configuration dir couldn't
created.
2020-12-30 18:45:16 +01:00
Ricardo Garcia
150db4d443 Widen pipeline scissor adjusted for vk_pixel_size
When calculating the pipeline scissor adjusted for vk_pixel_size, round
scissor offset down and size up. This avoids black bars on image borders
when scaling up if the division is not exact.
2020-12-24 23:51:27 +01:00
Denis Pauk
84aceda76d Use submodels directly from current map 2020-12-24 13:40:07 +02:00
Ricardo Garcia
930872b358 Add resolution scaling to Vulkan renderer
This commit adds a new cvar called vk_pixel_size that represents how big
pixels should look in the rendered world in order to simulate lower
screen resolutions. With its default value of 1 everything looks normal,
but with bigger sizes (e.g. 4) the rendered world starts to look
"pixelated" due to pixels appearing bigger.

To implement the effect, the viewport and scissor are modified when
drawing the world so the rendering results cover a smaller area in the
top-left corner of the image.

The post-processing fragment shader is used to scale the image back to
the swapchain size before drawing UI elements on top of it.

The UI is not affected by this change, so the existing UI scaling
options continue to work as before with no changes, adding some
flexibility to the mix.

Related to feature request #588.
2020-12-24 10:14:39 +01:00
Denis Pauk
4f9067e6b8 Reallocate models with huge current map 2020-12-23 23:29:29 +02:00
Denis Pauk
2c00502b0b Free Unused Image and Models only if we are near to limit 2020-12-23 21:35:27 +02:00
Denis Pauk
b0cc97e6f3 make cppcheck happy with R_RestoreMips
132: Array 'image->pixels[4]' accessed at index -1, which is out of bounds.
133,134: Shifting by a negative value is undefined behaviour.
2020-12-23 12:36:45 +02:00
Denis Pauk
004e5e250f Rearange code and make loadmodel local 2020-12-23 12:12:35 +02:00
Denis Pauk
462633d3d9 Vulkan: Calculate needed hunk size in Mod_LoadBrushModel()
Based on ec6d743d
2020-12-23 11:48:41 +02:00
Denis Pauk
278f9104cd Remove unused TargaHeader 2020-12-22 16:47:35 +02:00
Denis Pauk
3418280b06 Fix cppcheck warnings
src/common/cvar.c:160 Logical disjunction always evaluates to true: c >= '0' || c <= '9'. Are these conditions necessary? Did you intend to use && instead? Are the numbers correct? Are you comparing the correct variables?
src/common/cvar.c:141 The scope of the variable 'c' can be reduced.
src/common/cvar.c:517 The scope of the variable 'c' can be reduced.
src/common/shared/shared.c:1359 Either the condition '!value' is redundant or there is possible null pointer dereference: value.
src/common/shared/shared.c:1371 Either the condition '!value' is redundant or there is possible null pointer dereference: value.
src/common/shared/shared.c:1377 Either the condition '!value' is redundant or there is possible null pointer dereference: value.
src/client/refresh/soft/sw_main.c:1531 Variable 'err' is assigned a value that is never used.
2020-12-17 22:49:03 +02:00
Denis Pauk
a4181a0bdb Add m8 textures support(heretic2 mods) 2020-12-17 21:59:04 +02:00
Denis Pauk
f975a94c74 Add farsee flag to ref_soft 2020-12-17 00:05:45 +02:00
Denis Pauk
e23be99a49 Fix image shrink calls 2020-12-16 23:53:29 +02:00
Denis Pauk
2e93364940 Use SmoothColorImage as final filtering 2020-12-16 22:45:39 +02:00
Denis Pauk
be2e91e142 Sync LoadSP2, turret_driver_die, SP_info_player_intermission declarations
src/client/refresh/gl1/gl1_model.c:39:6: warning: type of ‘LoadSP2’ does not match original declaration [-Wlto-type-mismatch]
src/game/g_turret.c:29:6: warning: type of ‘infantry_die’ does not match original declaration [-Wlto-type-mismatch]
src/game/g_spawn.c:43:6: warning: type of ‘SP_info_player_intermission’ does not match original declaration [-Wlto-type-mismatch]
2020-12-16 22:44:38 +02:00
Denis Pauk
d190c3d143 soft: scale cinema raw images 2020-12-16 22:11:02 +02:00
Yamagi
983f7f6b4b Port some lightning fixes from gl3 to vk.
* Fix for skyboxes abused as lightsources, was #393.
* Don't reuse i as counter variable when calculating light points.
2020-12-16 09:19:28 +01:00
Denis Pauk
b7bdd0be72 Add vk_nolerp_list support 2020-12-12 14:45:04 +01:00
Denis Pauk
539fea96bb add vk_retexturing force flag 2020-12-12 14:45:04 +01:00
Denis Pauk
1a4d495028 Enable retexturing by default and dump real image sizes 2020-12-12 14:45:04 +01:00
Denis Pauk
e3b387f7e7 Scale up 8bit images 2020-12-12 14:45:04 +01:00
Denis Pauk
8e5f68bb68 Remove vk_round_down as regressed visual quality 2020-12-12 14:45:04 +01:00
Denis Pauk
0d57f47b9b restore near color value only for transparent images 2020-12-12 14:45:04 +01:00
Denis Pauk
d4df592572 remove redundant suballocate (vk_util has already suballicate buffers) 2020-12-12 14:45:04 +01:00