Commit graph

10 commits

Author SHA1 Message Date
Vladislav Belov
e8a5103f8c
Fixes #8057 by properly initializing atlas texture.
Fixes #8057
Fixes #8184
Fixes #8345
2025-09-17 14:31:16 +02:00
Vladislav Belov
e2d9450d0d
Revert "Font: make atlas uploads queue-aware on Vulkan"
This reverts commit 256dff7fd4.
2025-09-17 12:32:08 +02:00
Ralph Sennhauser
f9e1e742bf
Fix includes in source/renderer
Make include-what-you-use happy with files in source/renderer and
fix what needs to be fixed.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-07-27 16:07:14 +02:00
trompetin17
256dff7fd4
Font: make atlas uploads queue-aware on Vulkan
Goal
----
Avoid corrupting the dynamic font-atlas on Vulkan by blocking any
re-uploads until the command buffer that created / last updated the
texture has actually been submitted.

What changed
------------
* **Queue-aware textures**
  * Added `queueSubmitAware` flag to `IDevice::CreateTexture*` APIs.
  * `Vulkan::CTexture` now stores two booleans:
      - `m_QueueSubmitAware` – opt-in per texture.
      - `m_PendingQueueSubmit` – set to *true* the moment an upload
        is recorded, cleared once the submit scheduler has flushed.
  * `CRingCommandContext::ScheduleUpload` marks the texture as
    pending (`SetPendingQueueSubmit(true)`).

* **Device-side watcher**
  * `Vulkan::CDevice` keeps a
    `m_TextureUploadWatcherQueue`. Each frame it checks textures that
    were uploaded ≥ `NUMBER_OF_FRAMES_IN_FLIGHT` frames ago and
    clears their pending flag.
  * New helpers
    `ScheduleTextureUploadWatch `,
    `ProcessTextureUploadWatchQueue()`.

* **Font code**
  * Atlas texture is now created with
    `queueSubmitAware = true`.
  * `CFont::UploadTextureAtlasToGPU()` early-outs when
    `IsPendingQueueSubmit()` returns *true*, instead of tracking a
    submit-handle or the manual `m_IsLoadingTextureToGPU` flag
    (removed).

Why this is better
------------------
The logic to wait for a flush is localised inside the rendering
backend, so `CFont` only needs to ask *“is my texture busy?”*.
This removes the fragile submit-handle bookkeeping and works even if
the scheduler issues multiple submits per frame in future.

Result
------
Atlas uploads are deferred until the previous submit completes,
eliminating the intermittent glyph corruption on the Vulkan backend
while leaving GL and the dummy backend unchanged.
2025-07-09 13:09:46 -05: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
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
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
vladislavbelov
4355c8675b Implements framebuffer readback for Vulkan to allow screenshots.
Differential Revision: https://code.wildfiregames.com/D4940
This was SVN commit r27552.
2023-02-17 17:36:10 +00:00
vladislavbelov
ac75966d67 Fixes descriptor set overwrite when multiple textures reference it with delayed deletion. Fixes #6717
Refs #6636

Comments By: phosit, Stan
Tested By: phosit, Stan
Differential Revision: https://code.wildfiregames.com/D4916
This was SVN commit r27511.
2023-01-30 21:23:44 +00:00
vladislavbelov
7c84c23114 Adds Vulkan backend.
Comments By: phosit, Stan
Differential Revision: https://code.wildfiregames.com/D4876
This was SVN commit r27412.
2023-01-10 20:22:20 +00:00