Philip Rebohle
51649f6da6
[dxvk] Add function to create image resource
2024-09-26 17:37:50 +02:00
Philip Rebohle
5813e7c031
[dxvk] Add function to create buffer resource
2024-09-26 17:37:50 +02:00
Philip Rebohle
00f7545d15
[dxvk] Add helper to get memory type mask for buffer usage
2024-09-26 17:37:50 +02:00
Philip Rebohle
e80dd6db5f
[dxvk] Cache memory type mask with global buffer support
2024-09-26 17:37:50 +02:00
Philip Rebohle
3bee390d91
[dxvk] Don't log memory errors prematurely
...
Fallback allocations are a thing.
2024-09-26 17:37:50 +02:00
Philip Rebohle
f36a536288
[dxvk] Use DxvkResourceAllocation internally
...
Changes DxvkMemory to be nothing more than a wrapper.
2024-09-26 17:37:50 +02:00
Philip Rebohle
5dd7a29261
[dxvk] Introduce DxvkResourceAllocation
2024-09-26 17:37:50 +02:00
Philip Rebohle
4064c89e8c
[dxvk] Remove legacy buffer renaming interface
2024-09-26 17:37:50 +02:00
Philip Rebohle
6f6e75b4b8
[d3d9] Use DxvkBufferAllocation where appropriate
2024-09-26 17:37:50 +02:00
Philip Rebohle
8e45a60542
[d3d11] Use DxvkBufferAllocation where appropriate
2024-09-26 17:37:50 +02:00
Philip Rebohle
eae66201f6
[dxvk] Use DxvkBufferAllocation for HUD rendering
2024-09-26 17:37:50 +02:00
Philip Rebohle
75dadf2c1c
[dxvk] Use DxvkBufferAllocation in swap chain blitter
2024-09-26 17:37:50 +02:00
Philip Rebohle
5c2f56c9cc
[dxvk] Introduce DxvkBufferAllocation
...
For now, this is merely a wrapper around the existing buffer slice
struct in order to allow easier refactoring.
2024-09-26 17:37:50 +02:00
Philip Rebohle
d0832f8431
[vulkan] Move stage and access mask definitions to header
2024-09-26 17:37:50 +02:00
Philip Rebohle
7ec75aaf81
[util] Make likely/unlikely less annoying to use
2024-09-26 17:37:50 +02:00
Philip Rebohle
888906a6da
[util] Add some functionality to smart pointer
...
Basically lets us deal with objects that manage their own destruction,
which ideally shold be all of them at some point.
Also adds some missing comparison operators.
2024-09-26 17:37:50 +02:00
Philip Rebohle
06baa48c2b
[dxvk] Align allocation size to create global buffer
2024-09-26 13:13:48 +02:00
Philip Rebohle
401ca41091
[dxvk] Do not always keep an empty chunk around
...
Outdated thinking, we have a 20 second timer on this which should
be more than enough to ensure we're not spamming device memory
allocations.
2024-09-26 13:13:48 +02:00
Philip Rebohle
3cd7e3efb5
[dxvk] Tweak memory allocation behaviour on mapped memory types
2024-09-26 13:13:48 +02:00
Philip Rebohle
5c8728abd2
[hud] Use different colors to highlight mapped or non-mapped allocations
...
Useful on UMA systems or when we have to fall back to system memory.
2024-09-26 13:13:48 +02:00
Philip Rebohle
d00ca261af
[dxvk] Use worker to update adapter's memory statistics
...
Takes a bunch of pointer indirections and atomics off the hot path.
2024-09-26 13:13:48 +02:00
Philip Rebohle
27088beea8
[dxvk] Use worker thread to periodically free unused memory
...
System memory allocations typically peak very high while loading, but
just sit there unused afterwards. This allows us to free them based
on when they have last been used.
Works well in practice since best-fit avoids using empty chunks as much
as possible.
2024-09-26 13:13:48 +02:00
Philip Rebohle
e1fd2bff2c
[dxvk] Rewrite memory allocator
...
Uses a single allocator pair per memory type in order to make memory
allocations on the entire memory pool faster, and further reduce
fragmentation by applying the best fit strategy to the whole memory
pool.
2024-09-26 13:13:48 +02:00
Philip Rebohle
3a4dadb528
[dxvk] Add chunk concept to page allocator
...
This allows the allocator to operate on the entire allocated memory pool.
2024-09-26 13:13:48 +02:00
Philip Rebohle
266b99ad8d
[hud] Add HUD item to visualize memory chunk allocation
2024-09-26 13:13:48 +02:00
Philip Rebohle
f679d7d90f
[dxvk] Add detailed allocation statistics
2024-09-26 13:13:48 +02:00
Philip Rebohle
b46ef2ceff
[dxvk] Move memory statistics from memory types to heaps
2024-09-26 13:13:48 +02:00
Philip Rebohle
35fea6475d
[dxvk] Tune small buffer allocation sizes
...
The pool allocator works on powers of two, so buffers should too.
2024-09-26 13:13:48 +02:00
Philip Rebohle
3faa1a76da
[dxvk] Simplify memory chunk allocation
...
Reduces overall waste of memory by reusing already allocated
chunks more aggressively.
2024-09-26 13:13:48 +02:00
Philip Rebohle
661385584a
[dxvk] Use new allocators for chunk suballocation
2024-09-26 13:13:48 +02:00
Philip Rebohle
5efaa06c61
[dxvk] Add new page allocator implementation
2024-09-26 13:13:48 +02:00
Philip Rebohle
1eec969448
[util] Add 64-bit lzcnt
2024-09-26 13:13:48 +02:00
Philip Rebohle
343af21594
[build] Disable assertions for release builds
2024-09-26 13:13:48 +02:00
Philip Rebohle
0cf05780ab
[meta] Release 2.4.1
2024-09-26 12:09:26 +02:00
Philip Rebohle
15365f2d82
[d3d11] Synchronize shared texture initialization
2024-09-26 08:21:43 +02:00
WinterSnowfall
97091aad39
[util] Enable legacy DISCARD for Rayman 3
2024-09-26 06:48:13 +02:00
WinterSnowfall
a7b3b1e3a4
[d3d8] Add an option to respect DISCARD only for dynamic write-only buffers
2024-09-26 06:48:13 +02:00
WinterSnowfall
4fad20d77c
[d3d8] Relax viewport validation in windowed mode
2024-09-25 20:46:48 +02:00
琴梨梨OvO
bb6d1b3b4c
[util]Add support for Time Leap Paradise
2024-09-25 19:54:24 +02:00
Robin Kertels
f5ca3cf5df
[d3d9] ResolveZ: Only copy aspects that both images support
2024-09-25 00:32:13 +01:00
Robin Kertels
d7c2e3ac76
[d3d9] Use correct aspect mask when blitting depth stencil textures
...
We don't want to blit stencil when the D3D9 format doesn't have
stencil.
2024-09-25 00:32:13 +01:00
Robin Kertels
ca3aa2014b
[d3d9] Improve comment about synchronization with ProcessVertices
2024-09-22 22:53:55 +02:00
Robin Kertels
1d49f247ac
[d3d9] Remove incorrect early-exit
...
The same texture could be bound to
multiple slots and if the shader doesn't
use the lower index texture, we'd never
end up uploading it.
2024-09-22 22:53:55 +02:00
Robin Kertels
ef8bad33a5
[d3d9] Optimize late buffer uploads
...
... similar to what we're doing for textures.
2024-09-22 22:53:55 +02:00
Blisto91
5a08b3c451
[util] Cap fps for F.E.A.R 1 & expansions
...
Visual glitches can occur at very high fps
2024-09-22 21:07:08 +02:00
Robin Kertels
04ad98690b
[d3d9] Add SWVP HUD item
2024-09-22 21:03:23 +02:00
Robin Kertels
033104f335
[d3d9] Cleanup buffer memory flag selection
2024-09-22 21:03:23 +02:00
Robin Kertels
5bb8d09a96
[d3d9] Always use per-draw buffer uploads on pure SWVP devices
2024-09-22 21:03:23 +02:00
WinterSnowfall
97fb6e4f6d
[d3d9] Clean up supported formats from GetUnsupportedFormatInfo
2024-09-22 20:51:15 +02:00
WinterSnowfall
7985ac9cdb
[d3d9] Add R16 and AL16 as known unsupported formats
2024-09-22 20:51:15 +02:00