Commit graph

1089 commits

Author SHA1 Message Date
Vladislav Belov
c4d10eedfd
Fixes runtime switch of the GPU skinning.
Fixes #7572, #7630.

(cherry picked from commit 2264807ad0)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-01 08:56:56 +02:00
Vladislav Belov
21ec2f0ab8
Allows compute shaders for GL only since 4.3.
It seems current checks for GL 4.2 aren't enough so just disable
compute shaders for GL 4.2. Fixes #7734.

(cherry picked from commit fa3fb5d064)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-01 08:56:55 +02:00
Vladislav Belov
85cc968be0
Fixes out of bounds during GL buffer binding.
There was an out of bounds access during binding a uniform buffer on
GL. Fixes #7567, #7598.

(cherry picked from commit bce6e2c238)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-01 08:56:54 +02:00
Vladislav Belov
d4e1b8b9db
Disables compute shaders for GL ARB backend.
(cherry picked from commit a7ead4cf4c)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-28 19:28:00 +01:00
Vladislav Belov
8f8d08b9f3
Disables GL storage buffers on Mesa.
This is a workaround to avoid disabling GL storage buffers completely.
Because they might not work or might lead to a decreased performance.
We need to investigate that further when we have a local reproduce.

(cherry picked from commit 635a268dd9)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-28 06:49:26 +01:00
Vladislav Belov
3231d262ef
Fixes missing SPIR-V shader combinations.
We have multiple renderer backends for a while. So we can't rely on
a single CONFIG_GLES2 macro for disabling features.

(cherry picked from commit 8ee48a164a)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-08 14:37:41 +01:00
Vladislav Belov
83a3794ea3
Fixes slow-path texture conversion on RPI4.
RPI4 returns `false` for `textureCompressionBC` because it doesn't
support formats above BC3. As the Vulkan specification requires to
support all BC formats to have `true` for `textureCompressionBC`.

(cherry picked from commit 0467d27b07)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-05 22:55:22 +01:00
Vladislav Belov
3531ac9041
Fixes GLES compilation.
(cherry picked from commit 54701868da)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-04 23:21:01 +01:00
Vladislav Belov
dba968013f
Fixes Vulkan device selection.
According to #6936 some lower devices (especially virtual ones) might
report more memory than regular ones. So we can't use the memory
amount as a score for now.
2024-12-16 23:18:20 +01:00
Ralph Sennhauser
ead62bba78
Update trac links with gitea links
This replaces all links pointing to trac with their corresponding links
to gitea. Also replace http with https while at it.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-10 11:29:48 +01:00
Vladislav Belov
de1257c8da
Adds GPU skinning support via compute shaders.
We use a shader with 64 bones by default to consume less uniform memory.
But if we meet bigger skeletons we batch and handle them afterwards.
In the future we need to sort the input models to have less changes for
bound buffers. Also we might want to skin up to 4 models per a single
dispatch.
2024-12-09 22:47:17 +01:00
Vladislav Belov
9e371824c2
Adds storage buffer support to Vulkan and GL.
The idea is similar to the storage images but we need a separate
descriptor set in Vulkan and a program interface to gather used buffer
in GL.

For Vulkan we also need to track buffers to free used descriptor sets.
2024-12-09 22:47:15 +01:00
Vladislav Belov
60b4072b29
Avoids assertions on Vulkan backend device creation in case of driver bugs. 2024-12-05 18:32:15 +01:00
phosit
f8afd49ae1 Return by value from CCamera::GetScreenCoordinates
Pack the two `float`s in to a `CVector2D`.
Rename some variables to not use underscore.
2024-11-17 20:27:58 +01:00
phosit
cf92c20020 Return by value from CCamera::GetViewQuad
Remove some temporaries by passing the return value directly to
range-based for loops.
2024-11-17 20:27:58 +01:00
phosit
256152df6d Add CXeromycesEngine
This way the destructor can be used for clean up and `Singleton` can be
used.
2024-11-17 18:03:49 +01:00
Vladislav Belov
9094c3adb0
Batches update and upload passes for model renderers. 2024-11-08 13:57:57 +01:00
Vladislav Belov
0a6703762d
Removes hardcoded Vulkan uniform descriptor set ranges. 2024-11-06 23:24:22 +01:00
Vladislav Belov
3a01d852e2
Adds binding slot type to Vulkan shader program. 2024-11-06 19:09:22 +01:00
Vladislav Belov
eecc5a8fea
Updates the list of GL extensions for glad. 2024-11-03 20:35:28 +01:00
Stan
361a32a7e5
Fix parameter typo in GL backend 2024-11-01 13:30:12 +01:00
Vladislav Belov
2b324fdd94 Avoids recalculating Vulkan pipeline state in case of the same desc. 2024-10-25 21:23:47 +02:00
Vladislav Belov
5a5d518c28
Cleans up code after renaming HWLightingModelRenderer to CPUSkinnedModelRenderer. 2024-10-19 23:24:40 +02:00
Vladislav Belov
63faea7153
Renames HWLightingModelRenderer to CPUSkinnedModelRenderer. 2024-10-19 22:59:50 +02:00
Vladislav Belov
960b3180e5
Reduces code duplication for Vulkan pipeline state binding. 2024-10-19 19:58:03 +02:00
Vladislav Belov
4f7f2e056c Fixes water foam texture size after scale. 2024-10-19 01:21:50 +02:00
Vladislav Belov
3eb1da6e5c Fixes incorrect Vulkan buffer usage enum name. 2024-10-19 00:13:50 +02:00
Stan
09e42692bb
Fix GLES 2.0 build after the compute shader addition 2024-10-08 08:13:33 +02:00
Itms
35e0a98940 Avoid a copy in a range-for-loop
This fixes -Wrange-loop-construct with FreeBSD's clang17.
2024-09-28 21:55:30 +02:00
Dunedan
56f6d76b78 Remove internationalization of log messages
As log messages aren't supposed to be translatable, this removes the
internationalization of all log messages, which had it enabled.

Patch by: @Dunedan
Accepted by: @Itms
Differential Revision: https://code.wildfiregames.com/D5314
This was SVN commit r28179.
2024-08-05 15:27:12 +00:00
vladislavbelov
6d5dc7f311 Fixes zero usage for Vulkan upload buffer after b9fd6f18f0.
This was SVN commit r28110.
2024-06-14 22:05:32 +00:00
vladislavbelov
b9fd6f18f0 Adds proper IBuffer usage instead of dynamic flag.
Comments By: phosit
Differential Revision: https://code.wildfiregames.com/D5281
This was SVN commit r28107.
2024-06-10 19:31:41 +00:00
vladislavbelov
e9bc76040d Accounts maxAnisotropy for Vulkan samplers.
This was SVN commit r28034.
2024-02-16 18:46:44 +00:00
vladislavbelov
aeeeb2c8d9 Makes pipeline state dirty on Vulkan only when VertexInputLayout was changed.
This was SVN commit r28011.
2024-01-17 19:55:28 +00:00
vladislavbelov
e3f46bb809 Adds compute shaders support and scaling with FSR.
Fixes #6842

Comments By: phosit, Stan
Differential Revision: https://code.wildfiregames.com/D5218
This was SVN commit r28010.
2024-01-17 19:40:27 +00:00
vladislavbelov
ffc4a56b9f Revert non-ASCII characters from source and configuration files introduced in 157c6af18e.
Fixes #6846

Differential Revision: https://code.wildfiregames.com/D5185
This was SVN commit r27965.
2023-12-03 00:30:12 +00:00
vladislavbelov
a905932712 Moves single descriptor set binding management for Vulkan to a separate class.
Differential Revision: https://code.wildfiregames.com/D5163
This was SVN commit r27921.
2023-11-07 21:43:52 +00:00
vladislavbelov
c78ad51057 Fixes incorrect case of GLX extensions. Fixes #6547
Patch By: xone47
Differential Revision: https://code.wildfiregames.com/D5160
This was SVN commit r27920.
2023-11-07 21:28:59 +00:00
vladislavbelov
f40942f6b3 Moves CVertexBufferManager from global scope to CRenderer.
Differential Revision: https://code.wildfiregames.com/D5171
This was SVN commit r27907.
2023-10-28 21:01:22 +00:00
vladislavbelov
5e583beb22 Fixes result of VkDescriptorSet creation forgotten in 6ef27d2ffe.
This was SVN commit r27887.
2023-10-13 18:32:22 +00:00
vladislavbelov
e2c5a62a19 Moves model flags to ModelAbstract.
Differential Revision: https://code.wildfiregames.com/D5146
This was SVN commit r27880.
2023-10-09 18:37:56 +00:00
vladislavbelov
6ef27d2ffe Merges UID from different Vulkan device objects and unifies single type descriptor set creation.
Differential Revision: https://code.wildfiregames.com/D5140
This was SVN commit r27879.
2023-10-09 18:34:50 +00:00
phosit
3fff9df4a0 Return CTerrain and CUnitManager references from CWorld instead of pointers
Accepted By: @vladislavbelov
Comments By: @Stan
Differential Revision: https://code.wildfiregames.com/D4739
This was SVN commit r27861.
2023-09-26 20:10:40 +00:00
vladislavbelov
c86d3bbb56 Refactors models and materials, part 2, replaces raw pointer by unique_ptr and adds test.
Comments By: phosit
Differential Revision: https://code.wildfiregames.com/D5128
This was SVN commit r27846.
2023-09-21 19:00:28 +00:00
vladislavbelov
af13be489e Adds printing error names to Vulkan backend.
Differential Revision: https://code.wildfiregames.com/D5121
This was SVN commit r27839.
2023-09-13 17:36:52 +00:00
vladislavbelov
442eb3ad4f Avoids creating a post-processing blur texture with zero size.
This was SVN commit r27825.
2023-09-04 18:08:00 +00:00
vladislavbelov
37b2f93a3c Adds texture checks for framebuffer attachments on Vulkan.
This was SVN commit r27817.
2023-08-28 17:53:41 +00:00
vladislavbelov
11e8f80b58 Fixes descriptor pool type for GetSingleTypePool.
This was SVN commit r27809.
2023-08-22 17:48:22 +00:00
vladislavbelov
23f1949e2a Handles VK_INCOMPLETE for vkGetSwapchainImagesKHR.
Differential Revision: https://code.wildfiregames.com/D5090
This was SVN commit r27797.
2023-08-15 17:27:23 +00:00
bb
157c6af18e Make the space in 0 A.D. non-breaking throughout the codebase.
Avoid cases of filenames
Update years in terms and other legal(ish) documents
Don't update years in license headers, since change is not meaningful

Will add linter rule in seperate commit

Happy recompiling everyone!

Original Patch By: Nescio
Comment By: Gallaecio
Differential Revision: D2620
This was SVN commit r27786.
2023-07-27 20:54:46 +00:00