Denis Pauk
8b6de3a4c1
Fix m32 load
2022-12-31 16:29:52 +02:00
Denis Pauk
879808af8c
Merge pull request #36 from yquake2/shared_images
...
Reuse image load with other renders
2022-12-15 23:04:56 +02:00
Denis Pauk
a234f687a4
Share SURF_* values between renders
...
Reuse DRAWSKY value in soft render instead unused
DRAWSKYBOX and SURF_FLOW.
Move mipadjust calculation to usage place in soft render.
2022-12-14 22:09:15 +02:00
Denis Pauk
55330be2ae
Image: Share Mod_ReLoadSkins
2022-12-14 22:09:15 +02:00
Denis Pauk
e753629e2d
Image: show missed images with r_validation
2022-12-14 22:09:13 +02:00
Denis Pauk
d8e77a5e82
Image: Check skin image before use
2022-12-14 22:07:42 +02:00
Denis Pauk
e9f0826582
Image: Share Draw_FindPic
2022-12-14 22:07:42 +02:00
Denis Pauk
d382472026
Image: Share GetTexImage
2022-12-14 22:07:42 +02:00
Denis Pauk
20360c5ad6
Image: Share loadSky textures
...
Add support of `r_palettedtextures` to all renders.
2022-12-14 22:07:40 +02:00
Denis Pauk
17fb10d683
Image: Share LoadImage
2022-12-14 22:05:30 +02:00
Denis Pauk
b434562325
Image: Share Hicolor
2022-12-14 22:05:30 +02:00
Denis Pauk
ac2311f873
Image: Add M32 support functions
...
https://github.com/TTimo/GtkRadiant/blob/master/plugins/imagem8/m32.h
2022-12-14 22:05:30 +02:00
Denis Pauk
94fc74ca9d
Image: Share M8
2022-12-14 22:05:30 +02:00
Denis Pauk
1732f4c6fe
Image: Share code for load Wal
2022-12-14 22:05:30 +02:00
Denis Pauk
fa2794ef75
Image: Share code for add file extension
2022-12-14 22:05:30 +02:00
Denis Pauk
d6b350572a
Images: Get rid of custom Draw_GetPalette and move to pcx.c
2022-12-14 22:05:30 +02:00
Denis Pauk
3da1dd3a8d
Merge pull request #37 from devnexen/fix_last_commit_on_validation
...
r_validation CVar to take in account only when positive.
2022-12-14 21:59:57 +02:00
David Carlier
3907262678
r_validation CVar to take in account only when positive.
2022-12-13 21:51:44 +00:00
Denis Pauk
39738797a1
version bump
2022-12-11 19:16:35 +02:00
Denis Pauk
def5407ae0
Use first found optimal flags in select memory
...
Should fix #34 , when NVIDIA card provides memory type with several
addional flags more than code has asked but retuns error on allocate.
Code has be changed to use first memory type with minimal prefered
properties.
E.g. if code needs VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, a first block should be used
instead a fourth as before:
```
Memory blocks:
1: VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
2: VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
3: VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT VK_MEMORY_PROPERTY_HOST_COHERENT_BIT VK_MEMORY_PROPERTY_HOST_CACHED_BIT
4: VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
```
2022-12-11 00:35:05 +02:00
Denis Pauk
335b8855e2
Apply shared filtering logic for lerplist
2022-12-11 00:06:18 +02:00
David CARLIER
aefe787eca
trying out PRI* print formats
2022-12-09 15:38:40 +00:00
Denis Pauk
889ff7a067
Additional ugly hack to make apple clang happy
...
Otherwise on arm64 linux:
```
src/vk/vk_common.c:2513:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘VkDeviceSize’ {aka ‘long unsigned int’} [-Wformat=]
2513 | R_Printf(PRINT_ALL, "%s: %d: Resize stanging buffer" YQ2_COM_PRIu64 "->" YQ2_COM_PRIu64 "\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2514 | __func__, vk_activeStagingBuffer, stagingBuffer->resource.size, size);
| ~~~~
| |
| VkDeviceSize {aka long unsigned int}
src/vk/header/../../common/header/common.h:722:28: note: format string is defined here
722 | #define YQ2_COM_PRIu64 "%llu"
| ~~~^
| |
| long long unsigned int
| %lu
```
2022-12-08 23:25:33 +02:00
Denis Pauk
9b55cdb921
Add additional warnings for memory allocate error
2022-12-08 22:53:50 +02:00
Denis Pauk
d39193d419
Merge pull request #33 from devnexen/vk_common_arg_fix
...
fix printf format warnings to represent VkDeviceSize (aka uint64_t).
2022-12-08 22:20:23 +02:00
David CARLIER
68a1e5de14
fix printf format warnings to represent VkDeviceSize (aka uint64_t).
2022-12-07 23:32:25 +00:00
Denis Pauk
2b01442235
Fix vk build on debian stable with 1.2.162 headers
2022-11-26 13:15:13 +02:00
Denis Pauk
8a79f754d2
Rename vk_validation to r_validation
...
Prepare to merge share image load: https://github.com/yquake2/yquake2/pull/924
2022-11-19 14:39:55 +02:00
Denis Pauk
42ab79aa1d
Add datasize parameter to LoadPic
...
Prepare to merge share image load: https://github.com/yquake2/yquake2/pull/924
2022-11-19 14:37:53 +02:00
Denis Pauk
646b65dfa8
Merge pull request #32 from devnexen/uninitialize2
...
Vk_LoadPic fix unitialized var.
2022-11-19 13:25:46 +02:00
David Carlier
44ab39c57c
Vk_LoadPic fix unitialized var.
...
R_MarkLeaves data alignment to int when merging PVS clusters like GL renderers.
2022-11-19 10:46:12 +00:00
Denis Pauk
8bd731b89c
Merge pull request #31 from devnexen/fix_uninit
...
Vk_LoadPic uninitialized vars for 8 bits case.
2022-11-13 19:25:06 +02:00
David Carlier
25225b8ab9
Vk_LoadPic uninitialized vars for 8 bits case.
...
VK_DrawParticles rgb calculation align to color' table type.
2022-11-13 08:57:01 +00:00
Denis Pauk
925ed6a547
Update shared.c from yquake2
...
0bc3ac6079
2022-11-07 23:20:03 +02:00
Denis Pauk
425bc5ac5e
Mod_LoadBrushModel: Sync varibale names with other renders
2022-10-30 12:28:54 +02:00
Denis Pauk
fd8077146d
Port shared models load
...
898b87f0f4
2022-10-20 08:23:10 +03:00
David Carlier
a3e1346520
backport signed left shift from main quake2.
2022-10-16 10:57:11 +01:00
Denis Pauk
d7a11c33be
Add const to scale functions
2022-09-17 13:19:26 +03:00
Denis Pauk
a62603b3c7
cppcheck: make parameters const
2022-09-14 00:13:34 +03:00
Denis Pauk
b2103fca46
Merge pull request #28 from devnexen/silent_warning
...
silent clang warning as SDL vulkan and vulkan define both same macros.
2022-09-12 20:54:45 +03:00
David CARLIER
4402657b5f
silent clang warning as SDL vulkan and vulkan define both same macros.
2022-09-11 23:29:31 +01:00
Denis Pauk
674e634679
cppcheck: make parameters const
2022-08-28 15:01:06 +03:00
Denis Pauk
41f12687a4
Fix function propotypes -Wmissing-prototypes
2022-08-14 15:40:51 +03:00
Denis Pauk
2c4c8421fb
Update shared.c files with headers from yquake2
...
Based on f9ab797c7c
2022-07-30 16:09:18 +03:00
David Carlier
e467107d45
Hunk_Begin/Alloc attr malloc addition.
2022-07-30 15:27:08 +03:00
Denis Pauk
1b91ee0f95
fix C --pedantic warnings
...
* extra semicolon in struct or union specified
* ISO C does not allow extra ‘;’ outside of a function
2022-07-30 15:27:02 +03:00
Daniel Gibson
0c4606973e
Make basename() fully compliant and simplify it a bit
2022-07-30 15:26:56 +03:00
Daniel Gibson
955944a71a
Make it work with VS2015 and newer
...
the workaround is a bit ugly but should work..
(I only tested VS2017, but I guess 2015 should also work)
2022-07-30 15:26:49 +03:00
Daniel Gibson
914441ff3a
CMake: Make the game build with Visual Studio (2019 16.8 or newer)
...
The easiest way to build this is to check out the dhewm3-libs project
(https://github.com/dhewm/dhewm3-libs/ ) to provide the dependencies
(SDL2, OpenAL, cURL) and set YQUAKE2LIBS accordingly, by passing
-DYQUAKE2LIBS=c:/path/to/dhewm3-libs/i686-w64-mingw32 to cmake.
I wouldn't really recommend building with MSVC - I just somehow made it
work and ignored all the warnings and I have no idea how portable the
resulting binaries are etc. For binaries you actually want to use, please
continue using MinGW-w64. Especially my workaround for VLAs (C99 variable
length arrays) is kinda fishy, particularly if those arrays are allocated
in a loop (that's inly done in ref_gl1.dll's code).
The only reason I did this is that I had to debug on Windows and, at least
for my specific bug, gdb didn't really work with binaries produced by
MingGW-w64 and MSVC's debugger works well with binaries produced by MSVC.
Currently requires VS 2019 16.8 or newer with C11 (/std:c11) because I
couldn't get YQ2_ALIGNAS_TYPE() to work with MSVC without _Alignas().
If we can get this to work, VS2015 or newer might suffice (but not older
versions, because their so called C standardlib didn't provide exotic
functions like snprintf()).
# Conflicts:
# CMakeLists.txt
2022-07-30 15:26:40 +03:00
Denis Pauk
36b41fc107
Revert "Temporary fix for MoltenVK"
...
This reverts commit 41057458e4
.
2022-07-24 14:09:05 +03:00