8 Commits
Author SHA1 Message Date
LibretroAdmin 4fad02d5f7 Vulkan: stream buffers in place, fences in a ring 2026-11-08 04:01:32 +01:00
LibretroAdmin 03af617adc Vulkan/D3D12: texture uploads stream through CPU-cached system memory
Texels are written into it in place, tile by tile, so it is cached
memory: VK_HEAP_UPLOAD_CACHED on Vulkan, a write-back L0 custom heap on
Direct3D 12, the upload heap where the device has none.
2026-11-07 17:53:38 +01:00
LibretroAdmin 6fe348ec38 Vulkan: device memory from a heap of its own, in C
VKHeap.c takes large blocks from the driver and hands out offsets in
them: the lowest free span that fits, spans kept sorted so a free is a
binary search and a merge. The handle is a small struct kept by value,
so nothing is allocated per allocation. Host-visible blocks are mapped
once and stay mapped; stream buffers and staging buffers write straight
into the memory the GPU reads. Buffers and linear images keep to blocks
of their own, apart from optimal images. What the driver requires or
prefers dedicated, and anything of half a block or more, gets memory of
its own sized to fit. Host blocks are 16 MiB, device blocks 64 MiB, and
neither more than an eighth of its driver heap; one empty block of each
kind is kept and the rest go back to the driver.

The Vulkan Memory Allocator is gone, and with it the memory budget
extension only it used.
2026-11-07 06:06:08 +01:00
Martino Fontana a14c88ba67 Remove unused imports
Yellow squiggly lines begone!
Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes.
If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed.
The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports.
Not everything is removed, but the cleanup should be substantial enough.
Because this done on Linux, code that isn't used on it is mostly untouched.
(Hopefully no open PR is depending on these imports...)
2026-01-25 16:12:15 +01:00
Dr. Dystopia 6d44afc7dd Replace 'reinterpret_cast' with 'static_cast' 2024-11-08 07:26:47 +01:00
Robin Kertels 1ba58e83ca VideoBackends:Vulkan: Use VMA for stream buffer 2022-10-23 03:21:29 +02:00
Pierre Bourdon e149ad4f0a treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
Shawn Hoffman d7fd892fde normalize common filenames in VideoBackends/Vulkan 2021-01-27 14:29:48 -08:00