It's better to construct a js-array from a `JS::RootedValueVector`.
Because it is more strongly typed and the index doesn't has to be
specified when appending an element.
Some usages are replaced with `JS::RootedValueArray`.
Fixes: #8702
Currently we always choose the best device. But it's not always
desirable. A more safe approach is to use the default device (with
index 0). The only downside of that is if a user didn't adjust
settings then the game might run on an integrated GPU instead of a
discrete one. In the future it'll be solved by selecting GPU in
options: #8529Fixes#8455
Now it's possible to destroy the old swapchain before creating a new
one. It might make the swapchain creation a bit slower but with a
lower memory peak.
With C++20 the custom container PS:span, which was a backport of
std::span is no longer needed.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with some files in source and fix what
needs to be fixed.
Add markers to precompiled.h header includes to avoid
include-what-you-use wanting them to be removed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
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>
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.
According to our stats `GL_ARB_fragment_program_shadow` is supported
by all our GL users. Also we're going to remove OpenGL ARB in A29. So
I remove ARBShadersShadow completely.
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`.
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.
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.