Philip Rebohle
be080edc7f
vkd3d: Remove vkd3d_allocate_resource_memory.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-19 19:51:44 +01:00
Philip Rebohle
a1e5b78bc4
vkd3d: Suballocate committed images if possible and if supported by the driver.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-19 19:51:44 +01:00
Philip Rebohle
a1ffea1800
vkd3d: Fix integer underflow when checking for suitable free ranges.
...
The difference between a range's offset and the aligned
offset may be greater than the size of that range.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-19 18:11:36 +01:00
Philip Rebohle
6a34d3d204
vkd3d: Remove _2 suffix from memory allocation functions.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-18 14:17:22 +01:00
Philip Rebohle
6f8bb2a4c0
vkd3d: Use vkd3d_allocate_device_memory_2 for sparse metadata.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-18 14:17:22 +01:00
Philip Rebohle
12f0c11c7f
vkd3d: Simplify vkd3d_allocate_image_memory helper.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-18 14:17:22 +01:00
Philip Rebohle
ab2c190da5
vkd3d: Simplify vkd3d_allocate_buffer_memory helper.
...
This is still useful as a low-level memory allocation function when
we don't want to bother with buffer offsets or D3D12 validation.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-18 14:17:22 +01:00
Philip Rebohle
6fc8b67576
vkd3d: Fix incorrect chunk assignment for chunk allocations.
...
Our clear code assume that this is NULL for allocations owned
by a chunk, so we should actually do it that way. Fixes some
issues where we do not wait for clears to complete if a chunk
gets destroyed.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-17 16:38:47 +01:00
Philip Rebohle
a39bab95a1
vkd3d: Clear suballocated memory to zero.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-16 16:06:26 +01:00
Philip Rebohle
668a4e1f2c
vkd3d: Do not suballocate small image-only heaps.
...
We have no way to manually reset these.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-16 16:06:26 +01:00
Philip Rebohle
4d68130be7
vkd3d: Add functionality to clear newly allocated memory.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-16 16:06:26 +01:00
Philip Rebohle
6e1867b001
vkd3d: Add some more debug output to memory allocation functions.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-15 17:04:52 +01:00
Philip Rebohle
5e54c1fc5d
vkd3d: Register allocation cookie for descriptor debugging.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-15 17:04:52 +01:00
Philip Rebohle
8f6e94dc30
vkd3d: Suballocate small allocations from larger chunks.
...
This is necessary to keep the amount of allocated memory manageable
in games that allocate a lot of small heaps or committed resources.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-15 16:38:16 +01:00
Philip Rebohle
d65363b6b6
vkd3d: Add VA map to memory allocator.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-15 15:19:11 +01:00
Philip Rebohle
f536daaacb
vkd3d: Introduce new memory allocation functions.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-15 15:19:11 +01:00